10000 [SecurityBundle] Fixed a memory leak in SecurityBundle\Security\FirewallMap by udavka · Pull Request #22605 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[SecurityBundle] Fixed a memory leak in SecurityBundle\Security\FirewallMap #22605

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed code style, tests
  • Loading branch information
udavka committed May 1, 2017
commit 8fa062c755183242af5a4a26d8041c1163528baa
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public function getListeners(Request $request);
* Cleans up the internal state of the firewall map.
*
* @param Request $request
* @return void
*/
public function detachListeners(Request $request);
Copy link
Member

Choose a reason for hiding this comment

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

Adding a new method to an interface is a BC break and not allowed by our BC promise.

Copy link
Author

Choose a reason for hiding this comment

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

Fixed by replacing the implementation.

}
16 changes: 8 additions & 8 deletions src/Symfony/Component/Security/Http/Tests/FirewallMapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,22 @@ public function testDetachListeners()
{
$map = new FirewallMap();

$request1 = new Request();
$request1 = new Request(['id' => 1]);
$matchingMatcher1 = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock();
$matchingMatcher1
->expects($this->once())
->method('matches')
->with($this->equalTo($request1))
->will($this->returnValue(true))
->will($this->returnCallback(function(Request $request) {
return $request->query->get('id') === 1;
}))
;

$request2 = new Request();
$request2 = new Request(['id' => 2]);
$matchingMatcher2 = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestMatcher')->getMock();
$matchingMatcher2
->expects($this->once())
->method('matches')
->with($this->equalTo($request2))
->will($this->returnValue(true))
->will($this->returnCallback(function(Request $request) {
return $request->query->get('id') === 2;
}))
;

$theListener = $this->getMockBuilder('Symfony\Component\Security\Http\Firewall\ListenerInterface')->getMock();
Expand Down
0