Skip to content

Commit c9e180e

Browse files
committed
fix phpstan 2.1.34
1 parent 1f44e47 commit c9e180e

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

bootstrap-types.php

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,25 @@
77
use Atk4\Data\Type\LocalObjectType;
88
use Atk4\Data\Type\MoneyType;
99
use Atk4\Data\Type\Types;
10-
use Doctrine\DBAL\Platforms\SqlitePlatform;
11-
use Doctrine\DBAL\Schema\SqliteSchemaManager;
10+
use Doctrine\DBAL\Platforms\SqlitePlatform; // @phpstan-ignore class.nameCase
11+
use Doctrine\DBAL\Platforms\SQLitePlatform as SQLitePlatform4;
12+
use Doctrine\DBAL\Schema\SqliteSchemaManager; // @phpstan-ignore class.nameCase
13+
use Doctrine\DBAL\Schema\SQLiteSchemaManager as SQLiteSchemaManager4;
1214
use Doctrine\DBAL\Types as DbalTypes;
1315

16+
// workaround https://github.com/phpstan/phpstan/issues/14036
17+
// remove once DBAL 3.x support is dropped
18+
try {
19+
new SQLitePlatform4();
20+
new SQLiteSchemaManager4(); // @phpstan-ignore arguments.count
21+
} catch (\Error $e) {
22+
}
23+
1424
// force SQLitePlatform and SQLiteSchemaManager classes load as in DBAL 3.x they are named with a different case
1525
// remove once DBAL 3.x support is dropped
1626
try {
17-
new SqlitePlatform(); // @phpstan-ignore class.notFound
18-
new SqliteSchemaManager(); // @phpstan-ignore class.notFound
27+
new SqlitePlatform(); // @phpstan-ignore class.nameCase
28+
new SqliteSchemaManager(); // @phpstan-ignore class.nameCase, arguments.count
1929
} catch (\Error $e) {
2030
}
2131

0 commit comments

Comments
 (0)