File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ Console
9292
9393- Added ``TreeHelper `` which outputs an array as a tree such as an array of filesystem
9494 directories as array keys and files as lists under each directory.
95+ - Commands can now implement ``getGroup() `` to customize how commands are
96+ grouped in ``bin/cake -h `` output.
9597
9698Core
9799----
Original file line number Diff line number Diff line change @@ -289,6 +289,24 @@ As well as in the help section of your command:
289289 Usage:
290290 cake user [-h] [-q] [-v]
291291
292+ Grouping Commands
293+ =================
294+
295+ By default in the help output CakePHP will group commands into core, app, and
296+ plugin groups. You can customize the grouping of commands by implementing
297+ ``getGroup() ``:
298+
299+ class CleanupCommand extends Command
300+ {
301+ public static function getGroup(): string
302+ {
303+ return 'maintenance';
304+ }
305+ }
306+
307+ .. versionadded :: 5.3.0
308+ Custom grouping support was added.
309+
292310.. _console-integration-testing :
293311
294312Testing Commands
You can’t perform that action at this time.
0 commit comments