Skip to content

Commit 346ea5b

Browse files
authored
Merge pull request #8121 from cakephp/5.next-command-collection
Document replace function to command collection
2 parents f43f031 + 72a5986 commit 346ea5b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ Console
9595
directories as array keys and files as lists under each directory.
9696
- Commands can now implement ``getGroup()`` to customize how commands are
9797
grouped in ``bin/cake -h`` output.
98+
- ``CommandCollection::replace()`` was added. This method allows you to replace
99+
an existing command in the collection without needing to remove and re-add it.
100+
This is particularly useful when using ``autoDiscover`` and you want to replace
101+
a command with a customized version.
98102

99103
Core
100104
----

0 commit comments

Comments
 (0)