8000 feature #16694 [SecurityBundle] make ACL an optional dependency (Tobion) · symfony/symfony@d258ee8 · GitHub
[go: up one dir, main page]

Skip to content

Commit d258ee8

Browse files
committed
feature #16694 [SecurityBundle] make ACL an optional dependency (Tobion)
This PR was merged into the 3.0-dev branch. Discussion ---------- [SecurityBundle] make ACL an optional dependency | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | - Fixes #14718 (comment). Together with doctrine/DoctrineCacheBundle#77 we do not have ACL in the symfony-standard 3.0 by default anymore. Commits ------- fc66283 [SecurityBundle] make ACL an optional dependency
2 parents c9fbff0 + fc66283 commit d258ee8

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Symfony/Bundle/SecurityBundle/DependencyInjection/SecurityExtension.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ public function load(array $configs, ContainerBuilder $container)
116116

117117
private function aclLoad($config, ContainerBuilder $container)
118118
{
119+
if (!interface_exists('Symfony\Component\Security\Acl\Model\AclInterface')) {
120+
throw new \LogicException('You must install symfony/security-acl in order to use the ACL functionality.');
121+
}
122+
119123
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
120124
$loader->load('security_acl.xml');
121125

src/Symfony/Bundle/SecurityBundle/composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"require": {
1919
"php": ">=5.5.9",
2020
"symfony/security": "~2.8|~3.0",
21-
"symfony/security-acl": "~2.8|~3.0",
2221
"symfony/http-kernel": "~2.8|~3.0",
2322
"symfony/polyfill-php70": "~1.0"
2423
},
@@ -30,6 +29,7 @@
3029
"symfony/form": "~2.8|~3.0",
3130
"symfony/framework-bundle": "~2.8|~3.0",
3231
"symfony/http-foundation": "~2.8|~3.0",
32+
"symfony/security-acl": "~2.8|~3.0",
3333
"symfony/twig-bundle": "~2.8|~3.0",
3434
"symfony/twig-bridge": "~2.8|~3.0",
3535
"symfony/process": "~2.8|~3.0",
@@ -39,6 +39,9 @@
3939
"doctrine/doctrine-bundle": "~1.4",
4040
"twig/twig": "~1.23|~2.0"
4141
},
42+
"suggest": {
43+
"symfony/security-acl": "For using the ACL functionality of this bundle"
44+
},
4245
"autoload": {
4346
"psr-4": { "Symfony\\Bundle\\SecurityBundle\\": "" },
4447
"exclude-from-classmap": [

0 commit comments

Comments
 (0)
0