diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index caff1b0c7..b6f668b96 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ jobs: name: Static analysis runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: technote-space/get-diff-action@v6 with: @@ -23,7 +23,7 @@ jobs: extensions: mongodb, redis, :xdebug ini-values: memory_limit=2048M - - run: php ./bin/fix-symfony-version.php "5.4.*" + - run: php ./bin/fix-symfony-version.php "7.4.*" - uses: "ramsey/composer-install@v3" @@ -37,7 +37,7 @@ jobs: name: Code style check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: technote-space/get-diff-action@v6 with: @@ -77,17 +77,25 @@ jobs: strategy: fail-fast: false matrix: - php: ['8.1', '8.2'] - symfony_version: ['6.2.*', '6.3.*', '6.4.*', '7.0.*'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] + symfony_version: ['6.4.*', '7.3.*', '7.4.*', '8.0.*'] dependencies: ['--prefer-lowest', '--prefer-dist'] exclude: - php: '8.1' - symfony_version: '7.0.*' + symfony_version: '7.3.*' + - php: '8.1' + symfony_version: '7.4.*' + - php: '8.1' + symfony_version: '8.0.*' + - php: '8.2' + symfony_version: '8.0.*' + - php: '8.3' + symfony_version: '8.0.*' name: PHP ${{ matrix.php }} unit tests on Sf ${{ matrix.symfony_version }}, deps=${{ matrix.dependencies }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Get Composer Cache Directory id: composer-cache @@ -121,21 +129,25 @@ jobs: strategy: fail-fast: false matrix: - php: [ '8.1', '8.2' ] - symfony_version: [ '6.4.*', '7.0.*', '7.1.*', '7.2.*' ] - dependencies: [ '--prefer-lowest', '--prefer-dist' ] + php: ['8.1', '8.2', '8.3', '8.4'] + symfony_version: ['6.4.*', '7.3.*', '7.4.*', '8.0.*'] + dependencies: ['--prefer-lowest', '--prefer-dist'] exclude: - php: '8.1' - symfony_version: '7.0.*' + symfony_version: '7.3.*' - php: '8.1' - symfony_version: '7.1.*' + symfony_version: '7.4.*' - php: '8.1' - symfony_version: '7.2.*' + symfony_version: '8.0.*' + - php: '8.2' + symfony_version: '8.0.*' + - php: '8.3' + symfony_version: '8.0.*' name: PHP ${{ matrix.php }} functional tests on Sf ${{ matrix.symfony_version }}, deps=${{ matrix.dependencies }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Get Composer Cache Directory id: composer-cache diff --git a/composer.json b/composer.json index 75ff4424a..d5f2c0e44 100644 --- a/composer.json +++ b/composer.json @@ -20,14 +20,14 @@ "queue-interop/queue-interop": "^0.8.1", "bunny/bunny": "^0.5.5", "php-amqplib/php-amqplib": "^3.1", - "doctrine/dbal": "^3.2", + "doctrine/dbal": "^3.2|^4.0", "ramsey/uuid": "^4.3", "psr/log": "^1.1 || ^2.0 || ^3.0", "psr/container": "^1.1 || ^2.0", "makasim/temp-file": "^0.2", "google/cloud-pubsub": "^1.46", - "doctrine/orm": "^2.12", - "doctrine/persistence": "^2.0|^3.0", + "doctrine/orm": "3.6.x-dev", + "doctrine/persistence": "^2.0|^3.0|^4.0", "mongodb/mongodb": "^1.17", "pda/pheanstalk": "^3.1", "aws/aws-sdk-php": "^3.290", @@ -53,20 +53,20 @@ "phpunit/phpunit": "^9.5.28", "phpstan/phpstan": "^1.0", "queue-interop/queue-spec": "^0.6.2", - "symfony/browser-kit": "^6.2|^7.0", - "symfony/config": "^6.2|^7.0", - "symfony/process": "^6.2|^7.0", - "symfony/console": "^6.2|^7.0", - "symfony/dependency-injection": "^6.2|^7.0", - "symfony/event-dispatcher": "^6.2|^7.0", - "symfony/expression-language": "^6.2|^7.0", - "symfony/http-kernel": "^6.2|^7.0", - "symfony/filesystem": "^6.2|^7.0", - "symfony/framework-bundle": "^6.2|^7.0", - "symfony/validator": "^6.2|^7.0", - "symfony/yaml": "^6.2|^7.0", + "symfony/browser-kit": "^6.2|^7.0|^8.0", + "symfony/config": "^6.2|^7.0|^8.0", + "symfony/process": "^6.2|^7.0|^8.0", + "symfony/console": "^6.2|^7.0|^8.0", + "symfony/dependency-injection": "^6.2|^7.0|^8.0", + "symfony/event-dispatcher": "^6.2|^7.0|^8.0", + "symfony/expression-language": "^6.2|^7.0|^8.0", + "symfony/http-kernel": "^6.2|^7.0|^8.0", + "symfony/filesystem": "^6.2|^7.0|^8.0", + "symfony/framework-bundle": "^6.2|^7.0|^8.0", + "symfony/validator": "^6.2|^7.0|^8.0", + "symfony/yaml": "^6.2|^7.0|^8.0", "empi89/php-amqp-stubs": "*@dev", - "doctrine/doctrine-bundle": "^2.5", + "doctrine/doctrine-bundle": "^2.5|^3.1", "doctrine/mongodb-odm-bundle": "^4.7|^5.0", "alcaeus/mongo-php-adapter": "^1.0", "kwn/php-rdkafka-stubs": "^2.0.3", @@ -127,7 +127,7 @@ "ext-rdkafka": "4.0", "ext-bcmath": "1", "ext-mbstring": "1", - "ext-mongodb": "1.17.3", + "ext-mongodb": "1.21", "ext-sockets": "1" }, "prefer-stable": true, diff --git a/docker/bin/refresh-mysql-database.php b/docker/bin/refresh-mysql-database.php index 05e78f43d..72499b52c 100644 --- a/docker/bin/refresh-mysql-database.php +++ b/docker/bin/refresh-mysql-database.php @@ -9,8 +9,9 @@ $dbalContext = (new DbalConnectionFactory($dsn))->createContext(); -$dbalContext->getDbalConnection()->getSchemaManager()->dropAndCreateDatabase($database); -$dbalContext->getDbalConnection()->exec('USE '.$database); +$dbalContext->getDbalConnection()->createSchemaManager()->dropDatabase($database); +$dbalContext->getDbalConnection()->createSchemaManager()->createDatabase($database); +$dbalContext->getDbalConnection()->executeQuery('USE '.$database); $dbalContext->createDataBaseTable(); echo 'MySQL Database is updated'.\PHP_EOL; diff --git a/docker/bin/refresh-postgres-database.php b/docker/bin/refresh-postgres-database.php index 1d96c3c07..a2574614a 100644 --- a/docker/bin/refresh-postgres-database.php +++ b/docker/bin/refresh-postgres-database.php @@ -8,7 +8,9 @@ $dbalContext = (new DbalConnectionFactory($dsn))->createContext(); -$dbalContext->getDbalConnection()->getSchemaManager()->dropAndCreateDatabase('postgres'); +$database = 'postgres'; +$dbalContext->getDbalConnection()->createSchemaManager()->dropDatabase($database); +$dbalContext->getDbalConnection()->createSchemaManager()->createDatabase($database); $dbalContext->createDataBaseTable(); echo 'Postgresql Database is updated'.\PHP_EOL; diff --git a/pkg/amqp-bunny/.github/workflows/ci.yml b/pkg/amqp-bunny/.github/workflows/ci.yml index 5448d7b1a..cb2496813 100644 --- a/pkg/amqp-bunny/.github/workflows/ci.yml +++ b/pkg/amqp-bunny/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/amqp-ext/.github/workflows/ci.yml b/pkg/amqp-ext/.github/workflows/ci.yml index d48deb0af..16bb84a87 100644 --- a/pkg/amqp-ext/.github/workflows/ci.yml +++ b/pkg/amqp-ext/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/amqp-lib/.github/workflows/ci.yml b/pkg/amqp-lib/.github/workflows/ci.yml index 0492424e8..ee354264b 100644 --- a/pkg/amqp-lib/.github/workflows/ci.yml +++ b/pkg/amqp-lib/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/amqp-tools/.github/workflows/ci.yml b/pkg/amqp-tools/.github/workflows/ci.yml index 5448d7b1a..cb2496813 100644 --- a/pkg/amqp-tools/.github/workflows/ci.yml +++ b/pkg/amqp-tools/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/async-command/.github/workflows/ci.yml b/pkg/async-command/.github/workflows/ci.yml index 0492424e8..ee354264b 100644 --- a/pkg/async-command/.github/workflows/ci.yml +++ b/pkg/async-command/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/async-command/DependencyInjection/AsyncCommandExtension.php b/pkg/async-command/DependencyInjection/AsyncCommandExtension.php index c1a0fa8f8..f1517e31f 100644 --- a/pkg/async-command/DependencyInjection/AsyncCommandExtension.php +++ b/pkg/async-command/DependencyInjection/AsyncCommandExtension.php @@ -9,7 +9,7 @@ class AsyncCommandExtension extends Extension { - public function load(array $configs, ContainerBuilder $container) + public function load(array $configs, ContainerBuilder $container): void { foreach ($configs['clients'] as $client) { // BC compatibility diff --git a/pkg/async-command/composer.json b/pkg/async-command/composer.json index 95d57ce3a..4fe65d7a7 100644 --- a/pkg/async-command/composer.json +++ b/pkg/async-command/composer.json @@ -9,16 +9,16 @@ "php": "^8.1", "enqueue/enqueue": "^0.10", "queue-interop/queue-interop": "^0.8", - "symfony/console": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0" + "symfony/console": "^6.2|^7.0|^8.0", + "symfony/process": "^6.2|^7.0|^8.0" }, "require-dev": { "phpunit/phpunit": "^9.5", - "symfony/dependency-injection": "^5.4|^6.0", - "symfony/config": "^5.4|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/filesystem": "^5.4|^6.0", - "symfony/yaml": "^5.4|^6.0", + "symfony/dependency-injection": "^6.2|^7.0|^8.0", + "symfony/config": "^6.2|^7.0|^8.0", + "symfony/http-kernel": "^6.2|^7.0|^8.0", + "symfony/filesystem": "^6.2|^7.0|^8.0", + "symfony/yaml": "^6.2|^7.0|^8.0", "enqueue/null": "0.10.x-dev", "enqueue/fs": "0.10.x-dev", "enqueue/test": "0.10.x-dev" @@ -31,7 +31,7 @@ "docs": "https://github.com/php-enqueue/enqueue-dev/blob/master/docs/index.md" }, "suggest": { - "symfony/dependency-injection": "^5.4|^6.0 If you'd like to use async event dispatcher container extension." + "symfony/dependency-injection": "^6.2|^7.0|^8.0 If you'd like to use async event dispatcher container extension." }, "autoload": { "psr-4": { "Enqueue\\AsyncCommand\\": "" }, diff --git a/pkg/async-event-dispatcher/.github/workflows/ci.yml b/pkg/async-event-dispatcher/.github/workflows/ci.yml index 0492424e8..ee354264b 100644 --- a/pkg/async-event-dispatcher/.github/workflows/ci.yml +++ b/pkg/async-event-dispatcher/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/async-event-dispatcher/DependencyInjection/AsyncEventDispatcherExtension.php b/pkg/async-event-dispatcher/DependencyInjection/AsyncEventDispatcherExtension.php index 0b16ca650..947abd70b 100644 --- a/pkg/async-event-dispatcher/DependencyInjection/AsyncEventDispatcherExtension.php +++ b/pkg/async-event-dispatcher/DependencyInjection/AsyncEventDispatcherExtension.php @@ -13,7 +13,7 @@ class AsyncEventDispatcherExtension extends Extension { - public function load(array $configs, ContainerBuilder $container) + public function load(array $configs, ContainerBuilder $container): void { $config = $this->processConfiguration(new Configuration(), $configs); diff --git a/pkg/dbal/.github/workflows/ci.yml b/pkg/dbal/.github/workflows/ci.yml index 0492424e8..ee354264b 100644 --- a/pkg/dbal/.github/workflows/ci.yml +++ b/pkg/dbal/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/dbal/DbalConnectionFactory.php b/pkg/dbal/DbalConnectionFactory.php index 305375a89..c2c8bab3b 100644 --- a/pkg/dbal/DbalConnectionFactory.php +++ b/pkg/dbal/DbalConnectionFactory.php @@ -6,6 +6,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\DriverManager; +use Doctrine\DBAL\Tools\DsnParser; use Enqueue\Dsn\Dsn; use Interop\Queue\ConnectionFactory; use Interop\Queue\Context; @@ -86,7 +87,16 @@ private function establishConnection(): Connection { if (false == $this->connection) { $this->connection = DriverManager::getConnection($this->config['connection']); - $this->connection->connect(); + if ( + method_exists($this->connection, 'connect') + && (new \ReflectionMethod($this->connection, 'connect'))->isPublic() + ) { + // DBAL < 4 + $this->connection->connect(); + } else { + // DBAL >= 4 + $this->connection->getServerVersion(); // calls connect() internally + } } return $this->connection; @@ -96,18 +106,21 @@ private function parseDsn(string $dsn, ?array $config = null): array { $parsedDsn = Dsn::parseFirst($dsn); + // enqueue scheme => dbal scheme + // out of the box dbal 4 schemes: pdo_mysql, pdo_sqlite, pdo_pgsql, pdo_oci, oci8, ibm_db2, pdo_sqlsrv, mysqli, pgsql, sqlsrv, sqlite3 + // in case of multiple drivers like mysqli vs pdo_mysql the pdo variant is preferred $supported = [ - 'db2' => 'db2', - 'ibm-db2' => 'ibm-db2', - 'mssql' => 'mssql', + 'db2' => 'ibm_db2', + 'ibm-db2' => 'ibm_db2', + 'mssql' => 'pdo_sqlsrv', 'sqlsrv+pdo' => 'pdo_sqlsrv', - 'mysql' => 'mysql', - 'mysql2' => 'mysql2', + 'mysql' => 'pdo_mysql', + 'mysql2' => 'mysqli', 'mysql+pdo' => 'pdo_mysql', 'pgsql' => 'pgsql', - 'postgres' => 'postgres', + 'postgres' => 'pdo_pgsql', 'pgsql+pdo' => 'pdo_pgsql', - 'sqlite' => 'sqlite', + 'sqlite' => 'sqlite3', 'sqlite3' => 'sqlite3', 'sqlite+pdo' => 'pdo_sqlite', ]; @@ -133,13 +146,26 @@ private function parseDsn(string $dsn, ?array $config = null): array ]; } + if (class_exists(DsnParser::class)) { // DBAL >= 4 + if ($dsnHasProtocolOnly) { + $dsn = $parsedDsn->getScheme().'://root@localhost'; + } + + $dsnParser = new DsnParser($supported); + + return [ + 'lazy' => true, + 'connection' => $dsnParser->parse($dsn), + ]; + } + + $dsn = $dsnHasProtocolOnly ? + $doctrineScheme.'://root@localhost' : + str_replace($parsedDsn->getScheme(), $doctrineScheme, $dsn); + return [ 'lazy' => true, - 'connection' => [ - 'url' => $dsnHasProtocolOnly ? - $doctrineScheme.'://root@localhost' : - str_replace($parsedDsn->getScheme(), $doctrineScheme, $dsn), - ], + 'connection' => ['url' => $dsn], ]; } } diff --git a/pkg/dbal/DbalContext.php b/pkg/dbal/DbalContext.php index 869dd67b8..856406a8b 100644 --- a/pkg/dbal/DbalContext.php +++ b/pkg/dbal/DbalContext.php @@ -209,7 +209,7 @@ public function getDbalConnection(): Connection public function createDataBaseTable(): void { - $sm = $this->getDbalConnection()->getSchemaManager(); + $sm = $this->getDbalConnection()->createSchemaManager(); if ($sm->tablesExist([$this->getTableName()])) { return; @@ -223,7 +223,7 @@ public function createDataBaseTable(): void $table->addColumn('headers', DbalType::TEXT, ['notnull' => false]); $table->addColumn('properties', DbalType::TEXT, ['notnull' => false]); $table->addColumn('redelivered', DbalType::BOOLEAN, ['notnull' => false]); - $table->addColumn('queue', DbalType::STRING); + $table->addColumn('queue', DbalType::STRING, ['length' => 255]); $table->addColumn('priority', DbalType::SMALLINT, ['notnull' => false]); $table->addColumn('delayed_until', DbalType::BIGINT, ['notnull' => false]); $table->addColumn('time_to_live', DbalType::BIGINT, ['notnull' => false]); diff --git a/pkg/dbal/ManagerRegistryConnectionFactory.php b/pkg/dbal/ManagerRegistryConnectionFactory.php index 430633151..602a76762 100644 --- a/pkg/dbal/ManagerRegistryConnectionFactory.php +++ b/pkg/dbal/ManagerRegistryConnectionFactory.php @@ -59,8 +59,18 @@ public function close(): void private function establishConnection(): Connection { + /** @var Connection $connection */ $connection = $this->registry->getConnection($this->config['connection_name']); - $connection->connect(); + if ( + method_exists($connection, 'connect') + && (new \ReflectionMethod($connection, 'connect'))->isPublic() + ) { + // DBAL < 4 + $connection->connect(); + } else { + // DBAL >= 4, calls connect() internally + $connection->getServerVersion(); + } return $connection; } diff --git a/pkg/dbal/Tests/Spec/Mysql/CreateDbalContextTrait.php b/pkg/dbal/Tests/Spec/Mysql/CreateDbalContextTrait.php index 8f76cb2ff..8265bc18f 100644 --- a/pkg/dbal/Tests/Spec/Mysql/CreateDbalContextTrait.php +++ b/pkg/dbal/Tests/Spec/Mysql/CreateDbalContextTrait.php @@ -16,8 +16,8 @@ protected function createDbalContext() $context = $factory->createContext(); - if ($context->getDbalConnection()->getSchemaManager()->tablesExist([$context->getTableName()])) { - $context->getDbalConnection()->getSchemaManager()->dropTable($context->getTableName()); + if ($context->getDbalConnection()->createSchemaManager()->tablesExist([$context->getTableName()])) { + $context->getDbalConnection()->createSchemaManager()->dropTable($context->getTableName()); } $context->createDataBaseTable(); diff --git a/pkg/dbal/Tests/Spec/Postgresql/CreateDbalContextTrait.php b/pkg/dbal/Tests/Spec/Postgresql/CreateDbalContextTrait.php index fe5a19a0c..709980e87 100644 --- a/pkg/dbal/Tests/Spec/Postgresql/CreateDbalContextTrait.php +++ b/pkg/dbal/Tests/Spec/Postgresql/CreateDbalContextTrait.php @@ -16,8 +16,8 @@ protected function createDbalContext() $context = $factory->createContext(); - if ($context->getDbalConnection()->getSchemaManager()->tablesExist([$context->getTableName()])) { - $context->getDbalConnection()->getSchemaManager()->dropTable($context->getTableName()); + if ($context->getDbalConnection()->createSchemaManager()->tablesExist([$context->getTableName()])) { + $context->getDbalConnection()->createSchemaManager()->dropTable($context->getTableName()); } $context->createDataBaseTable(); diff --git a/pkg/dbal/composer.json b/pkg/dbal/composer.json index 9499d394d..adc0b6c44 100644 --- a/pkg/dbal/composer.json +++ b/pkg/dbal/composer.json @@ -8,8 +8,8 @@ "require": { "php": "^8.1", "queue-interop/queue-interop": "^0.8", - "doctrine/dbal": "^2.12|^3.1", - "doctrine/persistence": "^2.0|^3.0", + "doctrine/dbal": "^3.2|^4.0", + "doctrine/persistence": "^2.0|^3.0|^4.0", "ramsey/uuid": "^3.5|^4" }, "require-dev": { diff --git a/pkg/dsn/.github/workflows/ci.yml b/pkg/dsn/.github/workflows/ci.yml index 71bcbbd61..11567d7a6 100644 --- a/pkg/dsn/.github/workflows/ci.yml +++ b/pkg/dsn/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/enqueue-bundle/.github/workflows/ci.yml b/pkg/enqueue-bundle/.github/workflows/ci.yml index 4c397bef1..0dc4592d9 100644 --- a/pkg/enqueue-bundle/.github/workflows/ci.yml +++ b/pkg/enqueue-bundle/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/enqueue-bundle/Consumption/Extension/DoctrinePingConnectionExtension.php b/pkg/enqueue-bundle/Consumption/Extension/DoctrinePingConnectionExtension.php index 7fd9527db..a33739870 100644 --- a/pkg/enqueue-bundle/Consumption/Extension/DoctrinePingConnectionExtension.php +++ b/pkg/enqueue-bundle/Consumption/Extension/DoctrinePingConnectionExtension.php @@ -36,7 +36,16 @@ public function onMessageReceived(MessageReceived $context): void ); $connection->close(); - $connection->connect(); + if ( + method_exists($connection, 'connect') + && (new \ReflectionMethod($connection, 'connect'))->isPublic() + ) { + // DBAL < 4 + $connection->connect(); + } else { + // DBAL >= 4, calls connect() internally + $connection->getServerVersion(); + } $context->getLogger()->debug( '[DoctrinePingConnectionExtension] Connection is active now.' diff --git a/pkg/enqueue-bundle/Consumption/Extension/ResetServicesExtension.php b/pkg/enqueue-bundle/Consumption/Extension/ResetServicesExtension.php index 0bf642197..05c79bd57 100644 --- a/pkg/enqueue-bundle/Consumption/Extension/ResetServicesExtension.php +++ b/pkg/enqueue-bundle/Consumption/Extension/ResetServicesExtension.php @@ -4,18 +4,12 @@ use Enqueue\Consumption\Context\PostMessageReceived; use Enqueue\Consumption\PostMessageReceivedExtensionInterface; -use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter; +use Symfony\Contracts\Service\ResetInterface; class ResetServicesExtension implements PostMessageReceivedExtensionInterface { - /** - * @var ServicesResetter - */ - private $resetter; - - public function __construct(ServicesResetter $resetter) + public function __construct(private ResetInterface $resetter) { - $this->resetter = $resetter; } public function onPostMessageReceived(PostMessageReceived $context): void diff --git a/pkg/enqueue-bundle/Tests/Functional/App/AppKernel.php b/pkg/enqueue-bundle/Tests/Functional/App/AppKernel.php index 3cafeedda..5ec2e75cd 100644 --- a/pkg/enqueue-bundle/Tests/Functional/App/AppKernel.php +++ b/pkg/enqueue-bundle/Tests/Functional/App/AppKernel.php @@ -28,14 +28,8 @@ public function getLogDir(): string return sys_get_temp_dir().'/EnqueueBundle/cache/logs'; } - public function registerContainerConfiguration(LoaderInterface $loader) + public function registerContainerConfiguration(LoaderInterface $loader): void { - if (self::VERSION_ID < 60000) { - $loader->load(__DIR__.'/config/config-sf5.yml'); - - return; - } - $loader->load(__DIR__.'/config/config.yml'); } diff --git a/pkg/enqueue-bundle/Tests/Functional/App/CustomAppKernel.php b/pkg/enqueue-bundle/Tests/Functional/App/CustomAppKernel.php index 81d73796e..5009adc69 100644 --- a/pkg/enqueue-bundle/Tests/Functional/App/CustomAppKernel.php +++ b/pkg/enqueue-bundle/Tests/Functional/App/CustomAppKernel.php @@ -64,14 +64,9 @@ protected function getContainerClass(): string return parent::getContainerClass().'Custom'.$this->enqueueConfigId; } - protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader) + protected function configureContainer(ContainerBuilder $c, LoaderInterface $loader): void { - if (self::VERSION_ID < 60000) { - $loader->load(__DIR__.'/config/custom-config-sf5.yml'); - } else { - $loader->load(__DIR__.'/config/custom-config.yml'); - } - + $loader->load(__DIR__.'/config/custom-config.yml'); $c->loadFromExtension('enqueue', $this->enqueueConfig); } diff --git a/pkg/enqueue-bundle/Tests/Functional/App/config/config-sf5.yml b/pkg/enqueue-bundle/Tests/Functional/App/config/config-sf5.yml deleted file mode 100644 index e202bb86f..000000000 --- a/pkg/enqueue-bundle/Tests/Functional/App/config/config-sf5.yml +++ /dev/null @@ -1,129 +0,0 @@ -parameters: - locale: 'en' - secret: 'ThisTokenIsNotSoSecretChangeIt' - - -framework: - #esi: ~ - #translator: { fallback: "%locale%" } - test: ~ - assets: false - session: - # option incompatible with Symfony 6 - storage_id: session.storage.mock_file - secret: '%secret%' - router: { resource: '%kernel.project_dir%/config/routing.yml' } - default_locale: '%locale%' - -doctrine: - dbal: - url: "%env(DOCTRINE_DSN)%" - driver: pdo_mysql - charset: UTF8 - -enqueue: - default: - transport: 'null:' - client: - traceable_producer: true - job: true - async_events: true - async_commands: - enabled: true - timeout: 60 - command_name: ~ - queue_name: ~ - -services: - test_enqueue.client.default.traceable_producer: - alias: 'enqueue.client.default.traceable_producer' - public: true - - test_enqueue.transport.default.queue_consumer: - alias: 'enqueue.transport.default.queue_consumer' - public: true - - test_enqueue.client.default.queue_consumer: - alias: 'enqueue.client.default.queue_consumer' - public: true - - test_enqueue.transport.default.rpc_client: - alias: 'enqueue.transport.default.rpc_client' - public: true - - test_enqueue.client.default.producer: - alias: 'enqueue.client.default.producer' - public: true - - test_enqueue.client.default.spool_producer: - alias: 'enqueue.client.default.spool_producer' - public: true - - test_Enqueue\Client\ProducerInterface: - alias: 'Enqueue\Client\ProducerInterface' - public: true - - test_enqueue.client.default.driver: - alias: 'enqueue.client.default.driver' - public: true - - test_enqueue.transport.default.context: - alias: 'enqueue.transport.default.context' - public: true - - test_enqueue.client.consume_command: - alias: 'enqueue.client.consume_command' - public: true - - test.enqueue.client.routes_command: - alias: 'enqueue.client.routes_command' - public: true - - test.enqueue.events.async_processor: - alias: 'enqueue.events.async_processor' - public: true - - test_async_listener: - class: 'Enqueue\Bundle\Tests\Functional\App\TestAsyncListener' - public: true - tags: - - { name: 'kernel.event_listener', async: true, event: 'test_async', method: 'onEvent', dispatcher: 'enqueue.events.event_dispatcher' } - - test_command_subscriber_processor: - class: 'Enqueue\Bundle\Tests\Functional\App\TestCommandSubscriberProcessor' - public: true - tags: - - { name: 'enqueue.command_subscriber', client: 'default' } - - test_topic_subscriber_processor: - class: 'Enqueue\Bundle\Tests\Functional\App\TestTopicSubscriberProcessor' - public: true - tags: - - { name: 'enqueue.topic_subscriber', client: 'default' } - - test_exclusive_command_subscriber_processor: - class: 'Enqueue\Bundle\Tests\Functional\App\TestExclusiveCommandSubscriberProcessor' - public: true - tags: - - { name: 'enqueue.command_subscriber', client: 'default' } - - test_async_subscriber: - class: 'Enqueue\Bundle\Tests\Functional\App\TestAsyncSubscriber' - public: true - tags: - - { name: 'kernel.event_subscriber', async: true, dispatcher: 'enqueue.events.event_dispatcher' } - - test_async_event_transformer: - class: 'Enqueue\Bundle\Tests\Functional\App\TestAsyncEventTransformer' - public: true - arguments: - - '@enqueue.transport.default.context' - tags: - - {name: 'enqueue.event_transformer', eventName: 'test_async', transformerName: 'test_async' } - - {name: 'enqueue.event_transformer', eventName: 'test_async_subscriber', transformerName: 'test_async' } - - # overwrite async listener with one based on client producer. so we can use traceable producer. - enqueue.events.async_listener: - class: 'Enqueue\Bundle\Tests\Functional\App\AsyncListener' - public: true - arguments: ['@enqueue.client.default.producer', '@enqueue.events.registry'] diff --git a/pkg/enqueue-bundle/Tests/Functional/App/config/custom-config-sf5.yml b/pkg/enqueue-bundle/Tests/Functional/App/config/custom-config-sf5.yml deleted file mode 100644 index 35192652e..000000000 --- a/pkg/enqueue-bundle/Tests/Functional/App/config/custom-config-sf5.yml +++ /dev/null @@ -1,85 +0,0 @@ -parameters: - locale: 'en' - secret: 'ThisTokenIsNotSoSecretChangeIt' - -framework: - #esi: ~ - #translator: { fallback: "%locale%" } - test: ~ - assets: false - session: - # the only option incompatible with Symfony 6 - storage_id: session.storage.mock_file - secret: '%secret%' - router: { resource: '%kernel.project_dir%/config/routing.yml' } - default_locale: '%locale%' - -doctrine: - dbal: - connections: - custom: - url: "%env(DOCTRINE_DSN)%" - driver: pdo_mysql - charset: UTF8 - -services: - test_enqueue.client.default.driver: - alias: 'enqueue.client.default.driver' - public: true - - test_enqueue.client.default.producer: - alias: 'enqueue.client.default.producer' - public: true - - test_enqueue.client.default.lazy_producer: - alias: 'enqueue.client.default.lazy_producer' - public: true - - test_enqueue.transport.default.context: - alias: 'enqueue.transport.default.context' - public: true - - test_enqueue.transport.consume_command: - alias: 'enqueue.transport.consume_command' - public: true - - test_enqueue.client.consume_command: - alias: 'enqueue.client.consume_command' - public: true - - test_enqueue.client.produce_command: - alias: 'enqueue.client.produce_command' - public: true - - test_enqueue.client.setup_broker_command: - alias: 'enqueue.client.setup_broker_command' - public: true - - test.message.processor: - class: 'Enqueue\Bundle\Tests\Functional\TestProcessor' - public: true - tags: - - { name: 'enqueue.topic_subscriber', client: 'default' } - - { name: 'enqueue.transport.processor', transport: 'default' } - - test.message.command_processor: - class: 'Enqueue\Bundle\Tests\Functional\TestCommandProcessor' - public: true - tags: - - { name: 'enqueue.command_subscriber', client: 'default' } - - test.sqs_client: - public: true - class: 'Aws\Sqs\SqsClient' - arguments: - - - endpoint: '%env(AWS_SQS_ENDPOINT)%' - region: '%env(AWS_SQS_REGION)%' - version: '%env(AWS_SQS_VERSION)%' - credentials: - key: '%env(AWS_SQS_KEY)%' - secret: '%env(AWS_SQS_SECRET)%' - - test.sqs_custom_connection_factory_factory: - class: 'Enqueue\Bundle\Tests\Functional\App\SqsCustomConnectionFactoryFactory' - arguments: ['@service_container'] diff --git a/pkg/enqueue-bundle/Tests/Unit/Consumption/Extension/DoctrinePingConnectionExtensionTest.php b/pkg/enqueue-bundle/Tests/Unit/Consumption/Extension/DoctrinePingConnectionExtensionTest.php index 36df82e52..b690fa290 100644 --- a/pkg/enqueue-bundle/Tests/Unit/Consumption/Extension/DoctrinePingConnectionExtensionTest.php +++ b/pkg/enqueue-bundle/Tests/Unit/Consumption/Extension/DoctrinePingConnectionExtensionTest.php @@ -41,10 +41,19 @@ public function testShouldNotReconnectIfConnectionIsOK() ->expects($this->never()) ->method('close') ; - $connection - ->expects($this->never()) - ->method('connect') - ; + if ( + method_exists(Connection::class, 'connect') + && (new \ReflectionMethod(Connection::class, 'connect'))->isPublic() + ) { + // DBAL < 4 + $connection->expects($this->never()) + ->method('connect'); + } else { + // DBAL >= 4, calls connect() internally + $connection + ->expects($this->never()) + ->method('getServerVersion'); + } $context = $this->createContext(); @@ -81,10 +90,18 @@ public function testShouldDoesReconnectIfConnectionFailed() ->expects($this->once()) ->method('close') ; - $connection - ->expects($this->once()) - ->method('connect') - ; + if ( + method_exists(Connection::class, 'connect') + && (new \ReflectionMethod(Connection::class, 'connect'))->isPublic() + ) { + // DBAL < 4 + $connection->expects($this->once()) + ->method('connect'); + } else { + // DBAL >= 4, calls connect() internally + $connection->expects($this->once()) + ->method('getServerVersion'); + } $context = $this->createContext(); diff --git a/pkg/enqueue-bundle/Tests/Unit/Consumption/Extension/ResetServicesExtensionTest.php b/pkg/enqueue-bundle/Tests/Unit/Consumption/Extension/ResetServicesExtensionTest.php index 63282a255..e0d96fafa 100644 --- a/pkg/enqueue-bundle/Tests/Unit/Consumption/Extension/ResetServicesExtensionTest.php +++ b/pkg/enqueue-bundle/Tests/Unit/Consumption/Extension/ResetServicesExtensionTest.php @@ -12,7 +12,7 @@ use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; -use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter; +use Symfony\Contracts\Service\ResetInterface; class ResetServicesExtensionTest extends TestCase { @@ -50,8 +50,8 @@ protected function createContext(): PostMessageReceived /** * @return MockObject|ManagerRegistry */ - protected function createResetterMock(): ServicesResetter + protected function createResetterMock(): ResetInterface { - return $this->createMock(ServicesResetter::class); + return $this->createMock(ResetInterface::class); } } diff --git a/pkg/enqueue-bundle/composer.json b/pkg/enqueue-bundle/composer.json index 99d237bf6..6c5638c43 100644 --- a/pkg/enqueue-bundle/composer.json +++ b/pkg/enqueue-bundle/composer.json @@ -36,7 +36,7 @@ "enqueue/async-event-dispatcher": "0.10.x-dev", "enqueue/async-command": "0.10.x-dev", "php-amqplib/php-amqplib": "^3.0", - "doctrine/doctrine-bundle": "^2.3.2", + "doctrine/doctrine-bundle": "^2.5|^3.1", "doctrine/mongodb-odm-bundle": "^3.5|^4.3|^5.0", "alcaeus/mongo-php-adapter": "^1.0", "symfony/browser-kit": "^6.2|^7.0", diff --git a/pkg/enqueue/.github/workflows/ci.yml b/pkg/enqueue/.github/workflows/ci.yml index 28a46e908..d533732a6 100644 --- a/pkg/enqueue/.github/workflows/ci.yml +++ b/pkg/enqueue/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/enqueue/Tests/Symfony/Client/Mock/SetupBrokerExtensionCommand.php b/pkg/enqueue/Tests/Symfony/Client/Mock/SetupBrokerExtensionCommand.php index c21750592..a4978eaf6 100644 --- a/pkg/enqueue/Tests/Symfony/Client/Mock/SetupBrokerExtensionCommand.php +++ b/pkg/enqueue/Tests/Symfony/Client/Mock/SetupBrokerExtensionCommand.php @@ -22,7 +22,7 @@ public function getExtension() return $this->extension; } - protected function configure() + protected function configure(): void { parent::configure(); diff --git a/pkg/enqueue/Tests/Symfony/Consumption/Mock/LimitsExtensionsCommand.php b/pkg/enqueue/Tests/Symfony/Consumption/Mock/LimitsExtensionsCommand.php index 05e0c56ba..b15fe82fd 100644 --- a/pkg/enqueue/Tests/Symfony/Consumption/Mock/LimitsExtensionsCommand.php +++ b/pkg/enqueue/Tests/Symfony/Consumption/Mock/LimitsExtensionsCommand.php @@ -18,7 +18,7 @@ public function getExtensions() return $this->extensions; } - protected function configure() + protected function configure(): void { parent::configure(); diff --git a/pkg/enqueue/Tests/Symfony/Consumption/Mock/QueueConsumerOptionsCommand.php b/pkg/enqueue/Tests/Symfony/Consumption/Mock/QueueConsumerOptionsCommand.php index 147a3b905..55aa0ab48 100644 --- a/pkg/enqueue/Tests/Symfony/Consumption/Mock/QueueConsumerOptionsCommand.php +++ b/pkg/enqueue/Tests/Symfony/Consumption/Mock/QueueConsumerOptionsCommand.php @@ -24,7 +24,7 @@ public function __construct(QueueConsumerInterface $consumer) $this->consumer = $consumer; } - protected function configure() + protected function configure(): void { parent::configure(); diff --git a/pkg/fs/.github/workflows/ci.yml b/pkg/fs/.github/workflows/ci.yml index 65cfbbb2d..1ebc0553d 100644 --- a/pkg/fs/.github/workflows/ci.yml +++ b/pkg/fs/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/gearman/.github/workflows/ci.yml b/pkg/gearman/.github/workflows/ci.yml index 28ae81b0f..c92f597a3 100644 --- a/pkg/gearman/.github/workflows/ci.yml +++ b/pkg/gearman/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/gps/.github/workflows/ci.yml b/pkg/gps/.github/workflows/ci.yml index 0492424e8..ee354264b 100644 --- a/pkg/gps/.github/workflows/ci.yml +++ b/pkg/gps/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/job-queue/.github/workflows/ci.yml b/pkg/job-queue/.github/workflows/ci.yml index 28a9a9c02..736390c3a 100644 --- a/pkg/job-queue/.github/workflows/ci.yml +++ b/pkg/job-queue/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/job-queue/Doctrine/JobStorage.php b/pkg/job-queue/Doctrine/JobStorage.php index 4db585696..a68cc52b3 100644 --- a/pkg/job-queue/Doctrine/JobStorage.php +++ b/pkg/job-queue/Doctrine/JobStorage.php @@ -136,7 +136,7 @@ public function saveJob(Job $job, ?\Closure $lockCallback = null) throw new \LogicException('Is not possible to create new job with lock, only update is allowed'); } - $this->getEntityManager()->transactional(function (EntityManager $em) use ($job, $lockCallback) { + $this->getEntityManager()->wrapInTransaction(function (EntityManager $em) use ($job, $lockCallback) { /** @var Job $job */ $job = $this->getEntityRepository()->find($job->getId(), LockMode::PESSIMISTIC_WRITE); diff --git a/pkg/job-queue/Test/DbalPersistedConnection.php b/pkg/job-queue/Test/DbalPersistedConnection.php index 470a65176..512096acb 100644 --- a/pkg/job-queue/Test/DbalPersistedConnection.php +++ b/pkg/job-queue/Test/DbalPersistedConnection.php @@ -22,10 +22,10 @@ class DbalPersistedConnection extends Connection */ protected static $persistedTransactionNestingLevels; - public function connect() + public function connect(): DriverConnection { if ($this->isConnected()) { - return false; + return $this->_conn; } if ($this->hasPersistedConnection()) { @@ -35,28 +35,22 @@ public function connect() $this->persistConnection($this->_conn); } - return true; + return $this->_conn; } - public function beginTransaction() + public function beginTransaction(): void { $this->wrapTransactionNestingLevel('beginTransaction'); - - return true; } - public function commit() + public function commit(): void { $this->wrapTransactionNestingLevel('commit'); - - return true; } - public function rollBack() + public function rollBack(): void { $this->wrapTransactionNestingLevel('rollBack'); - - return true; } /** diff --git a/pkg/job-queue/Tests/Doctrine/JobStorageTest.php b/pkg/job-queue/Tests/Doctrine/JobStorageTest.php index 73f130d52..e86d0d601 100644 --- a/pkg/job-queue/Tests/Doctrine/JobStorageTest.php +++ b/pkg/job-queue/Tests/Doctrine/JobStorageTest.php @@ -170,7 +170,7 @@ public function testShouldSaveJobWithoutLockIfThereIsNoCallbackAndChildJob() ; $em ->expects($this->never()) - ->method('transactional') + ->method('wrapInTransaction') ; $em ->expects($this->any()) @@ -224,7 +224,7 @@ public function testShouldSaveJobWithLockIfWithCallback() ; $em ->expects($this->once()) - ->method('transactional') + ->method('wrapInTransaction') ; $em ->expects($this->any()) @@ -387,7 +387,7 @@ public function testShouldLockEntityAndPassNewInstanceIntoCallback() ; $em ->expects($this->once()) - ->method('transactional') + ->method('wrapInTransaction') ->willReturnCallback(function ($callback) use ($em) { $callback($em); }) @@ -536,7 +536,7 @@ public function testShouldDeleteRecordFromUniqueTableIfJobIsUniqueAndStoppedAtIs ; $em ->expects($this->once()) - ->method('transactional') + ->method('wrapInTransaction') ->willReturnCallback(function ($callback) use ($em) { $callback($em); }) diff --git a/pkg/job-queue/Tests/Functional/app/AppKernel.php b/pkg/job-queue/Tests/Functional/app/AppKernel.php index b51969f68..fe31ceb86 100644 --- a/pkg/job-queue/Tests/Functional/app/AppKernel.php +++ b/pkg/job-queue/Tests/Functional/app/AppKernel.php @@ -25,14 +25,8 @@ public function getLogDir(): string return sys_get_temp_dir().'/EnqueueJobQueue/cache/logs'; } - public function registerContainerConfiguration(LoaderInterface $loader) + public function registerContainerConfiguration(LoaderInterface $loader): void { - if (self::VERSION_ID < 60000) { - $loader->load(__DIR__.'/config/config-sf5.yml'); - - return; - } - $loader->load(__DIR__.'/config/config.yml'); } diff --git a/pkg/job-queue/Tests/Functional/app/config/config-sf5.yml b/pkg/job-queue/Tests/Functional/app/config/config-sf5.yml deleted file mode 100644 index dd3467e11..000000000 --- a/pkg/job-queue/Tests/Functional/app/config/config-sf5.yml +++ /dev/null @@ -1,33 +0,0 @@ -parameters: - locale: 'en' - secret: 'ThisTokenIsNotSoSecretChangeIt' - -framework: - #esi: ~ - #translator: { fallback: "%locale%" } - test: ~ - assets: false - session: - # the only option incompatible with Symfony 6 - storage_id: session.storage.mock_file - secret: "%secret%" - router: { resource: "%kernel.project_dir%/config/routing.yml" } - default_locale: "%locale%" - -doctrine: - dbal: - url: "%env(DOCTRINE_DSN)%" - driver: pdo_mysql - charset: UTF8 - wrapper_class: "Enqueue\\JobQueue\\Test\\DbalPersistedConnection" - orm: - auto_generate_proxy_classes: true - auto_mapping: true - mappings: - TestEntity: - mapping: true - type: annotation - dir: '%kernel.project_dir%/Tests/Functional/Entity' - alias: 'EnqueueJobQueue' - prefix: 'Enqueue\JobQueue\Tests\Functional\Entity' - is_bundle: false diff --git a/pkg/job-queue/Tests/Functional/app/config/config.yml b/pkg/job-queue/Tests/Functional/app/config/config.yml index 0121acdbf..578a21df9 100644 --- a/pkg/job-queue/Tests/Functional/app/config/config.yml +++ b/pkg/job-queue/Tests/Functional/app/config/config.yml @@ -20,7 +20,6 @@ doctrine: charset: UTF8 wrapper_class: "Enqueue\\JobQueue\\Test\\DbalPersistedConnection" orm: - auto_generate_proxy_classes: true auto_mapping: true mappings: TestEntity: diff --git a/pkg/job-queue/composer.json b/pkg/job-queue/composer.json index 6616069b3..fec589eeb 100644 --- a/pkg/job-queue/composer.json +++ b/pkg/job-queue/composer.json @@ -11,16 +11,16 @@ "enqueue/null": "^0.10", "queue-interop/queue-interop": "^0.8", "doctrine/orm": "^2.12", - "doctrine/dbal": "^2.12 | ^3.0" + "doctrine/dbal": "^3.2|^4.0" }, "require-dev": { "phpunit/phpunit": "^9.5", "enqueue/test": "0.10.x-dev", - "doctrine/doctrine-bundle": "^2.3.2", - "symfony/browser-kit": "^5.4|^6.0", - "symfony/expression-language": "^5.4|^6.0", - "symfony/framework-bundle": "^5.4|^6.0", - "symfony/yaml": "^5.4|^6.0" + "doctrine/doctrine-bundle": "^2.5|^3.1", + "symfony/browser-kit": "^6.2|^7.0|^8.0", + "symfony/expression-language": "^6.2|^7.0|^8.0", + "symfony/framework-bundle": "^6.2|^7.0|^8.0", + "symfony/yaml": "^6.2|^7.0|^8.0" }, "support": { "email": "opensource@forma-pro.com", diff --git a/pkg/mongodb/.github/workflows/ci.yml b/pkg/mongodb/.github/workflows/ci.yml index 415baf634..26f0ab81a 100644 --- a/pkg/mongodb/.github/workflows/ci.yml +++ b/pkg/mongodb/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/monitoring/.github/workflows/ci.yml b/pkg/monitoring/.github/workflows/ci.yml index 5448d7b1a..cb2496813 100644 --- a/pkg/monitoring/.github/workflows/ci.yml +++ b/pkg/monitoring/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/null/.github/workflows/ci.yml b/pkg/null/.github/workflows/ci.yml index 0492424e8..ee354264b 100644 --- a/pkg/null/.github/workflows/ci.yml +++ b/pkg/null/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/pheanstalk/.github/workflows/ci.yml b/pkg/pheanstalk/.github/workflows/ci.yml index 0492424e8..ee354264b 100644 --- a/pkg/pheanstalk/.github/workflows/ci.yml +++ b/pkg/pheanstalk/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/rdkafka/.github/workflows/ci.yml b/pkg/rdkafka/.github/workflows/ci.yml index 9e0ceb121..b36a960aa 100644 --- a/pkg/rdkafka/.github/workflows/ci.yml +++ b/pkg/rdkafka/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/redis/.github/workflows/ci.yml b/pkg/redis/.github/workflows/ci.yml index 57d501bee..eccb7baed 100644 --- a/pkg/redis/.github/workflows/ci.yml +++ b/pkg/redis/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/simple-client/.github/workflows/ci.yml b/pkg/simple-client/.github/workflows/ci.yml index 604442a2f..da80afd96 100644 --- a/pkg/simple-client/.github/workflows/ci.yml +++ b/pkg/simple-client/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/sns/.github/workflows/ci.yml b/pkg/sns/.github/workflows/ci.yml index 0492424e8..ee354264b 100644 --- a/pkg/sns/.github/workflows/ci.yml +++ b/pkg/sns/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/snsqs/.github/workflows/ci.yml b/pkg/snsqs/.github/workflows/ci.yml index 0492424e8..ee354264b 100644 --- a/pkg/snsqs/.github/workflows/ci.yml +++ b/pkg/snsqs/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/sqs/.github/workflows/ci.yml b/pkg/sqs/.github/workflows/ci.yml index 0492424e8..ee354264b 100644 --- a/pkg/sqs/.github/workflows/ci.yml +++ b/pkg/sqs/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/stomp/.github/workflows/ci.yml b/pkg/stomp/.github/workflows/ci.yml index 0492424e8..ee354264b 100644 --- a/pkg/stomp/.github/workflows/ci.yml +++ b/pkg/stomp/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: diff --git a/pkg/wamp/.github/workflows/ci.yml b/pkg/wamp/.github/workflows/ci.yml index 5448d7b1a..cb2496813 100644 --- a/pkg/wamp/.github/workflows/ci.yml +++ b/pkg/wamp/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: strategy: fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] + php: ['8.1', '8.2', '8.3', '8.4', '8.5'] name: PHP ${{ matrix.php }} tests steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v6 - uses: shivammathur/setup-php@v2 with: