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] Lazy load request matchers in FirewallMap#21451

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:masterfromchalasr:firewall/lazy-contexts
Jan 31, 2017

Conversation

@chalasr
Copy link
Member

@chalasrchalasr commentedJan 29, 2017
edited
Loading

QA
Branch?3.3
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?yes
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRn/a

@nicolas-grekas
Copy link
Member

👍

private$contexts;

publicfunction__construct(ContainerInterface$container,array$map)
publicfunction__construct(ContainerInterface$container,$map)
Copy link
Member

Choose a reason for hiding this comment

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

map is protected, not private. So, that's a BC break.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Is there any possible upgrade path?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Or is it acceptable if documented? I'll close if nothing can be done

Copy link
Member

Choose a reason for hiding this comment

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

I doubt many users are actually overriding this class (perhaps JMS security bundle?) but I would do it only in 4.0 with proper docs.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

perhaps JMS security bundle

Even not. Let's close then

@chalasrchalasr deleted the firewall/lazy-contexts branchJanuary 30, 2017 16:21
@fabpot
Copy link
Member

Instead of closing it, what about documenting the change in the CHANGELOG/UPGRADE files and target 4.0?

@chalasrchalasr restored the firewall/lazy-contexts branchJanuary 30, 2017 16:23
@chalasrchalasr reopened thisJan 30, 2017
@chalasrchalasrforce-pushed thefirewall/lazy-contexts branch 2 times, most recently fromf9db833 to81e0d5bCompareJanuary 30, 2017 16:32
@chalasr
Copy link
MemberAuthor

Let's do that. Target and CHANGELOG/UPGRADE files updated, this should be removed from the 3.3 milestone

@fabpotfabpot modified the milestones:4.0,3.3Jan 30, 2017
@fabpot
Copy link
Member

Changed the milestone to 4.0.

@nicolas-grekas
Copy link
Member

But wecan create a smooth upgrade path: let's deprecate$map.
See#20769 for inspiration.

@chalasrchalasrforce-pushed thefirewall/lazy-contexts branch 2 times, most recently from46cb2c3 to8b24706CompareJanuary 30, 2017 17:11
@chalasr
Copy link
MemberAuthor

@nicolas-grekas Updated, thank you.

@fabpot Is it ok for you?

@chalasrchalasrforce-pushed thefirewall/lazy-contexts branch 2 times, most recently from4212d7e to62dfc3dCompareJanuary 30, 2017 17:16
@fabpot
Copy link
Member

👍

/**
* @deprecated since version 3.3, to be removed in 4.0 alongside with magic methods below
*/
protected$map;

Choose a reason for hiding this comment

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

should be made private

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Better indeed :)

publicfunction__get($name)
{
if ('map' ===$name) {
@trigger_error(sprintf('Using the "%1$s::$map" property is deprecated since version 3.3 as it will be removed in 4.0. Use "%1$s::$contextMap" instead.',__CLASS__),E_USER_DEPRECATED);

Choose a reason for hiding this comment

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

should we do an$this->map = iterator_to_array($this->contextMap, false) when appropriate?

Choose a reason for hiding this comment

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

also: contextMap is private, so it can't be used "instead". any other suggestions?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

should we do an $this->map = iterator_to_array($this->contextMap, false) when appropriate?

👍 though you say$use_keys = false but keys are important here, done

also: contextMap is private, so it can't be used "instead". any other suggestions?

nope, fixed

publicfunction__isset($name)
{
if ('map' ===$name) {
@trigger_error(sprintf('Using the "%1$s::$map" property is deprecated since version 3.3 as it will be removed in 4.0. Use ""',__CLASS__),E_USER_DEPRECATED);

Choose a reason for hiding this comment

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

use ""

@chalasr
Copy link
MemberAuthor

Milestone should be changed, again :)

@nicolas-grekasnicolas-grekas added this to the3.3 milestoneJan 30, 2017
@nicolas-grekasnicolas-grekas removed this from the4.0 milestoneJan 30, 2017
* @deprecated since version 3.3, to be removed in 4.0 alongside with magic methods below
*/
private$map;
protected$container;

Choose a reason for hiding this comment

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

so, no deprecation of this prop?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Another IteratorArgument as locator could do the job. WDYT?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Done in my last commit, let me know if I should revert or keep

Copy link
MemberAuthor

@chalasrchalasrJan 30, 2017
edited
Loading

Choose a reason for hiding this comment

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

Oops, nevermind. That does not work. Definitely needs#20658 for that. Sorry for the noise

@chalasrchalasrforce-pushed thefirewall/lazy-contexts branch 2 times, most recently from311f90f tob51d617CompareJanuary 30, 2017 21:06
* @deprecated since version 3.3, to be removed in 4.0 alongside with magic methods below
*/
private$map;
protected$container;

Choose a reason for hiding this comment

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

Still, does this prop need to be protected?

if ('map' ===$name) {
@trigger_error(sprintf('Using the "%s::$map" property is deprecated since version 3.3 as it will be removed in 4.0.',__CLASS__),E_USER_DEPRECATED);

if ($this->contextMapinstanceof \Iterator) {

Choose a reason for hiding this comment

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

missingnull === $this->map check?

@chalasrchalasrforce-pushed thefirewall/lazy-contexts branch 3 times, most recently from6625b75 toa171dbcCompareJanuary 31, 2017 08:24
@chalasr
Copy link
MemberAuthor

@nicolas-grekas deprecated using$container and addressed your comments.

$this->map =$map;
$this->contexts =new \SplObjectStorage();
$this->contextCache =new \SplObjectStorage();
$this->contextMap =$contextMap;

Choose a reason for hiding this comment

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

do we really need to change the name of these props? we'd better keep it as is for a small diff if we can

Copy link
MemberAuthor

@chalasrchalasrJan 31, 2017
edited
Loading

Choose a reason for hiding this comment

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

Reverted$contextCache to$contexts. About$contextMap if we want to keep it called$map we can't donull === $this->map and return the iterator as array, right? I think we can't

@chalasrchalasrforce-pushed thefirewall/lazy-contexts branch 2 times, most recently from7c27a67 tod2e0798CompareJanuary 31, 2017 19:42
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.

👍

* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*/
class FirewallMapimplements FirewallMapInterface
class FirewallMapextends _FireWallMapimplements FirewallMapInterface
Copy link
Member

Choose a reason for hiding this comment

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

Typo: should be_FirewallMap

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

good catch

3.3.0
-----

* Deprecated the`FirewallMap::$map` and`$container` properties.
Copy link
Member

Choose a reason for hiding this comment

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

extra space beforeand

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

fixed

@fabpot
Copy link
Member

Thank you@chalasr.

@fabpotfabpot merged commit5b72cf6 intosymfony:masterJan 31, 2017
fabpot added a commit that referenced this pull requestJan 31, 2017
…lMap (chalasr)This PR was merged into the 3.3-dev branch.Discussion----------[SecurityBundle] Lazy load request matchers in FirewallMap| Q             | A| ------------- | ---| Branch?       | 3.3| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets | n/a| License       | MIT| Doc PR        | n/aCommits-------5b72cf6 [Security] Lazy load request matchers
@fabpotfabpot mentioned this pull requestMay 1, 2017
@chalasrchalasr deleted the firewall/lazy-contexts branchMay 10, 2017 16:45
nicolas-grekas added a commit that referenced this pull requestMay 21, 2017
…sses (chalasr)This PR was merged into the 4.0-dev branch.Discussion----------Remove deprecated container injections and compiler passes| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | no| BC breaks?    | yes| Deprecations? | no| Tests pass?   | yes| Fixed tickets | ~~#21451#21625#21284#22010~~#22805| License       | MIT| Doc PR        | n/aCommits-------16a2fcf Remove deprecated container injections and compiler passes
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

4 participants

@chalasr@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp