33> If you haven't used Yii2, you can skip this section and get directly to "[ getting started] ( ../start/prerequisites.md ) "
44> section.
55
6- While sharing some common ideas and values, Yii 3 is conceptually different from Yii 2. There is no easy upgrade
6+ While sharing some common ideas and values, Yii3 is conceptually different from Yii 2. There is no easy upgrade
77path, so first [ check maintenance policy and end-of-life dates for Yii 2] ( https://www.yiiframework.com/release-cycle )
8- and consider starting new projects on Yii 3 while keeping existing ones on Yii 2.
8+ and consider starting new projects on Yii3 while keeping existing ones on Yii 2.
99
1010## PHP requirements
1111
@@ -26,12 +26,12 @@ Yii3 requires PHP 8.2 or above. As a result, there are language features used th
2626
2727## Preliminary refactoring
2828
29- It's a good idea to refactor your Yii 2 project before porting it to Yii 3 . That would both make porting easier
30- and benefit the project in question while it's not moved to Yii 3 yet.
29+ It's a good idea to refactor your Yii 2 project before porting it to Yii3 . That would both make porting easier
30+ and benefit the project in question while it's not moved to Yii3 yet.
3131
3232### Use DI instead of the service locator
3333
34- Since Yii 3 is forcing you to inject dependencies, it's a good idea to prepare and switch from using
34+ Since Yii3 is forcing you to inject dependencies, it's a good idea to prepare and switch from using
3535service locator (` Yii::$app-> ` ) to [ DI container] ( https://www.yiiframework.com/doc/guide/2.0/en/concept-di-container ) .
3636
3737If usage of DI container is problematic for whatever reason, consider moving all calls to ` Yii::$app-> ` to controller
@@ -41,7 +41,7 @@ See [Dependency injection and container](../concept/di-container.md) for an expl
4141
4242### Introduce repositories for getting data
4343
44- Since Active Record isn't the only way to work with a database in Yii 3 , consider introducing repositories that would
44+ Since Active Record isn't the only way to work with a database in Yii3 , consider introducing repositories that would
4545hide details of getting data and gather them in a single place. You can later redo it:
4646
4747``` php
@@ -67,7 +67,7 @@ that's all the business logic has to go to framework-independent classes.
6767
6868### Move more into components
6969
70- Yii 3 services are conceptually similar to Yii 2 components, so it's a good idea to move reusable parts of your application
70+ Yii3 services are conceptually similar to Yii 2 components, so it's a good idea to move reusable parts of your application
7171into components.
7272
7373## Things to learn
@@ -84,7 +84,7 @@ It's a good idea to learn how to use it and use it for your own projects since i
8484### Environment variables
8585
8686Yii3 application templates are using [ environment variables] ( https://en.wikipedia.org/wiki/Environment_variable )
87- to configure pars of the application. The concept is [ very handy for Dockerized applications] ( https://12factor.net/ )
87+ to configure parts of the application. The concept is [ very handy for Dockerized applications] ( https://12factor.net/ )
8888but might be alien to users of Yii 1.1 and Yii 2.
8989
9090### Handlers
@@ -97,4 +97,4 @@ are similar to controllers but different.
9797Suggested Yii3 application structure is different from Yii 2.
9898It's described in [ application structure] ( ../structure/overview.md ) .
9999
100- Despite that, Yii3 is flexible, so it's still possible to use a structure similar to Yii 2 with Yii 3 .
100+ Despite that, Yii3 is flexible, so it's still possible to use a structure similar to Yii 2 with Yii3 .
0 commit comments