Skip to content

Commit 3bd64a2

Browse files
committed
Merge branch '5.x' into 5.next
2 parents de49e29 + e5b2f5e commit 3bd64a2

19 files changed

+549
-1790
lines changed

en/appendices/5-0-migration-guide.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ Console
6868
- ``BaseCommand::__construct()`` was removed.
6969
- ``ConsoleIntegrationTestTrait::useCommandRunner()`` was removed since it's no longer needed.
7070
- ``Shell`` has been removed and should be replaced with `Command <https://book.cakephp.org/5/en/console-commands/commands.html>`__
71+
- ``ConsoleOptionParser::addSubcommand()`` was removed alongside the removal of
72+
``Shell``. Subcommands should be replaced with ``Command`` classes that
73+
implement ``Command::defaultName()`` to define the necessary command name.
7174
- ``BaseCommand`` now emits ``Command.beforeExecute`` and
7275
``Command.afterExecute`` events around the command's ``execute()`` method
7376
being invoked by the framework.

en/console-commands/commands.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ Update the command class to the following::
482482
}
483483
}
484484

485-
Now that we have an interactive subcommand, we can add a test case that tests
485+
Now that we have an interactive command, we can add a test case that tests
486486
that we receive the proper response, and one that tests that we receive an
487487
incorrect response. Remove the ``testUpdateModified`` method and, add the following methods to
488488
**tests/TestCase/Command/UpdateTableCommandTest.php**::

en/console-commands/option-parsers.rst

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -194,32 +194,12 @@ Building a ConsoleOptionParser from an Array
194194

195195
.. php:method:: buildFromArray($spec)
196196
197-
As previously mentioned, when creating subcommand option parsers, you can define
198-
the parser spec as an array for that method. This can help make building
199-
subcommand parsers easier, as everything is an array::
200-
201-
$parser->addSubcommand('check', [
202-
'help' => __('Check the permissions between an ACO and ARO.'),
203-
'parser' => [
204-
'description' => [
205-
__("Use this command to grant ACL permissions. Once executed, the "),
206-
__("ARO specified (and its children, if any) will have ALLOW access "),
207-
__("to the specified ACO action (and the ACO's children, if any)."),
208-
],
209-
'arguments' => [
210-
'aro' => ['help' => __('ARO to check.'), 'required' => true],
211-
'aco' => ['help' => __('ACO to check.'), 'required' => true],
212-
'action' => ['help' => __('Action to check')],
213-
],
214-
],
215-
]);
216-
217-
Inside the parser spec, you can define keys for ``arguments``, ``options``,
218-
``description`` and ``epilog``. You cannot define ``subcommands`` inside an
219-
array style builder. The values for arguments, and options, should follow the
220-
format that :php:func:`Cake\\Console\\ConsoleOptionParser::addArguments()` and
197+
Option parsers can also be defined as arrays. Within the array, you can define
198+
keys for ``arguments``, ``options``, ``description`` and ``epilog``. The values
199+
for arguments, and options, should follow the format that
200+
:php:func:`Cake\\Console\\ConsoleOptionParser::addArguments()` and
221201
:php:func:`Cake\\Console\\ConsoleOptionParser::addOptions()` use. You can also
222-
use buildFromArray on its own, to build an option parser::
202+
use ``buildFromArray`` on its own, to build an option parser::
223203

224204
public function getOptionParser()
225205
{
@@ -287,8 +267,8 @@ returned as XML:
287267
cake bake --help xml
288268
cake bake -h xml
289269
290-
The above would return an XML document with the generated help, options,
291-
arguments and subcommands for the selected shell. A sample XML document would
270+
The above would return an XML document with the generated help, options, and
271+
arguments for the selected shell. A sample XML document would
292272
look like:
293273

294274
.. code-block:: xml

en/installation.rst

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -117,19 +117,35 @@ Each time you run ``php composer.phar update`` you will receive patch
117117
releases for this minor version. You can instead change this to ``^5.0`` to
118118
also receive the latest stable minor releases of the ``5.x`` branch.
119119

120-
Installation using Oven
120+
Installation using DDEV
121121
-----------------------
122122

123-
Another quick way to install CakePHP is via `Oven <https://github.com/CakeDC/oven>`_.
124-
It is a small PHP script which checks the necessary system requirements,
125-
and creates a new CakePHP application.
123+
Another quick way to install CakePHP is via `DDEV <https://ddev.com/>`_.
124+
It is an open source tool for launching local web development environments.
125+
126+
If you want to configure a new project, you just need::
127+
128+
mkdir my-cakephp-app
129+
cd my-cakephp-app
130+
ddev config --project-type=cakephp --docroot=webroot
131+
ddev composer create --prefer-dist cakephp/app:~5.0
132+
ddev launch
133+
134+
If you have an existing project::
135+
136+
git clone <your-cakephp-repo>
137+
cd <your-cakephp-project>
138+
ddev config --project-type=cakephp --docroot=webroot
139+
ddev composer install
140+
ddev launch
141+
142+
Please check `DDEV Docs <https://ddev.readthedocs.io/>`_ for details on how to install / update DDEV.
126143

127144
.. note::
128145

129146
IMPORTANT: This is not a deployment script. It is aimed to help developers
130-
install CakePHP for the first time and set up a development environment
131-
quickly. Production environments should consider several other factors, like
132-
file permissions, virtualhost configuration, etc.
147+
to set up a development environment quickly. It is not intended for
148+
production environments.
133149

134150
Permissions
135151
===========

es/installation.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,36 @@ Donde ``<branch>`` es el nombre del branch que quieres seguir. Cada vez que
9191
ejecutes ``php composer.phar update`` recibirás las últimas actualizaciones del
9292
branch seleccionado.
9393

94+
Instalación usando DDEV
95+
-----------------------
96+
97+
Otra manera rápida de instalar CakePHP es via `DDEV <https://ddev.com/>`_.
98+
DDEV es una herramienta de código abierto para lanzar ambientes de desarrollo web en local.
99+
100+
Si quieres configurar un nuevo proyecto, sólo necesitas ejecutar::
101+
102+
mkdir my-cakephp-app
103+
cd my-cakephp-app
104+
ddev config --project-type=cakephp --docroot=webroot
105+
ddev composer create --prefer-dist cakephp/app:~5.0
106+
ddev launch
107+
108+
Si tienes un proyecto existente::
109+
110+
git clone <your-cakephp-repo>
111+
cd <your-cakephp-project>
112+
ddev config --project-type=cakephp --docroot=webroot
113+
ddev composer install
114+
ddev launch
115+
116+
Por favor revisa la `Documentación de DDEV <https://ddev.readthedocs.io/>`_ para más detalles de cómo instalar / actualizar DDEV.
117+
118+
.. note::
119+
120+
IMPORTANTE: Ésto no es un script de despliegue. Su objetivo es ayudar desarrolladores a
121+
configurar ambientes de desarrollo rápidamente. En ningún caso su intención es que sea utilizado
122+
en ambientes de producción.
123+
94124
Permisos
95125
========
96126

ja/appendices.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,19 @@
44
ここでは、各バージョンで導入された新機能に関する情報と、
55
バージョン間の移行手順を解説します。
66

7-
4.x 移行ガイド
7+
5.x 移行ガイド
88
==============
99

1010
.. toctree::
1111
:maxdepth: 1
1212

13-
appendices/4-0-migration-guide
14-
appendices/4-1-migration-guide
15-
appendices/4-2-migration-guide
16-
appendices/4-3-migration-guide
17-
appendices/fixture-upgrade
13+
appendices/5-0-upgrade-guide
14+
appendices/5-0-migration-guide
1815

1916
後方互換性の補完
2017
================
2118

22-
3.x の挙動に関する対応が必要な場合、または段階的な移行に関する助けが必要な場合、
19+
4.x の挙動に関する対応が必要な場合、または段階的な移行に関する助けが必要な場合、
2320
`Shim プラグイン <https://github.com/dereuromark/cakephp-shim>`__ を確認してください。
2421
後方互換性を損なう変更を移行するのに役立ちます。
2522

0 commit comments

Comments
 (0)