Skip to content

Commit 4d3b51c

Browse files
committed
Allow Symfony 7 and fix incompatibilities
1 parent e626dbc commit 4d3b51c

File tree

5 files changed

+20
-15
lines changed

5 files changed

+20
-15
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,16 @@ jobs:
3030
deps: stable
3131
symfony: '^4.4'
3232

33-
# Test latest php/Symfony
33+
# Test Symfony 6
3434
- php: 8.1
3535
deps: stable
3636
symfony: '^6.0'
3737

38+
# Test latest php/Symfony
39+
- php: 8.3
40+
deps: stable
41+
symfony: '^7.0'
42+
3843
steps:
3944
- name: Checkout code
4045
uses: 'actions/checkout@v2'

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@
1818
"require": {
1919
"php": ">=7.2.9",
2020
"ext-xml": "*",
21-
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
22-
"symfony/http-kernel": "^4.4|^5.0|^6.0",
21+
"symfony/dependency-injection": "^4.4|^5.0|^6.0|^7.0",
22+
"symfony/http-kernel": "^4.4|^5.0|^6.0|^7.0",
2323
"symfony/security-acl": "^3.0",
24-
"symfony/security-bundle": "^4.4|^5.0|^6.0"
24+
"symfony/security-bundle": "^4.4|^5.0|^6.0|^7.0"
2525
},
2626
"require-dev": {
2727
"doctrine/doctrine-bundle": "^1.6.12|^2.0",
2828
"doctrine/dbal": "^2.13.1|^3.1",
2929
"doctrine/orm": "^2.7.3",
30-
"symfony/console": "^4.4|^5.0|^6.0",
31-
"symfony/framework-bundle": "^4.4|^5.0|^6.0",
32-
"symfony/phpunit-bridge": "^5.0|^6.0",
33-
"symfony/yaml": "^4.4|^5.0|^6.0"
30+
"symfony/console": "^4.4|^5.0|^6.0|^7.0",
31+
"symfony/framework-bundle": "^4.4|^5.0|^6.0|^7.0",
32+
"symfony/phpunit-bridge": "^5.0|^6.0|^7.0",
33+
"symfony/yaml": "^4.4|^5.0|^6.0|^7.0"
3434
},
3535
"suggest": {
3636
"doctrine/doctrine-bundle": "To use the default dbal configuration"

src/Command/InitAclCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Doctrine\DBAL\Connection;
1515
use Doctrine\DBAL\Schema\SchemaException;
16+
use Symfony\Component\Console\Attribute\AsCommand;
1617
use Symfony\Component\Console\Command\Command;
1718
use Symfony\Component\Console\Input\InputInterface;
1819
use Symfony\Component\Console\Output\OutputInterface;
@@ -23,10 +24,9 @@
2324
*
2425
* @author Johannes M. Schmitt <[email protected]>
2526
*/
27+
#[AsCommand(name: 'acl:init', description: 'Creates ACL tables in the database')]
2628
final class InitAclCommand extends Command
2729
{
28-
protected static $defaultName = 'acl:init';
29-
3030
private $connection;
3131
private $schema;
3232

@@ -62,7 +62,7 @@ protected function configure()
6262
/**
6363
* {@inheritdoc}
6464
*/
65-
protected function execute(InputInterface $input, OutputInterface $output)
65+
protected function execute(InputInterface $input, OutputInterface $output): int
6666
{
6767
try {
6868
$this->schema->addToSchema($this->connection->getSchemaManager()->createSchema());

src/Command/SetAclCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Bundle\AclBundle\Command;
1313

14+
use Symfony\Component\Console\Attribute\AsCommand;
1415
use Symfony\Component\Console\Command\Command;
1516
use Symfony\Component\Console\Input\InputArgument;
1617
use Symfony\Component\Console\Input\InputInterface;
@@ -28,10 +29,9 @@
2829
*
2930
* @author Kévin Dunglas <[email protected]>
3031
*/
32+
#[AsCommand(name: 'acl:set', description: 'Sets ACL for objects')]
3133
final class SetAclCommand extends Command
3234
{
33-
protected static $defaultName = 'acl:set';
34-
3535
private $provider;
3636

3737
public function __construct(MutableAclProviderInterface $provider)
@@ -80,7 +80,7 @@ protected function configure()
8080
/**
8181
* {@inheritdoc}
8282
*/
83-
protected function execute(InputInterface $input, OutputInterface $output)
83+
protected function execute(InputInterface $input, OutputInterface $output): int
8484
{
8585
// Parse arguments
8686
$objectIdentities = [];

src/DependencyInjection/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class Configuration implements ConfigurationInterface
2626
*
2727
* @return TreeBuilder The tree builder
2828
*/
29-
public function getConfigTreeBuilder()
29+
public function getConfigTreeBuilder(): TreeBuilder
3030
{
3131
$builder = new TreeBuilder('acl');
3232
$rootNode = $builder->getRootNode();

0 commit comments

Comments
 (0)