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

[DependencyInjection] Do not trigger deprecation when injecting private services#19682

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

Conversation

@wouterj
Copy link
Member

QA
Branch?master
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#19680
LicenseMIT
Doc PR-

The deprecation notice should not be triggered when a private service is injected. This PR adds a virtual third argument toget() to disable triggering the deprecation notice when getting from the dumped container.

ogizanagi, linaori, and chalasr reacted with thumbs up emoji
@wouterjwouterj changed the titleIssue 19680/injected private services[DependencyInjection] Do not trigger deprecation when injecting private servicesAug 20, 2016
@ro0NL
Copy link
Contributor

ro0NL commentedAug 20, 2016
edited
Loading

I prefer a fix that doesnt allow accessing prrivate services viapublic get. This is a workaround :)

We deprecateget('private'), but addget('private', $x, $giveMePrivate).

@nicolas-grekas
Copy link
Member

See#19708

@wouterjwouterj deleted the issue-19680/injected-private-services branchAugust 22, 2016 17:49
fabpot added a commit that referenced this pull requestSep 1, 2016
…ces internally (nicolas-grekas)This PR was merged into the 3.2-dev branch.Discussion----------[DI] Dont use Container::get() when fetching private services internally| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#19683,#19682,#19680| License       | MITAs spotted by@wouterj, we forgot to remove the deprecation notice when doing internal calls to get private services.Yet, we don't need to get through this `get()` method, because we can already resolve many things at compile time for private services. This will provide another small performance optim, and fix the issue.Commits-------a9c79fb [DI] Dont use Container::get() when fetching private services internally
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@wouterj@ro0NL@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp