Revision #7 has been created by Mehdi Achour on Dec 19, 2018, 10:53:07 AM with the memo:
Added changes overview section
« previous (#6) next (#8) »
Changes
Title
unchanged
(draft) Understanding Yii 3
Category
unchanged
Tutorials
Yii version
unchanged
all
Tags
unchanged
yii3
Content
changed
[...]
Yii 3 is the second major rewrite of the Yii framework.
> Originally started in the 2.1 branch, it was later decided to switch to the 3.X series because of all the backward compatibility breakage. Starting with 3.0, [Yii will follow the Sementic Versionning](https://www.yiiframework.com/news/177/yii-adopts-semver-since-version-3-0-0).
This rewrite addresses a lot of issues Yii 2 suffered from, like the framework being too coupled with jQuery, bower, bootstrap.
In order to achieve this, the framework source code have been split into several packages, and at its core level, Yii no longer makes assumptions about your web stack <small>[TODO: add more grieffs about Yii2]</small>
## Changes overview
Here are the main changes in Yii 3. You can check the complete [CHANGELOG](https://github.com/yiisoft/yii-core/blob/master/CHANGELOG.md#300-under-development) for an exhaustive list.
### Source code splitting
The framework source code have been split into several packages, and at its core level, Yii no longer makes assumptions about your development stack, or the features you will be using.
This enable you to cherry pick the packages you need to compose your application.
This re-organisation is also a great new
s for maintainance, as these packages will be
maintained and released separat
ely, thus allowing more frequent updates.
It's also important to note that t### Autoloading
The custom PHP class autoloader have
also been removed in favor of Composer's PSR-4 implementation.
We will see the implications of this change later.
Other new PSR changes:
* Logging is now compliant with PSR-3
* Caching is now compliant with PSR-16
* Dependency Injection is now compliant with PSR-11
You can check the complete [CHANGELOG](https://github.com/yiisoft/yii-core/blob/master/CHANGELOG.md#300-under-development) for an exhaustive list of modifications.
This means that in order for Yii to see your classes, you will have to explicitly register your namespace in `composer.json`. We will see an example later.
### PSR compatibility
Yii 3 take some positive steps following the [PHP-FIG](https://www.php-fig.org/) recommendations, by implementing the following PSRs:
* Logging is now compliant with PSR-3
* Caching is now compliant with PSR-16
* Dependency Injection is now compliant with PSR-11
### Application configuration
<small>[TODO]</small>
### Dependencies injection
<small>[TODO]</small>
## Yii 3 composer packages
Here are the new packages introduced in Yii 3, which can be found in this [official list](https://github.com/yiisoft/docs/blob/master/000-packages.md#yii-framework).[...]