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]message_bus alias public#28216

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:4.1fromsroze:message-bus-alias-public
Aug 19, 2018

Conversation

@sroze
Copy link
Contributor

QA
Branch?4.1
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#28215
LicenseMIT
Doc PRø

Because it is used in theControllerTrait withget('message_bus')... same than forsecurity.csrf.token_manager and cie, it should be public.

@chalasr
Copy link
Member

chalasr commentedAug 17, 2018
edited
Loading

ControllerTrait deals with a service locator, services provided by a service locator do not need to be public (and should not).
I see no good reason for making the command bus public, container aware stuff make no sense anymore (really since 4.1).

@chalasr
Copy link
Member

hmm, ControllerTrait is used by the FrameworkBundle'sController class...

@nicolas-grekasnicolas-grekas added this to the4.1 milestoneAug 17, 2018
@nicolas-grekas
Copy link
Member

It's time to deprecateController :)

chalasr, yceruto, sroze, curry684, and apfelbox reacted with thumbs up emoji

@sroze
Copy link
ContributorAuthor

In the meantime... this is still a bug to fix 🙃


if ($busId ===$config['default_bus']) {
$container->setAlias('message_bus',$busId);
$container->setAlias('message_bus',$busId)->setPublic(true);
Copy link
Member

Choose a reason for hiding this comment

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

or$container->setAlias('message_bus', new Alias($busId, true));

Choose a reason for hiding this comment

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

Yep. using setPublic is more explicit to me :)

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

Sadly :)

@MatTheCat
Copy link
Contributor

What would be the consequence of removingController ? Would impacted controllers have to useControllerTrait ?

@nicolas-grekas
Copy link
Member

ControllerTrait is internal. The consequence would be to ask people to use AbstractController instead.

@fabpot
Copy link
Member

Thank you@sroze.

@fabpotfabpot merged commit51b6e9e intosymfony:4.1Aug 19, 2018
fabpot added a commit that referenced this pull requestAug 19, 2018
This PR was merged into the 4.1 branch.Discussion----------[FrameworkBundle] `message_bus` alias public| Q             | A| ------------- | ---| Branch?       | 4.1| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#28215| License       | MIT| Doc PR        | øBecause it is used in the `ControllerTrait` with `get('message_bus')`... same than for `security.csrf.token_manager` and cie, it should be public.Commits-------51b6e9e Make the `message_bus` alias public
@MatTheCat
Copy link
Contributor

Oh okay I better useAbstractController right now then?

@sroze
Copy link
ContributorAuthor

sroze commentedAug 21, 2018 via email

Yep. I'll send a PR to deprecate it :)
On Tue, Aug 21, 2018 at 11:14 AM Mathieu ***@***.***> wrote: Oh okay I better use AbstractController right now then? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#28216 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAxHEXgVazULdjG3QsEcAyV1ntUeGhEiks5uS8-NgaJpZM4WBdQE> .

@fabpotfabpot mentioned this pull requestAug 28, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@xabbuhxabbuhxabbuh approved these changes

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.1

Development

Successfully merging this pull request may close these issues.

7 participants

@sroze@chalasr@nicolas-grekas@MatTheCat@fabpot@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp