Skip to content

Commit caa18f3

Browse files
feature #35402 [Console] Set Command::setHidden() final for adding default param in SF 6.0 (lyrixx)
This PR was merged into the 5.1-dev branch. Discussion ---------- [Console] Set Command::setHidden() final for adding default param in SF 6.0 | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- e2ede070fa [Console] Add default parameter (true) for Command::setHidden()
2 parents e6f1cb4 + 101b74f commit caa18f3

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)