8000 feature #20075 [FrameworkBundle] removed the Security Core and Securi… · symfony/symfony@469818c · GitHub
[go: up one dir, main page]

Skip to content

Commit 469818c

Browse files
committed
feature #20075 [FrameworkBundle] removed the Security Core and Security CSRF component dependencies on FrameworkBundle (fabpot)
This PR was merged into the 3.2-dev branch. Discussion ---------- [FrameworkBundle] removed the Security Core and Security CSRF component dependencies on FrameworkBundle | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no (except for people using FrameworkBundle without requiring symfony/symfony which should be pretty rare; and fixing this is easy by adding symfony/security-core and symfony/security-csrf explicitly) | Deprecations? | no | Tests pass? | yes | Fixed tickets | #15748 partially | License | MIT | Doc PR | n/a Another PR to reduce the number of required dependencies on FrameworkBundle. This PR removes the Security Core and CSRF components from the list. Commits ------- d703784 [FrameworkBundle] removed the Security Core and Security CSRF component dependencies on FrameworkBundle
2 parents 0e4523f + d703784 commit 469818c

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

UPGRADE-3.2.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ UPGRADE FROM 3.1 to 3.2
44
FrameworkBundle
55
---------------
66

7+
* The `symfony/security-core` and `symfony/security-csrf` dependencies have
8+
been removed; require them via `composer require symfony/security-core
9+
symfony/security-csrf` if you depend on them and don't already depend on
10+
`symfony/symfony`
711
* The `symfony/templating` dependency has been removed; require it via `composer
812
require symfony/templating` if you depend on it and don't already depend on
913
`symfony/symfony`

src/Symfony/Bundle/FrameworkBundle/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/templating` from the list of required dependencies in `composer.json`
89
* Removed `symfony/translation` from the list of required dependencies in `composer.json`
910
* Removed `symfony/asset` from the list of required dependencies in `composer.json`

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,6 +1021,10 @@ private function registerSecurityCsrfConfiguration(array $config, ContainerBuild
10211021
return;
10221022
}
10231023

1024+
if (!class_exists('Symfony\Component\Security\Csrf\CsrfToken')) {
1025+
throw new LogicException('CSRF support cannot be enabled as the Security CSRF component is not installed.');
1026+
}
1027+
10241028
if (!$this->sessionConfigEnabled) {
10251029
throw new \LogicException('CSRF protection needs sessions to be enabled.');
10261030
}

src/Symfony/Bundle/FrameworkBundle/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
"doctrine/cache": "~1.0",
3533
"doctrine/annotations": "~1.0"
@@ -45,6 +43,8 @@
4543
"symfony/form": "~2.8|~3.0",
4644
"symfony/expression-language": "~2.8|~3.0",
4745
"symfony/process": "~2.8|~3.0",
46+
"symfony/security-core": "~3.2",
47+
"symfony/security-csrf": "~2.8|~3.0",
4848
"symfony/serializer": "~2.8|~3.0",
4949
"symfony/translation": "~2.8|~3.0",
5050
"symfony/templating": "~2.8|~3.0",

0 commit comments

Comments
 (0)
0