Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[SecurityBundle] make ACL an optional dependency #16694

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

Merged
merged 1 commit into from
Nov 26, 2015

Conversation

Tobion
Copy link
Contributor

@Tobion Tobion commented Nov 26, 2015

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.

fabpot added a commit that referenced this pull request Nov 26, 2015
…t used (Tobion)

This PR was merged into the 2.3 branch.

Discussion
----------

[SecurityBundle] disable the init:acl command if ACL is not used

| Q             | A
| ------------- | ---
| Bug fix?      | somewhat
| New feature?  | somewhat
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | -

Related to #16694 but this should go in 2.3 IMO because it was just forgotten. The other acl command already has this logic: https://github.com/symfony/symfony/blob/2.7/src/Symfony/Bundle/SecurityBundle/Command/SetAclCommand.php#L36

It ensures the command list is not flooded with unusable commands.

Commits
-------

55f84a3 [SecurityBundle] disable the init:acl command if ACL is not used
@fabpot
Copy link
Member

fabpot commented Nov 26, 2015

Thank you @Tobion.

@fabpot fabpot merged commit fc66283 into symfony:master Nov 26, 2015
fabpot added a commit that referenced this pull request Nov 26, 2015
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
@@ -116,6 +116,10 @@ public function load(array $configs, ContainerBuilder $container)

private function aclLoad($config, ContainerBuilder $container)
{
if (!interface_exists('Symfony\Component\Security\Acl\Model\AclInterface')) {
throw new \LogicException('You must install symfony/security-acl in order to use the ACL functionality.');
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be \RuntimeException() IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doesn't really matter and its the same as in doctrine/DoctrineCacheBundle#77

Copy link
Member

Choose a reason for hiding this comment

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

I prefer logic :-)

@Tobion Tobion deleted the security-acl-optional branch November 26, 2015 21:23
@fabpot fabpot mentioned this pull request Nov 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SecurityBundle][DX] Extract the ACL to its own bundle
4 participants