Skip to content

Commit

Permalink
Declare support for DBAL 3.8
Browse files Browse the repository at this point in the history
Because the latest doctrine/orm, v3.2, supports DBAL "^3.8.2 || ^4",
it would be nice to also support it here, as long as it not too much extra work.
  • Loading branch information
PowerKiKi committed Jul 10, 2024
1 parent 3812ec5 commit 5d10bff
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"require": {
"php": "~8.2.0 || ~8.3.0",
"doctrine/common": "^3.4.4",
"doctrine/dbal": "^4.0.4",
"doctrine/dbal": "^3.8.2 || ^4",
"doctrine/event-manager": "^2.0.1",
"doctrine/migrations": "^3.8.0",
"doctrine/orm": "^3.2.1",
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

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

8 changes: 7 additions & 1 deletion test/ConfigurationFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace RoaveTest\PsrContainerDoctrine;

use Composer\InstalledVersions;
use Composer\Semver\VersionParser;
use Doctrine\DBAL\Driver\Middleware;
use Doctrine\ORM\Cache\CacheConfiguration;
use Doctrine\ORM\Cache\DefaultCacheFactory;
Expand Down Expand Up @@ -211,7 +213,11 @@ public function testMistypeInSchemaAssetsFilterResolvedContainerId(): void
);

$this->expectException(TypeError::class);
$this->expectExceptionMessage('Doctrine\DBAL\Configuration::setSchemaAssetsFilter(): Argument #1 ($schemaAssetsFilter) must be of type callable, array given');
if (InstalledVersions::satisfies(new VersionParser(), 'doctrine/dbal', '^3.8')) {
$this->expectExceptionMessage('Doctrine\DBAL\Configuration::setSchemaAssetsFilter(): Argument #1 ($callable) must be of type ?callable, array given,');
} else {
$this->expectExceptionMessage('Doctrine\DBAL\Configuration::setSchemaAssetsFilter(): Argument #1 ($schemaAssetsFilter) must be of type callable, array given');
}

(new ConfigurationFactory())($container);
}
Expand Down

0 comments on commit 5d10bff

Please sign in to comment.