-
Notifications
You must be signed in to change notification settings - Fork 18
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
Why are you saving extension config in config.ini? #73
Comments
Yes, but even before Prestashop was supported, I choose to store the configuration outside of a database. The advantages of a file based configuration is speed, and also the configuration can be version controlled with git by checking it into your repository. It definitely eases deployments. I know that's one pitfall even with Magento. When you want to set up a copy of your site onto your localhost or another development machine, you have to make repeatedly make a bunch of changes to the database everytime you load the latest backup locally, to put in the differing URLs, and file paths for that specific server. It's really bad for setting up clusters of servers, or for running the code in development & testing servers, or in teams where environments can differ. You're challenged with keeping the database synchronized without overwriting changes to the configuration tables. This is no problem with files in version control, eg. git deals with it by listing that file in ".gitignore" or marking a file as untracked. Actually I like using regular PHP for the config files now, just like phpMyAdmin, pimple, or Zend Framework 2... Some people prefer .ini (mysql/php/windows), YAML (symfony), json (composer), XML (magento). At the time .ini was an arbittrary choice mostly. I did prefer it over XML because its less verbose. |
Gotcha. Thanks for the quick reply. I'm performing more and more changes and updates to the codebase so I wanted to make sure I understood some of the fundamental choices. |
Also Magento lacked/lacks a lot of documentation, so the overall preference was to avoid "the magento way" when possible & just keep it decoupled from any specific shopping cart |
I'm assuming you're using Zend_Config_Ini instead of the Magento config system so that the core works on both Magento and Prestashop?
The text was updated successfully, but these errors were encountered: