diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94ba398..5459046 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,11 +30,16 @@ jobs: deps: stable symfony: '^4.4' - # Test latest php/Symfony + # Test Symfony 6 - php: 8.1 deps: stable symfony: '^6.0' + # Test latest php/Symfony + - php: 8.3 + deps: stable + symfony: '^7.0' + steps: - name: Checkout code uses: 'actions/checkout@v2' diff --git a/composer.json b/composer.json index 17315c1..c77aa96 100644 --- a/composer.json +++ b/composer.json @@ -18,19 +18,19 @@ "require": { "php": ">=7.2.9", "ext-xml": "*", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/http-kernel": "^4.4|^5.0|^6.0", + "symfony/dependency-injection": "^4.4|^5.0|^6.0|^7.0", + "symfony/http-kernel": "^4.4|^5.0|^6.0|^7.0", "symfony/security-acl": "^3.0", - "symfony/security-bundle": "^4.4|^5.0|^6.0" + "symfony/security-bundle": "^4.4|^5.0|^6.0|^7.0" }, "require-dev": { "doctrine/doctrine-bundle": "^1.6.12|^2.0", "doctrine/dbal": "^2.13.1|^3.1", "doctrine/orm": "^2.7.3", - "symfony/console": "^4.4|^5.0|^6.0", - "symfony/framework-bundle": "^4.4|^5.0|^6.0", - "symfony/phpunit-bridge": "^5.0|^6.0", - "symfony/yaml": "^4.4|^5.0|^6.0" + "symfony/console": "^4.4|^5.0|^6.0|^7.0", + "symfony/framework-bundle": "^4.4|^5.0|^6.0|^7.0", + "symfony/phpunit-bridge": "^5.0|^6.0|^7.0", + "symfony/yaml": "^4.4|^5.0|^6.0|^7.0" }, "suggest": { "doctrine/doctrine-bundle": "To use the default dbal configuration" diff --git a/src/Command/InitAclCommand.php b/src/Command/InitAclCommand.php index 7b735a6..a0055f6 100644 --- a/src/Command/InitAclCommand.php +++ b/src/Command/InitAclCommand.php @@ -13,6 +13,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\Schema\SchemaException; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; @@ -23,6 +24,7 @@ * * @author Johannes M. Schmitt */ +#[AsCommand(name: 'acl:init', description: 'Creates ACL tables in the database')] final class InitAclCommand extends Command { protected static $defaultName = 'acl:init'; @@ -41,7 +43,7 @@ public function __construct(Connection $connection, Schema $schema) /** * {@inheritdoc} */ - protected function configure() + protected function configure(): void { $this ->setDescription('Creates ACL tables in the database') @@ -62,7 +64,7 @@ protected function configure() /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { try { $this->schema->addToSchema($this->connection->getSchemaManager()->createSchema()); diff --git a/src/Command/SetAclCommand.php b/src/Command/SetAclCommand.php index a4a7fc9..ad8d843 100644 --- a/src/Command/SetAclCommand.php +++ b/src/Command/SetAclCommand.php @@ -11,6 +11,7 @@ namespace Symfony\Bundle\AclBundle\Command; +use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; @@ -28,6 +29,7 @@ * * @author Kévin Dunglas */ +#[AsCommand(name: 'acl:set', description: 'Sets ACL for objects')] final class SetAclCommand extends Command { protected static $defaultName = 'acl:set'; @@ -80,7 +82,7 @@ protected function configure() /** * {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { // Parse arguments $objectIdentities = []; diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php index 0d21dba..984074f 100644 --- a/src/DependencyInjection/Configuration.php +++ b/src/DependencyInjection/Configuration.php @@ -26,7 +26,7 @@ class Configuration implements ConfigurationInterface * * @return TreeBuilder The tree builder */ - public function getConfigTreeBuilder() + public function getConfigTreeBuilder(): TreeBuilder { $builder = new TreeBuilder('acl'); $rootNode = $builder->getRootNode();