I noticed that when experimenting with the –magento-init-params option in a command, it does not seem to overwrite the configuration at all. My understanding is that, based on the command description, it should do this.
According to the documentation provided by Adobe, it states:https://experienceleague.adobe.com/en/docs/commerce-operations/tools/cli-reference/commerce-on-premises#help
Add to any command to customize Magento initialization parameters For example: “MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/example.com&MAGE_DIRS[cache][path]=/var/tmp/cache”
When testing this and executing the command setup:upgrade it does not seem to overwrite the default configuration used within the command.
magento setup:upgrade --magento-init-params MAGE_MODE=production
I also executed the command this way in case it would maybe work:
magento setup:upgrade --magento-init-params "MAGE_MODE=production"
In both cases the command runs with the incorrect configuration.
I suspect this may be a bug, or am I misunderstanding something?
Magento Version: 2.4.7-p2
Package: magento/project-community-edition
This issue should be reproducible using the default example project, as I tested it with the default example application.