Closed LeanderFS closed 6 days ago
Hi @LeanderFS. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hello @LeanderFS,
Thanks for the report and collaboration!
We have gone through the issue description and also the file mentioned in the description https://github.com/magento/magento2/blob/6f4805f82bb7511f72935daa493d48ebda3d9039/lib/internal/Magento/Framework/App/DeploymentConfig.php#L7
But we are not able to get the comment which says the below:
seem to suggest that it should be possible to set deployment configuration using environment variables only.
Can you please elaborate more on this?
Thanks
Hi @engcom-Hotel. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Dear @LeanderFS,
We've observed that there haven't been any updates on this issue for quite some time. Therefore, we assume it's been resolved and will close it. Feel free to open a new ticket or reopen this one if you need more help.
Regards
Summary
The comments inside
vendor/magento/framework/App/DeploymentConfig.php
seem to suggest that it should be possible to set deployment configuration using environment variables only. After testing this it seems that this only works partly, as the environment variable is only set in the$this->flatData
array and not in the$this->data
array. Resulting in conflicting configuration and key collisions.Examples
Snippet of the method responsible for loading the deployment configuration seems to suggest deployment configuration can be set using environment variables only. Note that the there are 2 arrays being created,
$this->data
and$this->flatData
. The value of the environment variable is correctly added in$this->flatData
, but is absent in$this->data
. Both arrays are being used to load deployment configuration.\Magento\Framework\App\DeploymentConfig::load
\Magento\Framework\App\DeploymentConfig::getConfigData
returns deployment configuration from the$this->data
array.\Magento\Framework\App\DeploymentConfig::get
returns deployment configuration from the$this->flatData
array.Proposed solution
If this method of setting deployment configuration is supported (as suggested by the comments), make sure the environment variable values are being propagated to both the
$this->data
and the$this->flatData
array. On a related note, documenting this somewhere in the devDocs would be an amazing addition and would make the lives of a lot of devops engineers a lot easier working with Magento 2.Release note
No response
Triage and priority