From c8c3d42c7c5b52880a0ab7ad8df6b6f8aaa0396c Mon Sep 17 00:00:00 2001 From: Maxime Steinhausser Date: Wed, 27 Sep 2017 21:45:22 +0200 Subject: [PATCH] [SecurityBundle] Remove remaining ACL stuff from SecurityBundle --- .../DependencyInjection/MainConfiguration.php | 10 +--- .../EventListener/AclSchemaListener.php | 36 -------------- .../Resources/config/security_acl.xml | 35 ------------- .../Resources/config/security_acl_dbal.xml | 49 ------------------- .../Fixtures/php/custom_acl_provider.php | 9 ---- .../Fixtures/xml/custom_acl_provider.xml | 16 ------ .../Fixtures/yml/custom_acl_provider.yml | 6 --- .../Functional/Bundle/AclBundle/AclBundle.php | 21 -------- .../Bundle/AclBundle/Entity/Car.php | 22 --------- .../Tests/Functional/app/Acl/bundles.php | 17 ------- .../Tests/Functional/app/Acl/config.yml | 28 ----------- .../Tests/Functional/app/Acl/doctrine.yml | 5 -- .../Tests/Functional/app/AppKernel.php | 6 --- .../Bundle/SecurityBundle/composer.json | 4 -- 14 files changed, 1 insertion(+), 263 deletions(-) delete mode 100644 src/Symfony/Bundle/SecurityBundle/EventListener/AclSchemaListener.php delete mode 100644 src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl.xml delete mode 100644 src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl_dbal.xml delete mode 100644 src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/custom_acl_provider.php delete mode 100644 src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/custom_acl_provider.xml delete mode 100644 src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/custom_acl_provider.yml delete mode 100644 src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/AclBundle.php delete mode 100644 src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/Entity/Car.php delete mode 100644 src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/bundles.php delete mode 100644 src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/config.yml delete mode 100644 src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/doctrine.yml diff --git a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php index 078817b3be97..5288de97b1bd 100644 --- a/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php +++ b/src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php @@ -19,15 +19,7 @@ use Symfony\Component\Security\Http\Session\SessionAuthenticationStrategy; /** - * This class contains the configuration information. - * - * This information is for the following tags: - * - * * security.config - * * security.acl - * - * This information is solely responsible for how the different configuration - * sections are normalized, and merged. + * SecurityExtension configuration structure. * * @author Johannes M. Schmitt */ diff --git a/src/Symfony/Bundle/SecurityBundle/EventListener/AclSchemaListener.php b/src/Symfony/Bundle/SecurityBundle/EventListener/AclSchemaListener.php deleted file mode 100644 index 8faa9ac366fd..000000000000 --- a/src/Symfony/Bundle/SecurityBundle/EventListener/AclSchemaListener.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\EventListener; - -use Symfony\Component\Security\Acl\Dbal\Schema; -use Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs; - -/** - * Merges ACL schema into the given schema. - * - * @author Johannes M. Schmitt - */ -class AclSchemaListener -{ - private $schema; - - public function __construct(Schema $schema) - { - $this->schema = $schema; - } - - public function postGenerateSchema(GenerateSchemaEventArgs $args) - { - $schema = $args->getSchema(); - $this->schema->addToSchema($schema); - } -} diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl.xml b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl.xml deleted file mode 100644 index 68418dadff1c..000000000000 --- a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl_dbal.xml b/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl_dbal.xml deleted file mode 100644 index c1ed332654fe..000000000000 --- a/src/Symfony/Bundle/SecurityBundle/Resources/config/security_acl_dbal.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - %security.acl.dbal.class_table_name% - %security.acl.dbal.entry_table_name% - %security.acl.dbal.oid_table_name% - %security.acl.dbal.oid_ancestors_table_name% - %security.acl.dbal.sid_table_name% - - - - - - - %security.acl.dbal.class_table_name% - %security.acl.dbal.entry_table_name% - %security.acl.dbal.oid_table_name% - %security.acl.dbal.oid_ancestors_table_name% - %security.acl.dbal.sid_table_name% - - - - - - - - - - - - - - - - - - diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/custom_acl_provider.php b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/custom_acl_provider.php deleted file mode 100644 index 351dc6c09e1a..000000000000 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/php/custom_acl_provider.php +++ /dev/null @@ -1,9 +0,0 @@ -load('container1.php', $container); - -$container->loadFromExtension('security', array( - 'acl' => array( - 'provider' => 'foo', - ), -)); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/custom_acl_provider.xml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/custom_acl_provider.xml deleted file mode 100644 index 6addc8166825..000000000000 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/xml/custom_acl_provider.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/custom_acl_provider.yml b/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/custom_acl_provider.yml deleted file mode 100644 index 633eed00e341..000000000000 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/Fixtures/yml/custom_acl_provider.yml +++ /dev/null @@ -1,6 +0,0 @@ -imports: - - { resource: container1.yml } - -security: - acl: - provider: foo diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/AclBundle.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/AclBundle.php deleted file mode 100644 index 1208003bcc2c..000000000000 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/AclBundle.php +++ /dev/null @@ -1,21 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle; - -use Symfony\Component\HttpKernel\Bundle\Bundle; - -/** - * @author Kévin Dunglas - */ -class AclBundle extends Bundle -{ -} diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/Entity/Car.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/Entity/Car.php deleted file mode 100644 index c85a589578ec..000000000000 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/AclBundle/Entity/Car.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\Entity; - -/** - * Car. - * - * @author Kévin Dunglas - */ -class Car -{ - public $id; -} diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/bundles.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/bundles.php deleted file mode 100644 index 51337913d537..000000000000 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/bundles.php +++ /dev/null @@ -1,17 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -return array( - new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), - new Symfony\Bundle\SecurityBundle\SecurityBundle(), - new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), - new Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\AclBundle\AclBundle(), -); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/config.yml b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/config.yml deleted file mode 100644 index 45f8e24d4f81..000000000000 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/config.yml +++ /dev/null @@ -1,28 +0,0 @@ -imports: - - { resource: ./../config/framework.yml } - -services: - _defaults: { public: true } - test.security.acl.provider: '@security.acl.provider' - -doctrine: - dbal: - driver: pdo_sqlite - memory: true - charset: UTF8 - -security: - firewalls: - test: - pattern: ^/ - security: false - acl: - connection: default - encoders: - Symfony\Component\Security\Core\User\User: plaintext - providers: - in_memory: - memory: - users: - kevin: { password: test, roles: [ROLE_USER] } - anne: { password: test, roles: [ROLE_ADMIN]} diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/doctrine.yml b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/doctrine.yml deleted file mode 100644 index 7a12388398f7..000000000000 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/Acl/doctrine.yml +++ /dev/null @@ -1,5 +0,0 @@ -# to be removed once https://github.com/doctrine/DoctrineBundle/pull/684 is merged -services: - Doctrine\Bundle\DoctrineBundle\Command\: - resource: "@DoctrineBundle/Command/*" - tags: [console.command] diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php index 82c8ad4aa6c6..1aab514f4545 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/Functional/app/AppKernel.php @@ -11,7 +11,6 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional\app; -use Doctrine\ORM\Version; use Symfony\Component\Config\Loader\LoaderInterface; use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\HttpKernel\Kernel; @@ -83,11 +82,6 @@ public function getLogDir() public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load($this->rootConfig); - - // to be removed once https://github.com/doctrine/DoctrineBundle/pull/684 is merged - if ('Acl' === $this->testCase && class_exists(Version::class)) { - $loader->load(__DIR__.'/Acl/doctrine.yml'); - } } public function serialize() diff --git a/src/Symfony/Bundle/SecurityBundle/composer.json b/src/Symfony/Bundle/SecurityBundle/composer.json index c5d6f7f103f5..d31285e66a0e 100644 --- a/src/Symfony/Bundle/SecurityBundle/composer.json +++ b/src/Symfony/Bundle/SecurityBundle/composer.json @@ -32,7 +32,6 @@ "symfony/form": "~3.4|~4.0", "symfony/framework-bundle": "~3.4|~4.0", "symfony/http-foundation": "~3.4|~4.0", - "symfony/security-acl": "~2.8|~3.0", "symfony/translation": "~3.4|~4.0", "symfony/twig-bundle": "~3.4|~4.0", "symfony/twig-bridge": "~3.4|~4.0", @@ -50,9 +49,6 @@ "symfony/framework-bundle": "<3.4", "symfony/console": "<3.4" }, - "suggest": { - "symfony/security-acl": "For using the ACL functionality of this bundle" - }, "autoload": { "psr-4": { "Symfony\\Bundle\\SecurityBundle\\": "" }, "exclude-from-classmap": [