Skip to content

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

Closed
wants to merge 4 commits into from
Closed

Continuation of #23624 #23801

wants to merge 4 commits into from

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented Aug 6, 2017

Q A
Branch? 3.4
Bug fix? yes
New feature? yes
BC breaks? no
Deprecations? yes
Tests pass? yes
Fixed tickets #...
License MIT
Doc PR symfony/symfony-docs#...

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 :)

@@ -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);
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

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')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!$this->connection && ..) instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ro0NL ?

Copy link
Contributor Author

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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair


return;
}

parent::__construct();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@ro0NL
Copy link
Contributor Author

ro0NL commented Aug 6, 2017

Not sure what appveyor complains about =/

@nicolas-grekas
Copy link
Member

Thank you @ro0NL.

@ro0NL ro0NL deleted the commands branch August 6, 2017 18:20
fabpot added a commit to symfony/acl-bundle that referenced this pull request Sep 26, 2017
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants