-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Continuation of #23624 #23801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Continuation of #23624 #23801
Conversation
@@ -114,6 +116,9 @@ public function load(array $configs, ContainerBuilder $container) | |||
// load ACL | |||
if (isset($config['acl'])) { | |||
$this->aclLoad($config['acl'], $container); | |||
} else { | |||
$container->removeDefinition(InitAclCommand::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
broken if console not available, should go in the previous if (console.xml loading) and acl loading be moved just before console loading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure.. removeDefinition is non-fatal. Did this for translations, routing, etc. as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair
*/ | ||
public function isEnabled() | ||
{ | ||
if (null !== $this->connection) { | ||
return parent::isEnabled(); | ||
} | ||
if (!$this->getContainer()->has('security.acl.dbal.connection')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!$this->connection && ..)
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ro0NL ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -114,6 +116,9 @@ public function load(array $configs, ContainerBuilder $container) | |||
// load ACL | |||
if (isset($config['acl'])) { | |||
$this->aclLoad($config['acl'], $container); | |||
} else { | |||
$container->removeDefinition(InitAclCommand::class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair
|
||
return; | ||
} | ||
|
||
parent::__construct(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch
Not sure what appveyor complains about =/ |
Thank you @ro0NL. |
This PR was merged into the 2.8-dev branch. Discussion ---------- Initial extract from SecurityBundle Now that 3.0 is done and 3.1 is in feature freeze, it was a bit easier to extract the ACL part from the security bundle. Note that this is a mere extract and nothing besides of travis.yml is added. _Replaces #1_ Commits ------- 6263c7c Fixed some incorrect references 933b129 Merge pull request #2 from chalasr/feature/initial-extract feccd34 Do not prepend security config 094c4b7 Remove framework-bundle requirement 25185fa Remove security_ prefix from security_*.xml 3e25239 Remove symfony/symfony BC layers from console commands 95ee777 Fix composer requirements 61047c5 Disable bundle commands locator aaff4a7 Added a test-case for the BC layer 6a601de Fixes based on feedback 6eef9a0 Added asset d8eb3a8 Added security csrf 11dc2e6 Added the yaml component 61669b0 Fix lowest version of security-acl 88d9eed port of symfony/symfony#23801 4ef69f4 Changed minimum sf version to 3.3 45a1546 Added validator as dev-req 01ef784 Load the doctrine bundle as well 5f6d0b2 Initial extract from SecurityBundle
See #23624 (comment)
cc @chalasr
Also included service injection for init:acl + set:acl and simplification of lint:xliff + lintt:yaml.
Btw, i think init:acl needs to be renamed to acl:init :)