Skip to content

Commit c68ea40

Browse files
committed
dropped support for doctrine/dbal 2.x
1 parent 7ba5e78 commit c68ea40

File tree

4 files changed

+3
-30
lines changed

4 files changed

+3
-30
lines changed

.github/workflows/continuous-integration.yml

-9
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,17 @@ jobs:
3333
- "8.2"
3434
- "8.3"
3535
dbal-version:
36-
- "2.13.0"
3736
- "3.3.0"
3837
dependencies:
3938
- "highest"
4039
optional-dependencies:
4140
- true
4241
- false
4342
include:
44-
- php-version: "8.1"
45-
dbal-version: "2.13.0"
46-
dependencies: "lowest"
47-
optional-dependencies: false
4843
- php-version: "8.1"
4944
dbal-version: "3.3.0"
5045
dependencies: "lowest"
5146
optional-dependencies: false
52-
- php-version: "8.1"
53-
dbal-version: "2.13.0"
54-
dependencies: "lowest"
55-
optional-dependencies: true
5647
- php-version: "8.1"
5748
dbal-version: "3.3.0"
5849
dependencies: "lowest"

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"require": {
1414
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
1515
"ext-json": "*",
16-
"doctrine/dbal": "^2.13.7 || ^3.3.2",
16+
"doctrine/dbal": "^3.3.2",
1717
"doctrine/doctrine-laminas-hydrator": "^3.0.0",
1818
"doctrine/doctrine-module": "^5.3.0 || ^6.0.2",
19-
"doctrine/event-manager": "^1.1.1 || ^2.0.0",
19+
"doctrine/event-manager": "^2.0.0",
2020
"doctrine/orm": "^2.11.1",
2121
"doctrine/persistence": "^2.3.0 || ^3.0.0",
2222
"laminas/laminas-eventmanager": "^3.4.0",

phpstan.neon

-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ parameters:
1111
identifier: method.alreadyNarrowedType
1212
-
1313
identifier: function.alreadyNarrowedType
14-
-
15-
message: '#Method .*CliConfigurator::getHelpers\(\) .*ConnectionHelper#'
16-
path: src/CliConfigurator.php
1714
-
1815
message: '#Method .*DBALConnection::getDriverClass\(\) never returns null#'
1916
path: src/Options/DBALConnection.php

src/CliConfigurator.php

+1-16
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace DoctrineORMModule;
66

7-
use Doctrine\DBAL\Tools\Console\Command\ImportCommand;
8-
use Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper;
97
use Doctrine\Migrations\Tools\Console\Command\VersionCommand;
108
use Doctrine\ORM\EntityManagerInterface;
119
use Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper;
@@ -66,12 +64,6 @@ class CliConfigurator
6664
public function __construct(ContainerInterface $container)
6765
{
6866
$this->container = $container;
69-
70-
if (! class_exists(ImportCommand::class)) {
71-
return;
72-
}
73-
74-
$this->commands[] = 'doctrine.dbal_cmd.import';
7567
}
7668

7769
public function configure(Application $cli): void
@@ -97,17 +89,10 @@ public function configure(Application $cli): void
9789
*/
9890
private function getHelpers(EntityManagerInterface $objectManager): array
9991
{
100-
$helpers = [
92+
return [
10193
'dialog' => new QuestionHelper(),
10294
'em' => new EntityManagerHelper($objectManager),
10395
];
104-
105-
// this is only available with DBAL 2.x
106-
if (class_exists(ConnectionHelper::class)) {
107-
$helpers['db'] = new ConnectionHelper($objectManager->getConnection());
108-
}
109-
110-
return $helpers;
11196
}
11297

11398
private function createObjectManagerInputOption(): InputOption

0 commit comments

Comments
 (0)