Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Dotenv] Remove DebugCommand::$defaultName and $defaultDescription #60847

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
Jun 20, 2025
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
15 changes: 0 additions & 15 deletions src/Symfony/Component/Console/Tests/Command/CommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,14 +463,6 @@ public function testCommandAttribute()
$this->assertSame(['f'], $command->getAliases());
}

public function testAttributeOverridesProperty()
{
$command = new MyAnnotatedCommand();

$this->assertSame('my:command', $command->getName());
$this->assertSame('This is a command I wrote all by myself', $command->getDescription());
}

public function testDefaultCommand()
{
$apl = new Application();
Expand Down Expand Up @@ -507,10 +499,3 @@ class Php8Command2 extends Command
{
}

#[AsCommand(name: 'my:command', description: 'This is a command I wrote all by myself')]
class MyAnnotatedCommand extends Command
{
protected static $defaultName = 'i-shall-be-ignored';

protected static $defaultDescription = 'This description should be ignored.';
}
10 changes: 0 additions & 10 deletions src/Symfony/Component/Dotenv/Command/DebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,6 @@
#[AsCommand(name: 'debug:dotenv', description: 'List all dotenv files with variables and values')]
final class DebugCommand extends Command
{
/**
* @deprecated since Symfony 6.1
*/
protected static $defaultName = 'debug:dotenv';

/**
* @deprecated since Symfony 6.1
*/
protected static $defaultDescription = 'List all dotenv files with variables and values';

public function __construct(
private string $kernelEnvironment,
private string $projectDirectory,
Expand Down
5 changes: 5 additions & 0 deletions src/Symfony/Component/Form/CHANGELOG.md
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad, I edited the wrong changelog. Thanks @fabpot for the fix 478f5c3

Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

8.0
---

* Remove `$defaultName` and `$defaultDescription` properties from `DebugCommand` command, configuration is done through the `#[AsCommand]` attribute

7.4
---

Expand Down
Loading