Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[SecurityBundle] Rename init:acl to acl:init #23811

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 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion 11 src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ public function isEnabled()
protected function configure()
{
$this
->setName('init:acl')
->setName('acl:init')
->setAliases(array('init:acl'))
->setDescription('Mounts ACL tables in the database')
->setHelp(<<<'EOF'
The <info>%command.name%</info> command mounts ACL tables in the database.
Expand All @@ -65,6 +66,14 @@ protected function configure()
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
if (false !== strpos($input->getFirstArgument(), ':a')) {
$warning = 'The use of "init:acl" command is deprecated since version 3.4 and will be removed in 4.0. Use the "acl:init" command instead.';

@trigger_error($warning, E_USER_DEPRECATED);

$output->writeln('<comment>'.$warning.'</>');
}

$container = $this->getContainer();

$connection = $container->get('security.acl.dbal.connection');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ protected function configure()
->setDescription('Sets ACL for objects')
->setHelp(<<<EOF
The <info>%command.name%</info> command sets ACL.
The ACL system must have been initialized with the <info>init:acl</info> command.
The ACL system must have been initialized with the <info>acl:init</info> command.

To set <comment>VIEW</comment> and <comment>EDIT</comment> permissions for the user <comment>kevin</comment> on the instance of
<comment>Acme\MyClass</comment> having the identifier <comment>42</comment>:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
<defaults public="false" />

<service id="Symfony\Bundle\SecurityBundle\Command\InitAclCommand">
<tag name="console.command" command="init:acl" />
<tag name="console.command" command="acl:init" />
<tag name="console.command" command="init:acl" /> <!-- BC to be removed in 4.0 -->
</service>

<service id="Symfony\Bundle\SecurityBundle\Command\SetAclCommand">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ private function getApplication()
$application = new Application($kernel);
$application->add(new InitAclCommand());

$initAclCommand = $application->find('init:acl');
$initAclCommand = $application->find('acl:init');
$initAclCommandTester = new CommandTester($initAclCommand);
$initAclCommandTester->execute(array('command' => 'init:acl'));
$initAclCommandTester->execute(array('command' => 'acl:init'));

return $application;
}
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.