From e2ede070fa3a7a79702cd7b9d00d297576bf15fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Pineau?= Date: Mon, 20 Jan 2020 16:05:06 +0100 Subject: [PATCH] [Console] Add default parameter (true) for Command::setHidden() --- UPGRADE-5.1.md | 5 +++++ UPGRADE-6.0.md | 5 +++++ src/Symfony/Component/Console/CHANGELOG.md | 1 + src/Symfony/Component/Console/Command/Command.php | 5 ++++- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/UPGRADE-5.1.md b/UPGRADE-5.1.md index 6a0244b9b8eb..8c3de504a062 100644 --- a/UPGRADE-5.1.md +++ b/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 --------------- diff --git a/UPGRADE-6.0.md b/UPGRADE-6.0.md index f23602c7bd23..1f7c4b0916e5 100644 --- a/UPGRADE-6.0.md +++ b/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 --------------- diff --git a/src/Symfony/Component/Console/CHANGELOG.md b/src/Symfony/Component/Console/CHANGELOG.md index 902ef67fc90a..326a38505503 100644 --- a/src/Symfony/Component/Console/CHANGELOG.md +++ b/src/Symfony/Component/Console/CHANGELOG.md @@ -4,6 +4,7 @@ CHANGELOG 5.1.0 ----- + * `Command::setHidden()` is final since Symfony 5.1 * Add `SingleCommandApplication` 5.0.0 diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index b7bf16cfba2f..7b5fc07cfecd 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -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;