Skip to content

[Console] Replace useless usage of ContainerAwareCommand #10219

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
Aug 24, 2018
Merged

[Console] Replace useless usage of ContainerAwareCommand #10219

merged 1 commit into from
Aug 24, 2018

Conversation

gregurco
Copy link
Contributor

Hello.
Since SF 4.0 there is no need to use ContainerAwareCommand and injection through constructor. I removed usage of ContainerAwareCommand and added call of parent constructor because there is an error without it:

[WARNING] Some commands could not be registered:                                                                       
Command class "App\Command\CommandName" is not correctly initialized. You probably forgot to call the parent constructor.  

@xabbuh xabbuh added this to the 4.1 milestone Aug 24, 2018
@xabbuh
Copy link
Member

xabbuh commented Aug 24, 2018

Good catch, thanks @gregurco.

@xabbuh xabbuh merged commit 0d1696c into symfony:4.1 Aug 24, 2018
xabbuh added a commit that referenced this pull request Aug 24, 2018
… (gregurco)

This PR was merged into the 4.1 branch.

Discussion
----------

[Console] Replace useless usage of ContainerAwareCommand

Hello.
Since SF 4.0 there is no need to use `ContainerAwareCommand` and injection through constructor. I removed usage of `ContainerAwareCommand` and added call of parent `constructor` because there is an error without it:
```
[WARNING] Some commands could not be registered:
Command class "App\Command\CommandName" is not correctly initialized. You probably forgot to call the parent constructor.
```

Commits
-------

0d1696c [Console] Replace useless usage of ContainerAwareCommand
@gregurco gregurco deleted the patch-console-request-context branch August 24, 2018 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants