Skip to content
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

Allow Symfony 7 and fix incompatibilities #45

Merged
merged 1 commit into from
Apr 19, 2024
Merged
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
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 4 additions & 2 deletions src/Command/InitAclCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -23,6 +24,7 @@
*
* @author Johannes M. Schmitt <[email protected]>
*/
#[AsCommand(name: 'acl:init', description: 'Creates ACL tables in the database')]
final class InitAclCommand extends Command
{
protected static $defaultName = 'acl:init';
Expand All @@ -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')
Expand All @@ -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());
Expand Down
4 changes: 3 additions & 1 deletion src/Command/SetAclCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,6 +29,7 @@
*
* @author Kévin Dunglas <[email protected]>
*/
#[AsCommand(name: 'acl:set', description: 'Sets ACL for objects')]
final class SetAclCommand extends Command
{
protected static $defaultName = 'acl:set';
Expand Down Expand Up @@ -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 = [];
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Loading