From edf1b7c914f7c15846a91b172a0ba7e235972eaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sat, 19 Nov 2022 15:25:26 +0100 Subject: [PATCH] Remove fragile assertions RuntimePublicReflectionProperty has been deprecated in favor of RuntimeReflectionProperty. Let us use a more robust assertion. --- composer.json | 2 +- tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index e6525f34d5a..b53eb45168f 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "doctrine/inflector": "^1.4 || ^2.0", "doctrine/instantiator": "^1.3", "doctrine/lexer": "^1.2.3", - "doctrine/persistence": "^2.4 || ^3", + "doctrine/persistence": "^2.4 || ^3.1", "psr/cache": "^1 || ^2 || ^3", "symfony/console": "^3.0 || ^4.0 || ^5.0 || ^6.0", "symfony/polyfill-php72": "^1.23", diff --git a/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php b/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php index ea3682f1d97..a4b40d1e35e 100644 --- a/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php +++ b/tests/Doctrine/Tests/ORM/Functional/ValueObjectsTest.php @@ -19,8 +19,8 @@ use Doctrine\ORM\Mapping\MappingException; use Doctrine\ORM\Mapping\ReflectionEmbeddedProperty; use Doctrine\ORM\Query\QueryException; -use Doctrine\Persistence\Reflection\RuntimePublicReflectionProperty; use Doctrine\Tests\OrmFunctionalTestCase; +use ReflectionProperty; use function class_exists; use function sprintf; @@ -53,7 +53,7 @@ public function testMetadataHasReflectionEmbeddablesAccessible(): void ); } else { self::assertInstanceOf( - RuntimePublicReflectionProperty::class, + ReflectionProperty::class, $classMetadata->getReflectionProperty('address') ); }