Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Console] Set Command::setHidden() final for adding default param in SF 6.0 #35402

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions 5 UPGRADE-5.1.md
Original file line number Diff line number Diff line change
@@ -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 5 UPGRADE-6.0.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
UPGRADE FROM 5.x to 6.0
=======================

Console
-------

* `Command::setHidden()` has a default value (`true`) for `$hidden` parameter
chalasr marked this conversation as resolved.
Show resolved Hide resolved

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

Expand Down
1 change: 1 addition & 0 deletions 1 src/Symfony/Component/Console/CHANGELOG.md
Original file line number Diff line number Diff line change
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 5 src/Symfony/Component/Console/Command/Command.php
Original file line number Diff line number Diff line change
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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.