-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment configuration model TOOL-14 #1
Conversation
We used https://github.com/punkstar/mageconfigsync for Magento 1. Support for Magento 2 is in there but we haven't used it. There's also an open quality of life issue that we'd need to resolve before using it seriously: punkstar/mageconfigsync#19 Not currently suggesting that we use it, but ideas like storing the configuration in YAML could be brought across from it as we did find that particularly useful. (I don't have access to JIRA yet so apologies if I've missed the point 😁) |
@punkstar thanks for the tip, your module seems safer, the idea with this is to have a file dropped in by composer at |
@punkstar I will give your module a whirl, thanks for letting us know, and thanks for making my first Space48 code totally useless 😂 |
@DanK00 Sorry! 😂 @tgerulaitis and I are in two minds about whether we even need mageconfigsync for M2 due to Magento needing certain things to be defined in |
There is also M2.2 dump config which puts a bunch of "stuff" in config.php, primarily to allow DB less frontend compilation. I have to admit that we have not put much effort into finding out exactly what can practically be serialised into config.php yet |
One thing to keep in mind if you're using Another potential avenue that looks interesting, but I haven't explored personally, is using environment variables for environment specific configurations. Starting with Magento 2.2, you can just set environment variables with specific format names to get Magento to update its config: http://devdocs.magento.com/guides/v2.2/config-guide/deployment/pipeline/example/environment-variables.html |
I still think I am happiest setting these values in PHP. Some method of using environment variables in the linked article above seems like the most appropriate approach but something needs to be built on top of it to make it developer friendly. Until such a time I am going to use this package 😝 |
@punkstar @iainhubbard @tgerulaitis After some fiddling around with custom configuration files this afternoon I learned that 2.2.0 has removed the custom config file pool feature. 😩 /**
* Initial files for configuration
*
* @var array
* @deprecated 100.2.0 Magento does not support custom config file pools since 2.2.0 version
*/
private $initialConfigFiles = [
self::DIST => [
self::APP_CONFIG => 'config.dist.php',
self::APP_ENV => 'env.dist.php',
],
self::LOCAL => [
self::APP_CONFIG => 'config.local.php',
self::APP_ENV => 'env.local.php',
]
]; |
https://space48.atlassian.net/browse/TOOL-14
A small domain model to represent the Magento configuration and Magento environments, so we can set different values for different passed environment identifier to reduce the overhead of setting things like test credentials, base url's and the like.