summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2013-11-09 13:05:18 +0100
committerFabien Potencier <fabien.potencier@gmail.com>2013-11-09 13:05:18 +0100
commitcd107f089dc31f7d47c77149d1de8baabaa668d8 (patch)
tree035b8f21a6f90838347ab664246f22ce4653b5c0
parent7c39ba38abcfbe4786d85be3b0695207bcac0c9d (diff)
parenteeac1ab19ffa3e7de6ec255c57e3da45843f7326 (diff)
downloadsymfony-security-cd107f089dc31f7d47c77149d1de8baabaa668d8.zip
symfony-security-cd107f089dc31f7d47c77149d1de8baabaa668d8.tar.gz
symfony-security-cd107f089dc31f7d47c77149d1de8baabaa668d8.tar.bz2
minor #9427 adjust doctrine dependencies (Tobion)
This PR was merged into the master branch. Discussion ---------- adjust doctrine dependencies | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #9384, #9385 | License | MIT | Doc PR | - I went through all components/bundles/bridges in symfony and searched for doctrine dependencies. Then looked if it only requires a subset (annotations instead of common for example). Commits ------- 7366901 adjust doctrine dependencies
-rw-r--r--Acl/composer.json6
-rw-r--r--Core/composer.json5
-rw-r--r--Http/Tests/Firewall/LogoutListenerTest.php30
-rw-r--r--Http/composer.json5
-rw-r--r--composer.json15
5 files changed, 29 insertions, 32 deletions
diff --git a/Acl/composer.json b/Acl/composer.json
index 3d05989..0e68d9e 100644
--- a/Acl/composer.json
+++ b/Acl/composer.json
@@ -25,9 +25,9 @@
"psr/log": "~1.0"
},
"suggest": {
- "symfony/class-loader": "",
- "symfony/finder": "",
- "doctrine/dbal": "to use the built-in ACL implementation"
+ "symfony/class-loader": "For using the ACL generateSql script",
+ "symfony/finder": "For using the ACL generateSql script",
+ "doctrine/dbal": "For using the built-in ACL implementation"
},
"autoload": {
"psr-0": { "Symfony\\Component\\Security\\Acl\\": "" }
diff --git a/Core/composer.json b/Core/composer.json
index 4e7ff3a..7520be4 100644
--- a/Core/composer.json
+++ b/Core/composer.json
@@ -28,8 +28,9 @@
"suggest": {
"symfony/event-dispatcher": "",
"symfony/http-foundation": "",
- "symfony/validator": "",
- "ircmaxell/password-compat": ""
+ "symfony/validator": "For using the user password constraint",
+ "symfony/expression-language": "For using the expression voter",
+ "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5"
},
"autoload": {
"psr-0": { "Symfony\\Component\\Security\\Core\\": "" }
diff --git a/Http/Tests/Firewall/LogoutListenerTest.php b/Http/Tests/Firewall/LogoutListenerTest.php
index 719b684..c279523 100644
--- a/Http/Tests/Firewall/LogoutListenerTest.php
+++ b/Http/Tests/Firewall/LogoutListenerTest.php
@@ -37,22 +37,21 @@ class LogoutListenerTest extends \PHPUnit_Framework_TestCase
public function testHandleMatchedPathWithSuccessHandlerAndCsrfValidation()
{
$successHandler = $this->getSuccessHandler();
- $csrfProvider = $this->getCsrfProvider();
+ $tokenManager = $this->getTokenManager();
- list($listener, $context, $httpUtils, $options) = $this->getListener($successHandler, $csrfProvider);
+ list($listener, $context, $httpUtils, $options) = $this->getListener($successHandler, $tokenManager);
list($event, $request) = $this->getGetResponseEvent();
- $request->query->set('_csrf_token', $csrfToken = 'token');
+ $request->query->set('_csrf_token', 'token');
$httpUtils->expects($this->once())
->method('checkRequestPath')
->with($request, $options['logout_path'])
->will($this->returnValue(true));
- $csrfProvider->expects($this->once())
- ->method('isCsrfTokenValid')
- ->with('logout', $csrfToken)
+ $tokenManager->expects($this->once())
+ ->method('isTokenValid')
->will($this->returnValue(true));
$successHandler->expects($this->once())
@@ -151,30 +150,29 @@ class LogoutListenerTest extends \PHPUnit_Framework_TestCase
*/
public function testCsrfValidationFails()
{
- $csrfProvider = $this->getCsrfProvider();
+ $tokenManager = $this->getTokenManager();
- list($listener, $context, $httpUtils, $options) = $this->getListener(null, $csrfProvider);
+ list($listener, $context, $httpUtils, $options) = $this->getListener(null, $tokenManager);
list($event, $request) = $this->getGetResponseEvent();
- $request->query->set('_csrf_token', $csrfToken = 'token');
+ $request->query->set('_csrf_token', 'token');
$httpUtils->expects($this->once())
->method('checkRequestPath')
->with($request, $options['logout_path'])
->will($this->returnValue(true));
- $csrfProvider->expects($this->once())
- ->method('isCsrfTokenValid')
- ->with('logout', $csrfToken)
+ $tokenManager->expects($this->once())
+ ->method('isTokenValid')
->will($this->returnValue(false));
$listener->handle($event);
}
- private function getCsrfProvider()
+ private function getTokenManager()
{
- return $this->getMock('Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface');
+ return $this->getMock('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface');
}
private function getContext()
@@ -209,7 +207,7 @@ class LogoutListenerTest extends \PHPUnit_Framework_TestCase
->getMock();
}
- private function getListener($successHandler = null, $csrfProvider = null)
+ private function getListener($successHandler = null, $tokenManager = null)
{
$listener = new LogoutListener(
$context = $this->getContext(),
@@ -221,7 +219,7 @@ class LogoutListenerTest extends \PHPUnit_Framework_TestCase
'logout_path' => '/logout',
'target_url' => '/',
),
- $csrfProvider
+ $tokenManager
);
return array($listener, $context, $httpUtils, $options);
diff --git a/Http/composer.json b/Http/composer.json
index 4dfd985..716c443 100644
--- a/Http/composer.json
+++ b/Http/composer.json
@@ -23,14 +23,13 @@
"symfony/http-kernel": "~2.4"
},
"require-dev": {
- "symfony/form": "~2.0",
"symfony/routing": "~2.2",
"symfony/security-csrf": "~2.4",
"psr/log": "~1.0"
},
"suggest": {
- "symfony/security-csrf": "",
- "symfony/routing": ""
+ "symfony/security-csrf": "For using tokens to protect authentication/logout attempts",
+ "symfony/routing": "For using the HttpUtils class to create sub-requests, redirect the user, and match URLs"
},
"autoload": {
"psr-0": { "Symfony\\Component\\Security\\Http\\": "" }
diff --git a/composer.json b/composer.json
index 6be3886..18c69ba 100644
--- a/composer.json
+++ b/composer.json
@@ -28,7 +28,6 @@
"symfony/security-http": "self.version"
},
"require-dev": {
- "symfony/form": "~2.0",
"symfony/routing": "~2.2",
"symfony/validator": "~2.2",
"doctrine/common": "~2.2",
@@ -38,13 +37,13 @@
"symfony/expression-language": "~2.4"
},
"suggest": {
- "symfony/class-loader": "",
- "symfony/finder": "",
- "symfony/form": "",
- "symfony/validator": "",
- "symfony/routing": "",
- "doctrine/dbal": "to use the built-in ACL implementation",
- "ircmaxell/password-compat": ""
+ "symfony/class-loader": "For using the ACL generateSql script",
+ "symfony/finder": "For using the ACL generateSql script",
+ "symfony/validator": "For using the user password constraint",
+ "symfony/routing": "For using the HttpUtils class to create sub-requests, redirect the user, and match URLs",
+ "doctrine/dbal": "For using the built-in ACL implementation",
+ "symfony/expression-language": "For using the expression voter",
+ "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5"
},
"autoload": {
"psr-0": { "Symfony\\Component\\Security\\": "" }