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

[SecurityBundle] unhide debug security voter services#29169

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
nicolas-grekas merged 1 commit intosymfony:masterfromfmata:27914-followup
Nov 11, 2018
Merged

[SecurityBundle] unhide debug security voter services#29169

nicolas-grekas merged 1 commit intosymfony:masterfromfmata:27914-followup
Nov 11, 2018

Conversation

@fmata
Copy link
Contributor

@fmatafmata commentedNov 10, 2018
edited
Loading

QA
Branch?master
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
LicenseMIT

#27914 introducestestThatVotersAreNotDecoratedWithoutDebugMode() which tests if decorated services exist but uses a bad service name without starting dot.

Definition in the compiler pass :

if ($debug) {
// Decorate original voters with TraceableVoter
$debugVoterServiceId ='.debug.security.voter.'.$voterServiceId;
$container
->register($debugVoterServiceId, TraceableVoter::class)
->setDecoratedService($voterServiceId)
->addArgument(newReference($debugVoterServiceId.'.inner'))
->addArgument(newReference('event_dispatcher'));
}

The expected services are hidden and their name start with a dot. So the test will always pass, now it can fails :)

@nicolas-grekas
Copy link
Member

I'd prefer to "unhide" them instead, can you do that, please?
We hide services only when their name is garbage (eg when generating them using hashes)

@nicolas-grekasnicolas-grekas added this to the4.2 milestoneNov 11, 2018
@fmata
Copy link
ContributorAuthor

Indeed, it makes more sense. Done.

@fmatafmata changed the title[SecurityBundle] fix AddSecurityVotersPassTest::testThatVotersAreNotDecoratedWithoutDebugMode() using hidden service name[SecurityBundle] unhide debug security voter servicesNov 11, 2018
@nicolas-grekas
Copy link
Member

Thank you@fmata.

@nicolas-grekasnicolas-grekas merged commit4677bb4 intosymfony:masterNov 11, 2018
nicolas-grekas added a commit that referenced this pull requestNov 11, 2018
…mata)This PR was merged into the 4.2-dev branch.Discussion----------[SecurityBundle] unhide debug security voter services| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| License       | MIT#27914 introduces `testThatVotersAreNotDecoratedWithoutDebugMode()` which tests if decorated services exist but uses a bad service name without starting dot.Definition in the compiler pass :https://github.com/symfony/symfony/blob/a4204cd685c02377e6e2fbfc7ece98b5563644d9/src/Symfony/Bundle/SecurityBundle/DependencyInjection/Compiler/AddSecurityVotersPass.php#L58-L66The expected services are hidden and their name start with a dot. So the test will always pass, now it can fails :)Commits-------4677bb4 [SecurityBundle] unhide debug security voter services
@fmatafmata deleted the 27914-followup branchNovember 11, 2018 11:23
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.2

Development

Successfully merging this pull request may close these issues.

3 participants

@fmata@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp