8000 [SecurityBundle] Move configuration from XML to PHP by JudicaelR · Pull Request #37238 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[SecurityBundle] Move configuration from XML to PHP #37238

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 3 commits into from
Jun 15, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
[Security] Move configuration of console to PHP
  • Loading branch information
Judicael authored and Judicael RUFFIEUX committed Jun 15, 2020
commit 79764a9e859d758fc178402b8991956948de2343
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function load(array $configs, ContainerBuilder $container)
}

if (class_exists(Application::class)) {
$loader->load('console.xml');
$phpLoader->load('console.php');
$container->getDefinition('security.command.user_password_encoder')->replaceArgument(1, array_keys($config['encoders']));
}

Expand Down
25 changes: 25 additions & 0 deletions src/Symfony/Bundle/SecurityBundle/Resources/config/console.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use Symfony\Bundle\SecurityBundle\Command\UserPasswordEncoderCommand;

return static function (ContainerConfigurator $container) {
$container->services()
->set('security.command.user_password_encoder', UserPasswordEncoderCommand::class)
->args([
service('security.encoder_factory'),
abstract_arg('encoders user classes'),
])
->tag('console.command', ['command' => 'security:encode-password'])
;
};
16 changes: 0 additions & 16 deletions src/Symfony/Bundle/SecurityBundle/Resources/config/console.xml

This file was deleted.

0