Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions en/appendices/5-3-migration-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ Console

- Added ``TreeHelper`` which outputs an array as a tree such as an array of filesystem
directories as array keys and files as lists under each directory.
- Commands can now implement ``getGroup()`` to customize how commands are
grouped in ``bin/cake -h`` output.

Core
----
Expand Down
18 changes: 18 additions & 0 deletions en/console-commands/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,24 @@ As well as in the help section of your command:
Usage:
cake user [-h] [-q] [-v]

Grouping Commands
=================

By default in the help output CakePHP will group commands into core, app, and
plugin groups. You can customize the grouping of commands by implementing
``getGroup()``:

class CleanupCommand extends Command
{
public static function getGroup(): string
{
return 'maintenance';
}
}

.. versionadded:: 5.3.0
Custom grouping support was added.

.. _console-integration-testing:

Testing Commands
Expand Down
Loading