You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"> If you haven't used Yii2, you can skip this section and get directly to \"[getting started](../start/installation.md)\"\n"
35
+
"> If you haven't used Yii2, you can skip this section and get directly to \"[getting started](../start/prerequisites.md)\"\n"
36
36
"> section.\n"
37
37
msgstr""
38
38
39
39
#. type: Plain text
40
-
#: ../../guide/en/intro/upgrade-from-v2.md
41
-
msgid"While sharing some common ideas and values, Yii 3 is conceptually different from Yii 2. There is no easy upgrade path, so first [check maintenance policy and end-of-life dates for Yii 2](https://www.yiiframework.com/release-cycle) and consider starting new projects on Yii 3 while keeping existing ones on Yii 2."
40
+
#: ../src/guide/intro/upgrade-from-v2.md
41
+
msgid"While sharing some common ideas and values, Yii3 is conceptually different from Yii 2. There is no easy upgrade path, so first [check maintenance policy and end-of-life dates for Yii 2](https://www.yiiframework.com/release-cycle) and consider starting new projects on Yii3 while keeping existing ones on Yii 2."
42
42
msgstr""
43
43
44
44
#. type: Title ##
45
-
#: ../../guide/en/intro/upgrade-from-v2.md
45
+
#: ../src/guide/intro/upgrade-from-v2.md
46
46
#, no-wrap
47
47
msgid"PHP requirements"
48
48
msgstr""
49
49
50
50
#. type: Plain text
51
-
#: ../../guide/en/intro/upgrade-from-v2.md
51
+
#: ../src/guide/intro/upgrade-from-v2.md
52
52
msgid"Yii3 requires PHP 8.2 or above. As a result, there are language features used that weren't used in Yii 2:"
msgid"It's a good idea to refactor your Yii 2 project before porting it to Yii 3. That would both make porting easier and benefit the project in question while it's not moved to Yii 3 yet."
122
+
#: ../src/guide/intro/upgrade-from-v2.md
123
+
msgid"It's a good idea to refactor your Yii 2 project before porting it to Yii3. That would both make porting easier and benefit the project in question while it's not moved to Yii3 yet."
124
124
msgstr""
125
125
126
126
#. type: Title ###
127
-
#: ../../guide/en/intro/upgrade-from-v2.md
127
+
#: ../src/guide/intro/upgrade-from-v2.md
128
128
#, no-wrap
129
129
msgid"Use DI instead of the service locator"
130
130
msgstr""
131
131
132
132
#. type: Plain text
133
-
#: ../../guide/en/intro/upgrade-from-v2.md
133
+
#: ../src/guide/intro/upgrade-from-v2.md
134
134
#, no-wrap
135
135
msgid""
136
-
"Since Yii 3 is forcing you to inject dependencies, it's a good idea to prepare and switch from using\n"
136
+
"Since Yii3 is forcing you to inject dependencies, it's a good idea to prepare and switch from using\n"
137
137
"service locator (`Yii::$app->`) to [DI container](https://www.yiiframework.com/doc/guide/2.0/en/concept-di-container).\n"
138
138
msgstr""
139
139
140
140
#. type: Plain text
141
-
#: ../../guide/en/intro/upgrade-from-v2.md
141
+
#: ../src/guide/intro/upgrade-from-v2.md
142
142
#, no-wrap
143
143
msgid""
144
144
"If usage of DI container is problematic for whatever reason, consider moving all calls to `Yii::$app->` to controller\n"
145
145
"actions and widgets and passing dependencies manually from a controller to what needs them.\n"
146
146
msgstr""
147
147
148
148
#. type: Plain text
149
-
#: ../../guide/en/intro/upgrade-from-v2.md
149
+
#: ../src/guide/intro/upgrade-from-v2.md
150
150
msgid"See [Dependency injection and container](../concept/di-container.md) for an explanation of the idea."
151
151
msgstr""
152
152
153
153
#. type: Title ###
154
-
#: ../../guide/en/intro/upgrade-from-v2.md
154
+
#: ../src/guide/intro/upgrade-from-v2.md
155
155
#, no-wrap
156
156
msgid"Introduce repositories for getting data"
157
157
msgstr""
158
158
159
159
#. type: Plain text
160
-
#: ../../guide/en/intro/upgrade-from-v2.md
161
-
msgid"Since Active Record isn't the only way to work with a database in Yii 3, consider introducing repositories that would hide details of getting data and gather them in a single place. You can later redo it:"
160
+
#: ../src/guide/intro/upgrade-from-v2.md
161
+
msgid"Since Active Record isn't the only way to work with a database in Yii3, consider introducing repositories that would hide details of getting data and gather them in a single place. You can later redo it:"
162
162
msgstr""
163
163
164
164
#. type: Fenced code block (php)
165
-
#: ../../guide/en/intro/upgrade-from-v2.md
165
+
#: ../src/guide/intro/upgrade-from-v2.md
166
166
#, no-wrap
167
167
msgid""
168
168
"final readonly class PostRepository\n"
@@ -181,88 +181,87 @@ msgid ""
181
181
msgstr""
182
182
183
183
#. type: Title ###
184
-
#: ../../guide/en/intro/upgrade-from-v2.md
184
+
#: ../src/guide/intro/upgrade-from-v2.md
185
185
#, no-wrap
186
186
msgid"Separate domain layer from infrastructure"
187
187
msgstr""
188
188
189
189
#. type: Plain text
190
-
#: ../../guide/en/intro/upgrade-from-v2.md
190
+
#: ../src/guide/intro/upgrade-from-v2.md
191
191
msgid"In case you have a rich complicated domain, it's a good idea to separate it from infrastructure provided by a framework that's all the business logic has to go to framework-independent classes."
192
192
msgstr""
193
193
194
194
#. type: Title ###
195
-
#: ../../guide/en/intro/upgrade-from-v2.md
195
+
#: ../src/guide/intro/upgrade-from-v2.md
196
196
#, no-wrap
197
197
msgid"Move more into components"
198
198
msgstr""
199
199
200
200
#. type: Plain text
201
-
#: ../../guide/en/intro/upgrade-from-v2.md
202
-
msgid"Yii 3 services are conceptually similar to Yii 2 components, so it's a good idea to move reusable parts of your application into components."
201
+
#: ../src/guide/intro/upgrade-from-v2.md
202
+
msgid"Yii3 services are conceptually similar to Yii 2 components, so it's a good idea to move reusable parts of your application into components."
msgid"Default application templates are using [Docker](https://www.docker.com/get-started/) to run application. It's a good idea to learn how to use it and use it for your own projects since it provides a lot of benefits:"
221
220
msgstr""
222
221
223
222
#. type: Bullet: '1. '
224
-
#: ../../guide/en/intro/upgrade-from-v2.md
223
+
#: ../src/guide/intro/upgrade-from-v2.md
225
224
msgid"Exactly the same environment as in production."
226
225
msgstr""
227
226
228
227
#. type: Bullet: '2. '
229
-
#: ../../guide/en/intro/upgrade-from-v2.md
228
+
#: ../src/guide/intro/upgrade-from-v2.md
230
229
msgid"No need to install anything except Docker itself."
231
230
msgstr""
232
231
233
232
#. type: Bullet: '3. '
234
-
#: ../../guide/en/intro/upgrade-from-v2.md
233
+
#: ../src/guide/intro/upgrade-from-v2.md
235
234
msgid"Environment is per application, not per server."
236
235
msgstr""
237
236
238
237
#. type: Title ###
239
-
#: ../../guide/en/intro/upgrade-from-v2.md
238
+
#: ../src/guide/intro/upgrade-from-v2.md
240
239
#, no-wrap
241
240
msgid"Environment variables"
242
241
msgstr""
243
242
244
243
#. type: Plain text
245
-
#: ../../guide/en/intro/upgrade-from-v2.md
246
-
msgid"Yii3 application templates are using [environment variables](https://en.wikipedia.org/wiki/Environment_variable) to configure pars of the application. The concept is [very handy for Dockerized applications](https://12factor.net/) but might be alien to users of Yii 1.1 and Yii 2."
244
+
#: ../src/guide/intro/upgrade-from-v2.md
245
+
msgid"Yii3 application templates are using [environment variables](https://en.wikipedia.org/wiki/Environment_variable) to configure parts of the application. The concept is [very handy for Dockerized applications](https://12factor.net/) but might be alien to users of Yii 1.1 and Yii 2."
247
246
msgstr""
248
247
249
248
#. type: Title ###
250
-
#: ../../guide/en/intro/upgrade-from-v2.md
249
+
#: ../src/guide/intro/upgrade-from-v2.md
251
250
#, no-wrap
252
251
msgid"Handlers"
253
252
msgstr""
254
253
255
254
#. type: Plain text
256
-
#: ../../guide/en/intro/upgrade-from-v2.md
255
+
#: ../src/guide/intro/upgrade-from-v2.md
257
256
msgid"Unlike Yii2, Yii3 doesn't have controllers per se. Instead, it uses [handlers](../structure/handler.md) which are similar to controllers but different."
258
257
msgstr""
259
258
260
259
#. type: Plain text
261
-
#: ../../guide/en/intro/upgrade-from-v2.md
260
+
#: ../src/guide/intro/upgrade-from-v2.md
262
261
msgid"Suggested Yii3 application structure is different from Yii 2. It's described in [application structure](../structure/overview.md)."
263
262
msgstr""
264
263
265
264
#. type: Plain text
266
-
#: ../../guide/en/intro/upgrade-from-v2.md
267
-
msgid"Despite that, Yii3 is flexible, so it's still possible to use a structure similar to Yii 2 with Yii 3."
265
+
#: ../src/guide/intro/upgrade-from-v2.md
266
+
msgid"Despite that, Yii3 is flexible, so it's still possible to use a structure similar to Yii 2 with Yii3."
0 commit comments