From 86d8d7d83be8d4a432e585ea411e5ecf59d7ac2e Mon Sep 17 00:00:00 2001 From: Dennis Riehle Date: Mon, 30 Dec 2024 14:37:38 +0100 Subject: [PATCH] dropped support for doctrine/dbal 2.x --- .github/workflows/continuous-integration.yml | 9 --------- composer.json | 4 ++-- phpstan.neon | 3 --- src/CliConfigurator.php | 13 ------------- 4 files changed, 2 insertions(+), 27 deletions(-) diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 3a7a45fd..ce162874 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -33,7 +33,6 @@ jobs: - "8.2" - "8.3" dbal-version: - - "2.13.0" - "3.3.0" dependencies: - "highest" @@ -41,18 +40,10 @@ jobs: - true - false include: - - php-version: "8.1" - dbal-version: "2.13.0" - dependencies: "lowest" - optional-dependencies: false - php-version: "8.1" dbal-version: "3.3.0" dependencies: "lowest" optional-dependencies: false - - php-version: "8.1" - dbal-version: "2.13.0" - dependencies: "lowest" - optional-dependencies: true - php-version: "8.1" dbal-version: "3.3.0" dependencies: "lowest" diff --git a/composer.json b/composer.json index 08d9320e..db14684d 100644 --- a/composer.json +++ b/composer.json @@ -13,10 +13,10 @@ "require": { "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "ext-json": "*", - "doctrine/dbal": "^2.13.7 || ^3.3.2", + "doctrine/dbal": "^3.3.2", "doctrine/doctrine-laminas-hydrator": "^3.0.0", "doctrine/doctrine-module": "^5.3.0 || ^6.0.2", - "doctrine/event-manager": "^1.1.1 || ^2.0.0", + "doctrine/event-manager": "^2.0.0", "doctrine/orm": "^2.11.1", "doctrine/persistence": "^2.3.0 || ^3.0.0", "laminas/laminas-eventmanager": "^3.4.0", diff --git a/phpstan.neon b/phpstan.neon index 33a56472..677e2018 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -11,9 +11,6 @@ parameters: identifier: method.alreadyNarrowedType - identifier: function.alreadyNarrowedType - - - message: '#Method .*CliConfigurator::getHelpers\(\) .*ConnectionHelper#' - path: src/CliConfigurator.php - message: '#Method .*DBALConnection::getDriverClass\(\) never returns null#' path: src/Options/DBALConnection.php diff --git a/src/CliConfigurator.php b/src/CliConfigurator.php index c96d7a66..d2f515c5 100644 --- a/src/CliConfigurator.php +++ b/src/CliConfigurator.php @@ -4,8 +4,6 @@ namespace DoctrineORMModule; -use Doctrine\DBAL\Tools\Console\Command\ImportCommand; -use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper; use Doctrine\Migrations\Tools\Console\Command\VersionCommand; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper; @@ -66,12 +64,6 @@ class CliConfigurator public function __construct(ContainerInterface $container) { $this->container = $container; - - if (! class_exists(ImportCommand::class)) { - return; - } - - $this->commands[] = 'doctrine.dbal_cmd.import'; } public function configure(Application $cli): void @@ -102,11 +94,6 @@ private function getHelpers(EntityManagerInterface $objectManager): array 'em' => new EntityManagerHelper($objectManager), ]; - // this is only available with DBAL 2.x - if (class_exists(ConnectionHelper::class)) { - $helpers['db'] = new ConnectionHelper($objectManager->getConnection()); - } - return $helpers; }