8000 [Console] Add default parameter (true) for Command::setHidden() · symfony/symfony@e2ede07 · GitHub
[go: up one dir, main page]

Skip to content

Commit e2ede07

Browse files
committed
[Console] Add default parameter (true) for Command::setHidden()
1 parent 07818f2 commit e2ede07

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

UPGRADE-5.1.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
UPGRADE FROM 5.0 to 5.1
22
=======================
33

4+
Console
5+
-------
6+
7+
* `Command::setHidden()` is final since Symfony 5.1
8+
49
EventDispatcher
510
---------------
611

UPGRADE-6.0.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
UPGRADE FROM 5.x to 6.0
22
=======================
33

4+
Console
5+
-------
6+
7+
* `Command::setHidden()` has a default value (`true`) for `$hidden` parameter
8+
49
EventDispatcher
510
---------------
611

src/Symfony/Component/Console/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
5.1.0
55
-----
66

7+
* `Command::setHidden()` is final since Symfony 5.1
78
* Add `SingleCommandApplication`
89

910
5.0.0

src/Symfony/Component/Console/Command/Command.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,13 @@ public function getName()
450450

451451
/**
452452
* @param bool $hidden Whether or not the command should be hidden from the list of commands
453+
* The default value will be true in Symfony 6.0
453454
*
454455
* @return Command The current instance
456+
*
457+
* @final since Symfony 5.1
455458
*/
456-
public function setHidden(bool $hidden)
459+
public function setHidden(bool $hidden /*= true*/)
457460
{
458461
$this->hidden = $hidden;
459462

0 commit comments

Comments
 (0)
0