Skip to content

Commit

Permalink
[Console] Add default parameter (true) for Command::setHidden()
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Jan 22, 2020
1 parent 07818f2 commit e2ede07
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions UPGRADE-5.1.md
@@ -1,6 +1,11 @@
UPGRADE FROM 5.0 to 5.1
=======================

Console
-------

* `Command::setHidden()` is final since Symfony 5.1

EventDispatcher
---------------

Expand Down
5 changes: 5 additions & 0 deletions UPGRADE-6.0.md
@@ -1,6 +1,11 @@
UPGRADE FROM 5.x to 6.0
=======================

Console
-------

* `Command::setHidden()` has a default value (`true`) for `$hidden` parameter

EventDispatcher
---------------

Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/Console/CHANGELOG.md
Expand Up @@ -4,6 +4,7 @@ CHANGELOG
5.1.0
-----

* `Command::setHidden()` is final since Symfony 5.1
* Add `SingleCommandApplication`

5.0.0
Expand Down
5 changes: 4 additions & 1 deletion src/Symfony/Component/Console/Command/Command.php
Expand Up @@ -450,10 +450,13 @@ public function getName()

/**
* @param bool $hidden Whether or not the command should be hidden from the list of commands
* The default value will be true in Symfony 6.0
*
* @return Command The current instance
*
* @final since Symfony 5.1
*/
public function setHidden(bool $hidden)
public function setHidden(bool $hidden /*= true*/)
{
$this->hidden = $hidden;

Expand Down

0 comments on commit e2ede07

Please sign in to comment.