Skip to content

Commit

Permalink
Support for Doctrine/DBAL 4 (#94)
Browse files Browse the repository at this point in the history
* Allow DBAL 4

* Update signature
  • Loading branch information
paranoiq authored Aug 19, 2024
1 parent c2f865f commit 6df0a64
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 119 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
],
"require": {
"php": "^8.1",
"doctrine/dbal": "^3.6.0",
"doctrine/dbal": "^3.6.0 || ^4.0.0",
"doctrine/orm": "^3.0.0",
"symfony/console": "^5.4.0 || ^6.0.0 || ^7.0.0"
},
Expand Down
134 changes: 18 additions & 116 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/MigrationDefaultExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace ShipMonk\Doctrine\Migration;

use Doctrine\DBAL\ArrayParameterType;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Result;
use Doctrine\DBAL\Types\Type;

Expand All @@ -20,7 +22,7 @@ public function __construct(

/**
* @param list<mixed>|array<string, mixed> $params
* @param array<int|string, int|string|Type|null> $types
* @param array<non-negative-int|string, string|Type|ParameterType|ArrayParameterType> $types
*/
public function executeQuery(string $statement, array $params = [], array $types = []): Result
{
Expand Down
4 changes: 3 additions & 1 deletion src/MigrationExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

namespace ShipMonk\Doctrine\Migration;

use Doctrine\DBAL\ArrayParameterType;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\ParameterType;
use Doctrine\DBAL\Result;
use Doctrine\DBAL\Types\Type;

Expand All @@ -11,7 +13,7 @@ interface MigrationExecutor

/**
* @param list<mixed>|array<string, mixed> $params
* @param array<int|string, int|string|Type|null> $types
* @param array<non-negative-int|string, string|Type|ParameterType|ArrayParameterType> $types
*/
public function executeQuery(string $statement, array $params = [], array $types = []): Result;

Expand Down

0 comments on commit 6df0a64

Please sign in to comment.