frontend
frontend copied to clipboard
inject at composer install ?
let's see what happens if you run composer install
on a production repo
it inject or not stuff in config/config.php
when you run composer install
it asks
Please select which config file you wish to inject 'Laminas\Validator\ConfigProvider' into:
[0] Do not inject
[1] config/config.php
Make your selection (default is 1):
if you type 1 and hit enter or just hit enter (default is 1), then the config/config.php file is updated with 12 more ConfigProviders, but this is not needed
our installation steps (see readme under 'II. Installing DotKernel frontend using git clone') already have the below
the setup asks for configuration settings regarding injections (**type 0 and hit enter**) and a confirmation to use this setting for other packages (type y and hit enter)
should we update the installation section to make this step more clear?
the injection issue is discussed in threads like these https://github.com/laminas/laminas-component-installer/issues/1 https://github.com/zendframework/zend-component-installer/issues/51 it looks like the default is likely to remain 1 which injects the ConfigProviders
in the DK frontend documentation, it says :
https://github.com/dotkernel/frontend?tab=readme-ov-file#i-installing-dotkernel-frontend-using-composer
Make your selection (default is 0):
It says default is 0
since the beginning of the Frontend repo (April, 2020).
At that time it probably was defaulting to 0
in
https://github.com/laminas/laminas-component-installer/blob/3.5.x/src/ComponentInstaller.php#L534
Assuming that laminas-component-installer always finds our config/config.php
file, the correct text is:
Make your selection (default is 1):
because their code here does the following check:
// Default to first discovered option; index 0 is always "Do not inject"
$default = $options->count() > 1 ? 1 : 0;
if they see our config/config.php
, $options->count()
should always be > 1
=> $default is set to 1
.
modified readme.md in both frontend and admin to state that the default values is 1, not 0