Skip to content

Conversation

@stipic
Copy link

@stipic stipic commented Sep 7, 2023

I understand that this was not put on purpose, but I believe that it would be useful for most people, because when generating a lot of commands, in 99% of cases I have to manually write this generic code to be able to do dependency injection

)]
class <?= $class_name; ?> extends Command
{
public function __construct()
Copy link
Member

Choose a reason for hiding this comment

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

Should we have this?

Suggested change
public function __construct()
public function __construct(string $name = null)

Copy link
Author

Choose a reason for hiding this comment

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

@weaverryan
Copy link
Member

Thanks @stipic!

@weaverryan weaverryan merged commit 67e0e9f into symfony:main Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants