Skip to content

Commit 3212fb1

Browse files
committed
[FrameworkBundle] removed the Security Core and Security CSRF component dependencies on FrameworkBundle
1 parent 17580bb commit 3212fb1

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
3.2.0
55
-----
66

7+
* Removed `symfony/security-core` and `symfony/security-csrf` from the list of required dependencies in `composer.json`
78
* Removed `symfony/asset` from the list of required dependencies in `composer.json`
89
* The `Resources/public/images/*` files have been removed.
910
* The `Resources/public/css/*.css` files have been removed (they are now inlined in TwigBundle).

DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,10 @@ private function registerSecurityCsrfConfiguration(array $config, ContainerBuild
10061006
return;
10071007
}
10081008

1009+
if (!class_exists('Symfony\Component\Security\Csrf\CsrfToken')) {
1010+
throw new LogicException('CSRF support cannot be enabled as the Security CSRF component is not installed.');
1011+
}
1012+
10091013
if (!$this->sessionConfigEnabled) {
10101014
throw new \LogicException('CSRF protection needs sessions to be enabled.');
10111015
}

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828
"symfony/filesystem": "~2.8|~3.0",
2929
"symfony/finder": "~2.8|~3.0",
3030
"symfony/routing": "~3.0",
31-
"symfony/security-core": "~3.2",
32-
"symfony/security-csrf": "~2.8|~3.0",
3331
"symfony/stopwatch": "~2.8|~3.0",
3432
"symfony/templating": "~2.8|~3.0",
3533
"symfony/translation": "~2.8|~3.0",
@@ -47,6 +45,8 @@
4745
"symfony/form": "~2.8|~3.0",
4846
"symfony/expression-language": "~2.8|~3.0",
4947
"symfony/process": "~2.8|~3.0",
48+
"symfony/security-core": "~3.2",
49+
"symfony/security-csrf": "~2.8|~3.0",
5050
"symfony/serializer": "~2.8|~3.0",
5151
"symfony/validator": "~3.2",
5252
"symfony/yaml": "~3.2",

0 commit comments

Comments
 (0)