Skip to content

Commit c624e97

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

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
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 & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
use PHPStan\Type\Doctrine\Descriptors\StringType;
2727
use PHPStan\Type\Doctrine\Descriptors\Symfony\DatePointType;
2828
use PHPStan\Type\Doctrine\ObjectMetadataResolver;
29-
use Symfony\Component\Clock\DatePoint;
3029
use function array_unshift;
3130
use function strpos;
3231
use const PHP_VERSION_ID;
@@ -172,15 +171,20 @@ public function testRule(?string $objectManagerLoader): void
172171
'Property PHPStan\Rules\Doctrine\ORM\MyBrokenEntity::$invalidSimpleArray type mapping mismatch: property can contain array<int> but database expects array<string>.',
173172
162,
174173
],
175-
[
174+
];
175+
176+
$symfonyDoctrineBridgeVersion = InstalledVersions::getVersion('symfony/doctrine-bridge');
177+
$hasSymfonyDoctrineBridgeVersion = $symfonyDoctrineBridgeVersion !== null;
178+
if ($hasSymfonyDoctrineBridgeVersion) {
179+
$errors[] = [
176180
'Property PHPStan\Rules\Doctrine\ORM\MyBrokenEntity::$invalidDatePoint type mapping mismatch: database can contain Symfony\Component\Clock\DatePoint but property expects DateTime.',
177181
175,
178-
],
179-
[
182+
];
183+
$errors[] = [
180184
'Property PHPStan\Rules\Doctrine\ORM\MyBrokenEntity::$invalidDatePoint type mapping mismatch: property can contain DateTime but database expects Symfony\Component\Clock\DatePoint.',
181185
175,
182-
],
183-
];
186+
];
187+
}
184188

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

0 commit comments

Comments
 (0)