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] Mark cache.default_*_provider services private#20577

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:3.1fromnicolas-grekas:cache-alias-private
Nov 21, 2016

Conversation

@nicolas-grekas
Copy link
Member

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

I know making a service private has a potential for breaking BC. Yet, these services should not be used directly in controllers/userland code, and I really doubt anyone did. Let's make it private now and fix linked issue (even if it's a false positive from SymfonyServiceDefinitionValidator, it shows we have this service that really isn't meant to be public).

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commit09adfda intosymfony:3.1Nov 21, 2016
fabpot added a commit that referenced this pull requestNov 21, 2016
…rivate (nicolas-grekas)This PR was merged into the 3.1 branch.Discussion----------[FrameworkBundle] Mark cache.default_*_provider services private| Q             | A| ------------- | ---| Branch?       | 3.1| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#20563| License       | MIT| Doc PR        | -I know making a service private has a potential for breaking BC. Yet, these services should not be used directly in controllers/userland code, and I really doubt anyone did. Let's make it private now and fix linked issue (even if it's a false positive from SymfonyServiceDefinitionValidator, it shows we have this service that really isn't meant to be public).Commits-------09adfda [FrameworkBundle] Mark cache.default_*_provider services private
foreach (array('doctrine','psr6','redis')as$name) {
if (isset($config[$name ='default_'.$name.'_provider'])) {
$container->setAlias('cache.'.$name,Compiler\CachePoolPass::getServiceProvider($container,$config[$name]));
$container->getAlias('cache.'.$name)->setPublic(false);
Copy link
Member

Choose a reason for hiding this comment

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

you could even set it as private directly instead of getting the alias again:

setAlias('cache.'.$name, new Alias(..., false));

@nicolas-grekasnicolas-grekas deleted the cache-alias-private branchNovember 22, 2016 15:07
@fabpotfabpot mentioned this pull requestNov 27, 2016
fabpot added a commit that referenced this pull requestNov 29, 2016
…(xabbuh)This PR was merged into the 3.1 branch.Discussion----------[FrameworkBundle] mark alias as private during creation| Q             | A| ------------- | ---| Branch?       | 3.1| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#20577 (comment)| License       | MIT| Doc PR        | n/aCommits-------828c761 mark alias as private during creation
@fabpotfabpot mentioned this pull requestDec 13, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@stofstofstof left review comments

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@nicolas-grekas@fabpot@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp