From c9003499149a935296d1e21c9a28e568c2406ad2 Mon Sep 17 00:00:00 2001 From: Lorenzo Ruozzi Date: Thu, 26 Feb 2026 18:15:30 +0100 Subject: [PATCH] Add support for new Symfony versions --- composer.json | 10 +++---- ecs.php | 28 +++++++++++++++++++ .../SetonoDoctrineORMBatcherExtension.php | 4 +-- src/SetonoDoctrineORMBatcherBundle.php | 5 ---- src/{Resources => }/config/services.xml | 0 5 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 ecs.php rename src/{Resources => }/config/services.xml (100%) diff --git a/composer.json b/composer.json index ac10483..161fe54 100644 --- a/composer.json +++ b/composer.json @@ -9,12 +9,12 @@ ], "license": "MIT", "require": { - "php": ">=7.2", - "doctrine/doctrine-bundle": "^1.0 || ^2.0", + "php": ">=8.2", + "doctrine/doctrine-bundle": "^1.0 || ^2.0 || ^3.0", "setono/doctrine-orm-batcher": "^0.6", - "symfony/config": "^4.4 || ^5.0 || ^6.0", - "symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0", - "symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0" + "symfony/config": "^5.4 || ^6.4 || ^7.4 || ^8.0", + "symfony/dependency-injection": "^5.4 || ^6.4 || ^7.4 || ^8.0", + "symfony/framework-bundle": "^5.4 || ^6.4 || ^7.4 || ^8.0" }, "require-dev": { "localheinz/composer-normalize": "^2.13", diff --git a/ecs.php b/ecs.php new file mode 100644 index 0000000..0556b29 --- /dev/null +++ b/ecs.php @@ -0,0 +1,28 @@ +withPaths([ + __DIR__ . '/src', + __DIR__ . '/tests', + ]) + + // add a single rule + ->withRules([ + NoUnusedImportsFixer::class, + ]) + + // add sets - group of rules, from easiest to more complex ones + // uncomment one, apply one, commit, PR, merge and repeat + //->withPreparedSets( + // spaces: true, + // namespaces: true, + // docblocks: true, + // arrays: true, + // comments: true, + //) + ; diff --git a/src/DependencyInjection/SetonoDoctrineORMBatcherExtension.php b/src/DependencyInjection/SetonoDoctrineORMBatcherExtension.php index a0216e2..2283fc2 100644 --- a/src/DependencyInjection/SetonoDoctrineORMBatcherExtension.php +++ b/src/DependencyInjection/SetonoDoctrineORMBatcherExtension.php @@ -15,9 +15,9 @@ final class SetonoDoctrineORMBatcherExtension extends Extension /** * @throws Exception */ - public function load(array $config, ContainerBuilder $container): void + public function load(array $configs, ContainerBuilder $container): void { - $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); + $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../config')); $loader->load('services.xml'); } diff --git a/src/SetonoDoctrineORMBatcherBundle.php b/src/SetonoDoctrineORMBatcherBundle.php index e20b49d..fea5ad4 100644 --- a/src/SetonoDoctrineORMBatcherBundle.php +++ b/src/SetonoDoctrineORMBatcherBundle.php @@ -4,13 +4,8 @@ namespace Setono\DoctrineORMBatcherBundle; -use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; final class SetonoDoctrineORMBatcherBundle extends Bundle { - public function build(ContainerBuilder $container): void - { - parent::build($container); - } } diff --git a/src/Resources/config/services.xml b/src/config/services.xml similarity index 100% rename from src/Resources/config/services.xml rename to src/config/services.xml