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

[Cookbook][Security] Update Voters: add class properties#3211

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
weaverryan merged 1 commit intosymfony:2.2fromkrizon:patch-1
Nov 28, 2013
Merged

[Cookbook][Security] Update Voters: add class properties#3211

weaverryan merged 1 commit intosymfony:2.2fromkrizon:patch-1
Nov 28, 2013

Conversation

krizon
Copy link
Contributor

QA
Doc fix?yes
New docs?no
Applies to2.2 only (issue is fixed for 2.3+ in#3216)
Fixed tickets-

Added class properties.

private $request;
private $blacklistedIp;

public function __construct(Request $request, array $blacklistedIp = array())
Copy link
Contributor

Choose a reason for hiding this comment

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

i wonder if we should start using the request_stack?

Copy link
Member

Choose a reason for hiding this comment

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

we can do that, but not for 2.2.

@wouterj
Copy link
Member

This can cause "not in scope"-errors. I haven't test this, let's wait what@weaverryan think about this. However, as of Symfony 2.3, we should use the request_stack here, as suggested by@cordoval

@krizon
Copy link
ContributorAuthor

Good point, i can update this PR to only add the class properties since they were missing. I was a bit over-enthusiastic with the rest of the changes ;). Thanks for the feedback.

@wouterj
Copy link
Member

yeah, I think that's the best. And if you are enthousiast, you can create a PR for 2.3 using request_stack ;-)

@xabbuh
Copy link
Member

Otherwise, you should change the service definition as well. :)

@wouterj
Copy link
Member

FYI, someone just submitted a change for 2.3 (I hope he'll correct his PR):#3216

@krizon
Copy link
ContributorAuthor

Updated PR, only adds class properties now.

@@ -67,6 +67,9 @@ and compare the IP address against a set of blacklisted IP addresses:

class ClientIpVoter implements VoterInterface
{
private $container;
Copy link
Member

Choose a reason for hiding this comment

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

add a blank line between the properties

Copy link
Member

Choose a reason for hiding this comment

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

Why?

Copy link
Member

Choose a reason for hiding this comment

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

Thought it was part of PSR-2. But it turns out that this seems to be only my personal taste.

Copy link
Contributor

Choose a reason for hiding this comment

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

personal taste is personal 👶

Copy link
Member

Choose a reason for hiding this comment

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

my fault

@krizon
Copy link
ContributorAuthor

Fixed the issues reported by@xabbuh, thanks

weaverryan added a commit that referenced this pull requestNov 28, 2013
[Cookbook][Security] Update Voters: add class properties
@weaverryanweaverryan merged commit21cc0ee intosymfony:2.2Nov 28, 2013
@weaverryan
Copy link
Member

Hi guys!

Nice work on this - I completely agree that we should use the container here and then handle it better in Symfony 2.4 with the request stack (#3220).

Thanks!

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@krizon@wouterj@xabbuh@weaverryan@cordoval

[8]ページ先頭

©2009-2025 Movatter.jp