Skip to content

Commit 5d858fb

Browse files
samdarkCopilot
andauthored
Working with databases (#267)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: samdark <47294+samdark@users.noreply.github.com>
1 parent f766ccd commit 5d858fb

38 files changed

+5432
-2349
lines changed

_translations/guide/po/es/README.md.po

Lines changed: 402 additions & 282 deletions
Large diffs are not rendered by default.

_translations/guide/po/es/databases_db-migrations.md.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
9-
"POT-Creation-Date: 2025-09-11 10:15+0500\n"
9+
"POT-Creation-Date: 2025-11-03 12:48+0000\n"
1010
"PO-Revision-Date: 2025-09-04 11:19+0500\n"
1111
"Last-Translator: Automatically generated\n"
1212
"Language-Team: none\n"

_translations/guide/po/es/glossary.md.po

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
9-
"POT-Creation-Date: 2025-09-11 10:15+0500\n"
9+
"POT-Creation-Date: 2025-10-22 11:35+0000\n"
1010
"PO-Revision-Date: 2025-09-11 10:15+0500\n"
1111
"Last-Translator: Automatically generated\n"
1212
"Language-Team: none\n"
@@ -42,7 +42,7 @@ msgstr ""
4242

4343
#. type: Plain text
4444
#: ../../guide/en/glossary.md
45-
msgid "Asset refers to a resource file. Typically, it contains JavaScript or CSS code but can be any static content accessed via HTTP."
45+
msgid "Asset refers to a resource file. Typically, it contains JavaScript or CSS code but can be any static content accessed via HTTP. Read more in [\"Assets\"](views/asset.md)."
4646
msgstr ""
4747

4848
#. type: Title #
@@ -59,7 +59,7 @@ msgstr ""
5959

6060
#. type: Plain text
6161
#: ../../guide/en/glossary.md
62-
msgid "The Configuration may refer either to the process of setting properties of an object or to a configuration file that stores settings for an object, or a class of objects. Read more in [\"Configuration\"](concept/configuration.md)."
62+
msgid "The Configuration may refer either to the process of setting properties of an object or to a configuration file that stores settings for an object, or a class of objects. Read more in [\"Configuration\"](concept/configuration.md)."
6363
msgstr ""
6464

6565
#. type: Title #
@@ -76,7 +76,7 @@ msgstr ""
7676

7777
#. type: Plain text
7878
#: ../../guide/en/glossary.md
79-
msgid "Dependency Injection is a programming technique where an object injects a dependent object. [\"DI\"](concept/di-container.md)"
79+
msgid "Dependency Injection is a programming technique where an object injects a dependent object. Read more in [\"Dependency injection and container\"](concept/di-container.md)."
8080
msgstr ""
8181

8282
#. type: Title #
@@ -110,7 +110,7 @@ msgstr ""
110110

111111
#. type: Plain text
112112
#: ../../guide/en/glossary.md
113-
msgid "Middleware is a processor in the request processing stack. Given a request, it may either produce a response or do some action and pass processing to the next middleware. Read more in [\"Middleware\"](structure/middleware.md)."
113+
msgid "Middleware is a processor in the request processing stack. Given a request, it may either produce a response or do some action and pass processing to the next middleware. Read more in [\"Middleware\"](structure/middleware.md)."
114114
msgstr ""
115115

116116
#. type: Title ##
@@ -121,7 +121,7 @@ msgstr ""
121121

122122
#. type: Plain text
123123
#: ../../guide/en/glossary.md
124-
msgid "The module is a sub-application that groups some code based on a use-case. It's typically used within the main application and may contain URL handlers or console commands."
124+
msgid "The module is a namespace that groups some code based on a use-case. It's typically used within the main application and may contain any source code, define additional URL handlers or console commands."
125125
msgstr ""
126126

127127
#. type: Title #
@@ -138,7 +138,7 @@ msgstr ""
138138

139139
#. type: Plain text
140140
#: ../../guide/en/glossary.md
141-
msgid "Namespace refers to a [PHP language feature](https://www.php.net/manual/en/language.namespaces.php)."
141+
msgid "Namespace refers to a [PHP language feature](https://www.php.net/manual/en/language.namespaces.php) to group multiple classes under a certain name."
142142
msgstr ""
143143

144144
#. type: Title #
@@ -189,7 +189,7 @@ msgstr ""
189189

190190
#. type: Plain text
191191
#: ../../guide/en/glossary.md
192-
msgid "A queue is similar to a stack. Queue follows First-In-First-Out methodology."
192+
msgid "A queue is similar to a stack. Queue follows First-In-First-Out methodology. Yii has a [yiisoft/queue](https://github.com/yiisoft/queue) package."
193193
msgstr ""
194194

195195
#. type: Title #
@@ -206,5 +206,5 @@ msgstr ""
206206

207207
#. type: Plain text
208208
#: ../../guide/en/glossary.md
209-
msgid "A Vendor is an organization or individual developer providing code in the form of packages. It also may refer to [Composer's `vendor` directory](https://getcomposer.org/doc/)."
209+
msgid "A Vendor is an organization or individual developer providing code in the form of packages. It also may refer to [Composer's `vendor` directory](https://getcomposer.org/doc/)."
210210
msgstr ""

_translations/guide/po/es/intro_upgrade-from-v2.md.po

Lines changed: 50 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
9-
"POT-Creation-Date: 2025-09-04 11:19+0500\n"
9+
"POT-Creation-Date: 2025-10-22 11:35+0000\n"
1010
"PO-Revision-Date: 2025-09-04 11:19+0500\n"
1111
"Last-Translator: Automatically generated\n"
1212
"Language-Team: none\n"
@@ -16,147 +16,153 @@ msgstr ""
1616
"Content-Transfer-Encoding: 8bit\n"
1717
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
1818

19+
#. type: Title ###
20+
#: ../../guide/en/README.md ../../guide/en/intro/upgrade-from-v2.md
21+
#, no-wrap
22+
msgid "Application structure"
23+
msgstr ""
24+
1925
#. type: Title #
20-
#: en/intro/upgrade-from-v2.md
26+
#: ../../guide/en/intro/upgrade-from-v2.md
2127
#, no-wrap
2228
msgid "Upgrading from Version 2.0"
2329
msgstr ""
2430

2531
#. type: Plain text
26-
#: en/intro/upgrade-from-v2.md
32+
#: ../../guide/en/intro/upgrade-from-v2.md
2733
#, no-wrap
2834
msgid ""
2935
"> If you haven't used Yii2, you can skip this section and get directly to \"[getting started](../start/installation.md)\"\n"
3036
"> section.\n"
3137
msgstr ""
3238

3339
#. type: Plain text
34-
#: en/intro/upgrade-from-v2.md
40+
#: ../../guide/en/intro/upgrade-from-v2.md
3541
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."
3642
msgstr ""
3743

3844
#. type: Title ##
39-
#: en/intro/upgrade-from-v2.md
45+
#: ../../guide/en/intro/upgrade-from-v2.md
4046
#, no-wrap
4147
msgid "PHP requirements"
4248
msgstr ""
4349

4450
#. type: Plain text
45-
#: en/intro/upgrade-from-v2.md
51+
#: ../../guide/en/intro/upgrade-from-v2.md
4652
msgid "Yii3 requires PHP 8.2 or above. As a result, there are language features used that weren't used in Yii 2:"
4753
msgstr ""
4854

4955
#. type: Bullet: '- '
50-
#: en/intro/upgrade-from-v2.md
56+
#: ../../guide/en/intro/upgrade-from-v2.md
5157
msgid "[Type declarations](https://www.php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration)"
5258
msgstr ""
5359

5460
#. type: Bullet: '- '
55-
#: en/intro/upgrade-from-v2.md
61+
#: ../../guide/en/intro/upgrade-from-v2.md
5662
msgid "[Return type declarations](https://www.php.net/manual/en/functions.returning-values.php#functions.returning-values.type-declaration)"
5763
msgstr ""
5864

5965
#. type: Bullet: '- '
60-
#: en/intro/upgrade-from-v2.md
66+
#: ../../guide/en/intro/upgrade-from-v2.md
6167
msgid "[Class constant visibility](https://www.php.net/manual/en/language.oop5.constants.php)"
6268
msgstr ""
6369

6470
#. type: Bullet: '- '
65-
#: en/intro/upgrade-from-v2.md
71+
#: ../../guide/en/intro/upgrade-from-v2.md
6672
msgid "[Named arguments](https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments)"
6773
msgstr ""
6874

6975
#. type: Bullet: '- '
70-
#: en/intro/upgrade-from-v2.md
76+
#: ../../guide/en/intro/upgrade-from-v2.md
7177
msgid "[Anonymous classes](https://www.php.net/manual/en/language.oop5.anonymous.php)"
7278
msgstr ""
7379

7480
#. type: Bullet: '- '
75-
#: en/intro/upgrade-from-v2.md
81+
#: ../../guide/en/intro/upgrade-from-v2.md
7682
msgid "[::class](https://www.php.net/manual/en/language.oop5.basic.php#language.oop5.basic.class.class)"
7783
msgstr ""
7884

7985
#. type: Bullet: '- '
80-
#: en/intro/upgrade-from-v2.md
86+
#: ../../guide/en/intro/upgrade-from-v2.md
8187
msgid "[Generators](https://www.php.net/manual/en/language.generators.php)"
8288
msgstr ""
8389

8490
#. type: Bullet: '- '
85-
#: en/intro/upgrade-from-v2.md
91+
#: ../../guide/en/intro/upgrade-from-v2.md
8692
msgid "[Variadic functions](https://www.php.net/manual/en/functions.arguments.php#functions.variable-arg-list)"
8793
msgstr ""
8894

8995
#. type: Bullet: '- '
90-
#: en/intro/upgrade-from-v2.md
96+
#: ../../guide/en/intro/upgrade-from-v2.md
9197
msgid "[Readonly properties](https://www.php.net/manual/en/language.oop5.properties.php#language.oop5.properties.readonly-properties)"
9298
msgstr ""
9399

94100
#. type: Bullet: '- '
95-
#: en/intro/upgrade-from-v2.md
101+
#: ../../guide/en/intro/upgrade-from-v2.md
96102
msgid "[Readonly classes](https://www.php.net/manual/en/language.oop5.basic.php#language.oop5.basic.class.readonly)"
97103
msgstr ""
98104

99105
#. type: Bullet: '- '
100-
#: en/intro/upgrade-from-v2.md
106+
#: ../../guide/en/intro/upgrade-from-v2.md
101107
msgid "[Constructor property promotion](https://www.php.net/manual/en/language.oop5.decon.php#language.oop5.decon.constructor.promotion)"
102108
msgstr ""
103109

104110
#. type: Bullet: '- '
105-
#: en/intro/upgrade-from-v2.md
111+
#: ../../guide/en/intro/upgrade-from-v2.md
106112
msgid "[Attributes](https://www.php.net/manual/en/language.attributes.php)"
107113
msgstr ""
108114

109115
#. type: Title ##
110-
#: en/intro/upgrade-from-v2.md
116+
#: ../../guide/en/intro/upgrade-from-v2.md
111117
#, no-wrap
112118
msgid "Preliminary refactoring"
113119
msgstr ""
114120

115121
#. type: Plain text
116-
#: en/intro/upgrade-from-v2.md
122+
#: ../../guide/en/intro/upgrade-from-v2.md
117123
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."
118124
msgstr ""
119125

120126
#. type: Title ###
121-
#: en/intro/upgrade-from-v2.md
127+
#: ../../guide/en/intro/upgrade-from-v2.md
122128
#, no-wrap
123129
msgid "Use DI instead of the service locator"
124130
msgstr ""
125131

126132
#. type: Plain text
127-
#: en/intro/upgrade-from-v2.md
133+
#: ../../guide/en/intro/upgrade-from-v2.md
128134
#, no-wrap
129135
msgid ""
130136
"Since Yii 3 is forcing you to inject dependencies, it's a good idea to prepare and switch from using\n"
131137
"service locator (`Yii::$app->`) to [DI container](https://www.yiiframework.com/doc/guide/2.0/en/concept-di-container).\n"
132138
msgstr ""
133139

134140
#. type: Plain text
135-
#: en/intro/upgrade-from-v2.md
141+
#: ../../guide/en/intro/upgrade-from-v2.md
136142
#, no-wrap
137143
msgid ""
138144
"If usage of DI container is problematic for whatever reason, consider moving all calls to `Yii::$app->` to controller\n"
139145
"actions and widgets and passing dependencies manually from a controller to what needs them.\n"
140146
msgstr ""
141147

142148
#. type: Plain text
143-
#: en/intro/upgrade-from-v2.md
149+
#: ../../guide/en/intro/upgrade-from-v2.md
144150
msgid "See [Dependency injection and container](../concept/di-container.md) for an explanation of the idea."
145151
msgstr ""
146152

147153
#. type: Title ###
148-
#: en/intro/upgrade-from-v2.md
154+
#: ../../guide/en/intro/upgrade-from-v2.md
149155
#, no-wrap
150156
msgid "Introduce repositories for getting data"
151157
msgstr ""
152158

153159
#. type: Plain text
154-
#: en/intro/upgrade-from-v2.md
160+
#: ../../guide/en/intro/upgrade-from-v2.md
155161
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:"
156162
msgstr ""
157163

158164
#. type: Fenced code block (php)
159-
#: en/intro/upgrade-from-v2.md
165+
#: ../../guide/en/intro/upgrade-from-v2.md
160166
#, no-wrap
161167
msgid ""
162168
"final readonly class PostRepository\n"
@@ -175,93 +181,88 @@ msgid ""
175181
msgstr ""
176182

177183
#. type: Title ###
178-
#: en/intro/upgrade-from-v2.md
184+
#: ../../guide/en/intro/upgrade-from-v2.md
179185
#, no-wrap
180186
msgid "Separate domain layer from infrastructure"
181187
msgstr ""
182188

183189
#. type: Plain text
184-
#: en/intro/upgrade-from-v2.md
190+
#: ../../guide/en/intro/upgrade-from-v2.md
185191
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."
186192
msgstr ""
187193

188194
#. type: Title ###
189-
#: en/intro/upgrade-from-v2.md
195+
#: ../../guide/en/intro/upgrade-from-v2.md
190196
#, no-wrap
191197
msgid "Move more into components"
192198
msgstr ""
193199

194200
#. type: Plain text
195-
#: en/intro/upgrade-from-v2.md
201+
#: ../../guide/en/intro/upgrade-from-v2.md
196202
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."
197203
msgstr ""
198204

199205
#. type: Title ##
200-
#: en/intro/upgrade-from-v2.md
206+
#: ../../guide/en/intro/upgrade-from-v2.md
201207
#, no-wrap
202208
msgid "Things to learn"
203209
msgstr ""
204210

205211
#. type: Title ##
206-
#: en/intro/upgrade-from-v2.md en/start/prerequisites.md
212+
#: ../../guide/en/intro/upgrade-from-v2.md
213+
#: ../../guide/en/start/prerequisites.md
207214
#, no-wrap
208215
msgid "Docker"
209216
msgstr ""
210217

211218
#. type: Plain text
212-
#: en/intro/upgrade-from-v2.md
219+
#: ../../guide/en/intro/upgrade-from-v2.md
213220
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:"
214221
msgstr ""
215222

216223
#. type: Bullet: '1. '
217-
#: en/intro/upgrade-from-v2.md
224+
#: ../../guide/en/intro/upgrade-from-v2.md
218225
msgid "Exactly the same environment as in production."
219226
msgstr ""
220227

221228
#. type: Bullet: '2. '
222-
#: en/intro/upgrade-from-v2.md
229+
#: ../../guide/en/intro/upgrade-from-v2.md
223230
msgid "No need to install anything except Docker itself."
224231
msgstr ""
225232

226233
#. type: Bullet: '3. '
227-
#: en/intro/upgrade-from-v2.md
234+
#: ../../guide/en/intro/upgrade-from-v2.md
228235
msgid "Environment is per application, not per server."
229236
msgstr ""
230237

231238
#. type: Title ###
232-
#: en/intro/upgrade-from-v2.md
239+
#: ../../guide/en/intro/upgrade-from-v2.md
233240
#, no-wrap
234241
msgid "Environment variables"
235242
msgstr ""
236243

237244
#. type: Plain text
238-
#: en/intro/upgrade-from-v2.md
245+
#: ../../guide/en/intro/upgrade-from-v2.md
239246
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."
240247
msgstr ""
241248

242249
#. type: Title ###
243-
#: en/intro/upgrade-from-v2.md
250+
#: ../../guide/en/intro/upgrade-from-v2.md
244251
#, no-wrap
245252
msgid "Handlers"
246253
msgstr ""
247254

248255
#. type: Plain text
249-
#: en/intro/upgrade-from-v2.md
256+
#: ../../guide/en/intro/upgrade-from-v2.md
250257
msgid "Unlike Yii2, Yii3 doesn't have controllers per se. Instead, it uses [handlers](../structure/handler.md) which are similar to controllers but different."
251258
msgstr ""
252259

253-
#. type: Title ###
254-
#: en/intro/upgrade-from-v2.md
255-
#, no-wrap
256-
msgid "Application structure"
257-
msgstr ""
258-
259260
#. type: Plain text
260-
#: en/intro/upgrade-from-v2.md
261+
#: ../../guide/en/intro/upgrade-from-v2.md
261262
msgid "Suggested Yii3 application structure is different from Yii 2. It's described in [application structure](../structure/overview.md)."
262263
msgstr ""
263264

264265
#. type: Plain text
265-
#: en/intro/upgrade-from-v2.md
266+
#: ../../guide/en/intro/upgrade-from-v2.md
266267
msgid "Despite that, Yii3 is flexible, so it's still possible to use a structure similar to Yii 2 with Yii 3."
267268
msgstr ""

0 commit comments

Comments
 (0)