Skip to content

Commit 7366901

Browse files
committed
adjust doctrine dependencies
1 parent 7455650 commit 7366901

File tree

9 files changed

+48
-46
lines changed

9 files changed

+48
-46
lines changed

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"symfony/stopwatch": "~2.3",
2929
"symfony/templating": "~2.1",
3030
"symfony/translation": "~2.3",
31-
"doctrine/common": "~2.2"
31+
"doctrine/annotations": "~1.0"
3232
},
3333
"require-dev": {
3434
"symfony/finder": "~2.0",
@@ -38,10 +38,11 @@
3838
"symfony/validator": "~2.1"
3939
},
4040
"suggest": {
41-
"symfony/console": "",
42-
"symfony/finder": "",
43-
"symfony/form": "",
44-
"symfony/validator": ""
41+
"symfony/console": "For using the console commands",
42+
"symfony/finder": "For using the translation loader and cache warmer",
43+
"symfony/form": "For using forms",
44+
"symfony/validator": "For using validation",
45+
"doctrine/cache": "For using alternative cache drivers"
4546
},
4647
"autoload": {
4748
"psr-0": { "Symfony\\Bundle\\FrameworkBundle\\": "" }

src/Symfony/Component/Routing/composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "symfony/routing",
33
"type": "library",
44
"description": "Symfony Routing Component",
5-
"keywords": [],
5+
"keywords": ["routing", "router", "URL", "URI"],
66
"homepage": "http://symfony.com",
77
"license": "MIT",
88
"authors": [
@@ -22,13 +22,14 @@
2222
"symfony/config": "~2.2",
2323
"symfony/yaml": "~2.0",
2424
"symfony/expression-language": "~2.4",
25-
"doctrine/common": "~2.2",
25+
"doctrine/annotations": "~1.0",
2626
"psr/log": "~1.0"
2727
},
2828
"suggest": {
29-
"symfony/config": "",
30-
"symfony/yaml": "",
31-
"doctrine/common": ""
29+
"symfony/config": "For using the all-in-one router or any loader",
30+
"symfony/yaml": "For using the YAML loader",
31+
"symfony/expression-language": "For using expression matching",
32+
"doctrine/annotations": "For using the annotation loader"
3233
},
3334
"autoload": {
3435
"psr-0": { "Symfony\\Component\\Routing\\": "" }

src/Symfony/Component/Security/Acl/composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
"psr/log": "~1.0"
2626
},
2727
"suggest": {
28-
"symfony/class-loader": "",
29-
"symfony/finder": "",
30-
"doctrine/dbal": "to use the built-in ACL implementation"
28+
"symfony/class-loader": "For using the ACL generateSql script",
29+
"symfony/finder": "For using the ACL generateSql script",
30+
"doctrine/dbal": "For using the built-in ACL implementation"
3131
},
3232
"autoload": {
3333
"psr-0": { "Symfony\\Component\\Security\\Acl\\": "" }

src/Symfony/Component/Security/Core/composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@
2828
"suggest": {
2929
"symfony/event-dispatcher": "",
3030
"symfony/http-foundation": "",
31-
"symfony/validator": "",
32-
"ircmaxell/password-compat": ""
31+
"symfony/validator": "For using the user password constraint",
32+
"symfony/expression-language": "For using the expression voter",
33+
"ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5"
3334
},
3435
"autoload": {
3536
"psr-0": { "Symfony\\Component\\Security\\Core\\": "" }

src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,21 @@ public function testHandleUnmatchedPath()
3737
public function testHandleMatchedPathWithSuccessHandlerAndCsrfValidation()
3838
{
3939
$successHandler = $this->getSuccessHandler();
40-
$csrfProvider = $this->getCsrfProvider();
40+
$tokenManager = $this->getTokenManager();
4141

42-
list($listener, $context, $httpUtils, $options) = $this->getListener($successHandler, $csrfProvider);
42+
list($listener, $context, $httpUtils, $options) = $this->getListener($successHandler, $tokenManager);
4343

4444
list($event, $request) = $this->getGetResponseEvent();
4545

46-
$request->query->set('_csrf_token', $csrfToken = 'token');
46+
$request->query->set('_csrf_token', 'token');
4747

4848
$httpUtils->expects($this->once())
4949
->method('checkRequestPath')
5050
->with($request, $options['logout_path'])
5151
->will($this->returnValue(true));
5252

53-
$csrfProvider->expects($this->once())
54-
->method('isCsrfTokenValid')
55-
->with('logout', $csrfToken)
53+
$tokenManager->expects($this->once())
54+
->method('isTokenValid')
5655
->will($this->returnValue(true));
5756

5857
$successHandler->expects($this->once())
@@ -151,30 +150,29 @@ public function testSuccessHandlerReturnsNonResponse()
151150
*/
152151
public function testCsrfValidationFails()
153152
{
154-
$csrfProvider = $this->getCsrfProvider();
153+
$tokenManager = $this->getTokenManager();
155154

156-
list($listener, $context, $httpUtils, $options) = $this->getListener(null, $csrfProvider);
155+
list($listener, $context, $httpUtils, $options) = $this->getListener(null, $tokenManager);
157156

158157
list($event, $request) = $this->getGetResponseEvent();
159158

160-
$request->query->set('_csrf_token', $csrfToken = 'token');
159+
$request->query->set('_csrf_token', 'token');
161160

162161
$httpUtils->expects($this->once())
163162
->method('checkRequestPath')
164163
->with($request, $options['logout_path'])
165164
->will($this->returnValue(true));
166165

167-
$csrfProvider->expects($this->once())
168-
->method('isCsrfTokenValid')
169-
->with('logout', $csrfToken)
166+
$tokenManager->expects($this->once())
167+
->method('isTokenValid')
170168
->will($this->returnValue(false));
171169

172170
$listener->handle($event);
173171
}
174172

175-
private function getCsrfProvider()
173+
private function getTokenManager()
176174
{
177-
return $this->getMock('Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface');
175+
return $this->getMock('Symfony\Component\Security\Csrf\CsrfTokenManagerInterface');
178176
}
179177

180178
private function getContext()
@@ -209,7 +207,7 @@ private function getHttpUtils()
209207
->getMock();
210208
}
211209

212-
private function getListener($successHandler = null, $csrfProvider = null)
210+
private function getListener($successHandler = null, $tokenManager = null)
213211
{
214212
$listener = new LogoutListener(
215213
$context = $this->getContext(),
@@ -221,7 +219,7 @@ private function getListener($successHandler = null, $csrfProvider = null)
221219
'logout_path' => '/logout',
222220
'target_url' => '/',
223221
),
224-
$csrfProvider
222+
$tokenManager
225223
);
226224

227225
return array($listener, $context, $httpUtils, $options);

src/Symfony/Component/Security/Http/composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@
2323
"symfony/http-kernel": "~2.4"
2424
},
2525
"require-dev": {
26-
"symfony/form": "~2.0",
2726
"symfony/routing": "~2.2",
2827
"symfony/security-csrf": "~2.4",
2928
"psr/log": "~1.0"
3029
},
3130
"suggest": {
32-
"symfony/security-csrf": "",
33-
"symfony/routing": ""
31+
"symfony/security-csrf": "For using tokens to protect authentication/logout attempts",
32+
"symfony/routing": "For using the HttpUtils class to create sub-requests, redirect the user, and match URLs"
3433
},
3534
"autoload": {
3635
"psr-0": { "Symfony\\Component\\Security\\Http\\": "" }

src/Symfony/Component/Security/composer.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"symfony/security-http": "self.version"
2929
},
3030
"require-dev": {
31-
"symfony/form": "~2.0",
3231
"symfony/routing": "~2.2",
3332
"symfony/validator": "~2.2",
3433
"doctrine/common": "~2.2",
@@ -38,13 +37,13 @@
3837
"symfony/expression-language": "~2.4"
3938
},
4039
"suggest": {
41-
"symfony/class-loader": "",
42-
"symfony/finder": "",
43-
"symfony/form": "",
44-
"symfony/validator": "",
45-
"symfony/routing": "",
46-
"doctrine/dbal": "to use the built-in ACL implementation",
47-
"ircmaxell/password-compat": ""
40+
"symfony/class-loader": "For using the ACL generateSql script",
41+
"symfony/finder": "For using the ACL generateSql script",
42+
"symfony/validator": "For using the user password constraint",
43+
"symfony/routing": "For using the HttpUtils class to create sub-requests, redirect the user, and match URLs",
44+
"doctrine/dbal": "For using the built-in ACL implementation",
45+
"symfony/expression-language": "For using the expression voter",
46+
"ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5"
4847
},
4948
"autoload": {
5049
"psr-0": { "Symfony\\Component\\Security\\": "" }

src/Symfony/Component/Validator/ValidatorBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ public function enableAnnotationMapping(Reader $annotationReader = null)
205205
}
206206

207207
if (null === $annotationReader) {
208-
if (!class_exists('Doctrine\Common\Annotations\AnnotationReader')) {
209-
throw new \RuntimeException('Requested a ValidatorFactory with an AnnotationLoader, but the AnnotationReader was not found. You should add Doctrine Common to your project.');
208+
if (!class_exists('Doctrine\Common\Annotations\AnnotationReader') || !class_exists('Doctrine\Common\Cache\ArrayCache')) {
209+
throw new \RuntimeException('Enabling annotation based constraint mapping requires the packages doctrine/annotations and doctrine/cache to be installed.');
210210
}
211211

212212
$annotationReader = new CachedReader(new AnnotationReader(), new ArrayCache());

src/Symfony/Component/Validator/composer.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@
2424
"symfony/http-foundation": "~2.1",
2525
"symfony/intl": "~2.3",
2626
"symfony/yaml": "~2.0",
27-
"symfony/config": "~2.2"
27+
"symfony/config": "~2.2",
28+
"doctrine/annotations": "~1.0",
29+
"doctrine/cache": "~1.0"
2830
},
2931
"suggest": {
30-
"doctrine/common": "",
32+
"doctrine/annotations": "For using the annotation mapping. You will also need doctrine/cache.",
33+
"doctrine/cache": "For using the default cached annotation reader",
3134
"symfony/http-foundation": "",
3235
"symfony/intl": "",
3336
"symfony/yaml": "",

0 commit comments

Comments
 (0)