Revision #10 has been created by Mehdi Achour on Dec 19, 2018, 12:18:58 PM with the memo:
Added "Application configuration"
« previous (#9) next (#11) »
Changes
Title
unchanged
(draft) Understanding Yii 3
Category
unchanged
Tutorials
Yii version
unchanged
all
Tags
unchanged
yii3
Content
changed
[...]
* Caching is now compliant with PSR-16
* Dependency Injection is now compliant with PSR-11
### **Application configuration**
<small>[TODO]</small>If you've ever installed an extension using Yii 2, you may/certainly have found yourself on the extension README file, looking for the chunk of configuration to copy/paste in your own `config/main.php` file.
This can often lead to:
* a huge configuration file (which you may have decided to split into smaller files)
* non-trivials configurations update when a new version of the extension is realeased with new/changed configurations options.
Yii 3 takes another approach. Every package bundle its own configuration, and will probably work out of the box. And you may override them, if you need to, from your configuration file.
This is all done by leveraging the [hiqdev/composer-config-plugin](https://github.com/hiqdev/composer-config-plugin) composer plugin, which takes care of scanning & merging all the configurations when you run `composer dump-autoload` (also know as `composer du`).
You can read [Yii2 projects alternative organization](https://hiqdev.com/pages/articles/app-organization) for an in-depth explanation of the motivation behind `hiqdev/composer-config-plugin`.
Packages authors will have the responsibility to avoid introducing BC breaks, by adopting a strict sementical versionning.
### **Dependencies injection**
<small>[TODO]</small>[...]