Skip to content

Commit 727b26f

Browse files
author
LDA
committed
Try to fix build
1 parent 622eea1 commit 727b26f

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

.github/workflows/platform-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- php-version: "8.3"
3838
update-packages: doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctrine-types:^3 gedmo/doctrine-extensions:^3
3939
- php-version: "8.4"
40-
update-packages: doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctrine-types:^3 gedmo/doctrine-extensions:^3
40+
update-packages: doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctrine-types:^3 gedmo/doctrine-extensions:^3 symfony/cache:^6.4 symfony/clock:^6.4 symfony/doctrine-bridge:^7.3 symfony/validator:^6.4
4141

4242
steps:
4343
- name: "Checkout"

composer.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@
3636
"phpstan/phpstan-strict-rules": "^2.0",
3737
"phpunit/phpunit": "^9.6.20",
3838
"ramsey/uuid": "^4.2",
39-
"symfony/cache": "^6.4",
40-
"symfony/clock": "^6.4",
41-
"symfony/doctrine-bridge": "^7.3",
42-
"symfony/validator": "^6.4"
39+
"symfony/cache": "^5.4"
4340
},
4441
"config": {
4542
"sort-packages": true,

tests/Rules/Doctrine/ORM/EntityColumnRuleTest.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,20 @@ public function testRule(?string $objectManagerLoader): void
172172
'Property PHPStan\Rules\Doctrine\ORM\MyBrokenEntity::$invalidSimpleArray type mapping mismatch: property can contain array<int> but database expects array<string>.',
173173
162,
174174
],
175-
[
175+
];
176+
177+
$symfonyDoctrineBridgeVersion = InstalledVersions::getVersion('symfony/doctrine-bridge');
178+
$hasSymfonyDoctrineBridgeVersion = $symfonyDoctrineBridgeVersion !== null;
179+
if ($hasSymfonyDoctrineBridgeVersion) {
180+
$errors[] = [
176181
'Property PHPStan\Rules\Doctrine\ORM\MyBrokenEntity::$invalidDatePoint type mapping mismatch: database can contain Symfony\Component\Clock\DatePoint but property expects DateTime.',
177182
175,
178-
],
179-
[
183+
];
184+
$errors[] = [
180185
'Property PHPStan\Rules\Doctrine\ORM\MyBrokenEntity::$invalidDatePoint type mapping mismatch: property can contain DateTime but database expects Symfony\Component\Clock\DatePoint.',
181186
175,
182-
],
183-
];
187+
];
188+
}
184189

185190
$dbalVersion = InstalledVersions::getVersion('doctrine/dbal');
186191
$hasDbal4 = $dbalVersion !== null && strpos($dbalVersion, '4.') === 0;

0 commit comments

Comments
 (0)