Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[FrameworkBundle] Deprecate ContainerAwareCommand#28415

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromchalasr:deprec-ct-aware-cmd
Sep 10, 2018

Conversation

@chalasr
Copy link
Member

@chalasrchalasr commentedSep 9, 2018
edited
Loading

QA
Branch?master
Bug fix?no
New feature?no
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRsymfony/symfony-docs#10307

Follow up of the recentController deprecation.

I think people are widely used to register their commands as services and use proper dependency injection, we made the move for core commands in 3.4, let's deprecateContainerAwareCommand for 4.2.

ro0NL, gmponos, Koc, and apfelbox reacted with thumbs up emoji
@chalasr
Copy link
MemberAuthor

rebased

@fabpot
Copy link
Member

Thank you@chalasr.

@fabpotfabpot merged commit744bf0e intosymfony:masterSep 10, 2018
fabpot added a commit that referenced this pull requestSep 10, 2018
…lasr)This PR was merged into the 4.2-dev branch.Discussion----------[FrameworkBundle] Deprecate ContainerAwareCommand| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets | n/a| License       | MIT| Doc PR        |symfony/symfony-docs#10307Follow up of the recent `Controller` deprecation.I think people are widely used to register their commands as services and use proper dependency injection, we made the move for core commands in 3.4, let's deprecate `ContainerAwareCommand` for 4.2.Commits-------744bf0e [FrameworkBundle] Deprecate ContainerAwareCommand
@chalasrchalasr deleted the deprec-ct-aware-cmd branchSeptember 10, 2018 08:36
javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestSep 10, 2018
…AwareCommand (chalasr, javiereguiluz)This PR was merged into the master branch.Discussion----------[Console] Remove mentions about the deprecated ContainerAwareCommandRelated tosymfony/symfony#28415Commits-------4143835 Maintained a note about ContainerAwareCommand being deprecatedf3e8f0e [WCM][Console] Remove mentions about the deprecated ContainerAwareCommand class
@Tobion
Copy link
Contributor

The swiftmailer-bundle (https://github.com/symfony/swiftmailer-bundle/tree/master/Command) and doctrine-bundle (https://github.com/doctrine/DoctrineBundle/blob/master/Command/DoctrineCommand.php) need to be fixed for this.

dmaicher reacted with thumbs up emoji

@HTMLGuyLLC
Copy link

Ok, so I was updating my code to remove this deprecated class and I ran into a potential roadblock.

Without rewriting code, how can I call a controller in a command without the container being accessible like it was previously?

@chalasr
Copy link
MemberAuthor

@HTMLGuyLLC The deprecation notice says "use dependency-injection instead". Your controller is a service, you should be able to inject it in your command as any dependency.
If it does not help, please open a new issue rather than commenting on a merged PR. Thanks.

@HTMLGuyLLC
Copy link

@chalasr I know what it says and that's what I'm doing with all my other dependencies. I didn't know the container was a service. Thank you.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@javiereguiluzjaviereguiluzjaviereguiluz approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@NyholmNyholmNyholm approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.2

Development

Successfully merging this pull request may close these issues.

8 participants

@chalasr@fabpot@Tobion@HTMLGuyLLC@javiereguiluz@nicolas-grekas@Nyholm@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp