Skip to content

Commit

Permalink
dropped support for doctrine/dbal 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
driehle committed Dec 30, 2024
1 parent 7ba5e78 commit 86d8d7d
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 27 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,17 @@ jobs:
- "8.2"
- "8.3"
dbal-version:
- "2.13.0"
- "3.3.0"
dependencies:
- "highest"
optional-dependencies:
- 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"
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 0 additions & 3 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 0 additions & 13 deletions src/CliConfigurator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 86d8d7d

Please sign in to comment.