Skip to content

Commit 101b74f

Browse files
committed
[Console] Add default parameter (true) for Command::setHidden()
1 parent b716431 commit 101b74f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

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

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)