Skip to content

Commit dfc8e9d

Browse files
committed
docs: move notes up
1 parent 053d669 commit dfc8e9d

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

user_guide_src/source/cli/cli_generators.rst

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,24 @@ To view the full description and usage information on a particular generator, us
2020

2121
where ``<generator_command>`` will be replaced with the command to check.
2222

23+
.. note:: Do you need to have the generated code in a subfolder? Let's say if you want to create a controller
24+
class to reside in the ``Admin`` subfolder of the main ``Controllers`` folder, you will just need
25+
to prepend the subfolder to the class name, like this: ``php spark make:controller admin/login``. This
26+
command will create the ``Login`` controller in the ``Controllers/Admin`` subfolder with
27+
a namespace of ``App\Controllers\Admin``.
28+
29+
.. note:: Working on modules? Code generation will set the root namespace to a default of ``APP_NAMESPACE``.
30+
Should you need to have the generated code elsewhere in your module namespace, make sure to set
31+
the ``--namespace`` option in your command, e.g., ``php spark make:model blog --namespace Acme\Blog``.
32+
33+
.. warning:: Make sure when setting the ``--namespace`` option that the supplied namespace is a valid
34+
namespace defined in your ``$psr4`` array in ``Config\Autoload`` or defined in your composer autoload
35+
file. Otherwise, code generation will be interrupted.
36+
37+
.. warning:: Use of ``migrate:create`` to create migration files is now deprecated. It will be removed in
38+
future releases. Please use ``make:migration`` as replacement. Also, please use ``make:migration --session``
39+
to use instead of the deprecated ``session:migration``.
40+
2341
*******************
2442
Built-in Generators
2543
*******************
@@ -226,24 +244,6 @@ Options:
226244
* ``--suffix``: Append the component suffix to the generated class name.
227245
* ``--force``: Set this flag to overwrite existing files on destination.
228246

229-
.. note:: Do you need to have the generated code in a subfolder? Let's say if you want to create a controller
230-
class to reside in the ``Admin`` subfolder of the main ``Controllers`` folder, you will just need
231-
to prepend the subfolder to the class name, like this: ``php spark make:controller admin/login``. This
232-
command will create the ``Login`` controller in the ``Controllers/Admin`` subfolder with
233-
a namespace of ``App\Controllers\Admin``.
234-
235-
.. note:: Working on modules? Code generation will set the root namespace to a default of ``APP_NAMESPACE``.
236-
Should you need to have the generated code elsewhere in your module namespace, make sure to set
237-
the ``--namespace`` option in your command, e.g., ``php spark make:model blog --namespace Acme\Blog``.
238-
239-
.. warning:: Make sure when setting the ``--namespace`` option that the supplied namespace is a valid
240-
namespace defined in your ``$psr4`` array in ``Config\Autoload`` or defined in your composer autoload
241-
file. Otherwise, code generation will be interrupted.
242-
243-
.. warning:: Use of ``migrate:create`` to create migration files is now deprecated. It will be removed in
244-
future releases. Please use ``make:migration`` as replacement. Also, please use ``make:migration --session``
245-
to use instead of the deprecated ``session:migration``.
246-
247247
****************************************
248248
Scaffolding a Complete Set of Stock Code
249249
****************************************

0 commit comments

Comments
 (0)