From ed80bcc82c18959825bc575b75166fb04ab8f965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Wed, 28 Oct 2020 18:57:35 +0100 Subject: [PATCH] Remove dependency on doctrine/reflection That package is being phased out, and there are good chances that the classes involved at runtime are completely different from the classes involved in the test changed in that commit. That test was the only piece of code I could find still referencing the Doctrine\Common\Reflection namespace. --- composer.json | 1 - .../Constraints/UniqueEntityValidatorTest.php | 11 +---------- src/Symfony/Bridge/Doctrine/composer.json | 3 +-- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index 4ae6826ce7..55f83ce8e7 100644 --- a/composer.json +++ b/composer.json @@ -107,7 +107,6 @@ "doctrine/data-fixtures": "^1.1", "doctrine/dbal": "~2.4|^3.0", "doctrine/orm": "~2.4,>=2.4.5", - "doctrine/reflection": "~1.0", "doctrine/doctrine-bundle": "^1.5|^2.0", "guzzlehttp/promises": "^1.3.1", "masterminds/html5": "^2.6", diff --git a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php index e9e905c89c..0b7cfb071b 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Validator/Constraints/UniqueEntityValidatorTest.php @@ -114,17 +114,8 @@ class UniqueEntityValidatorTest extends ConstraintValidatorTestCase ->method('hasField') ->willReturn(true) ; - $reflParser = $this->getMockBuilder('Doctrine\Common\Reflection\StaticReflectionParser') - ->disableOriginalConstructor() - ->getMock() - ; - $refl = $this->getMockBuilder('Doctrine\Common\Reflection\StaticReflectionProperty') - ->setConstructorArgs([$reflParser, 'property-name']) - ->setMethods(['getValue']) - ->getMock() - ; + $refl = $this->createStub(\ReflectionProperty::class); $refl - ->expects($this->any()) ->method('getValue') ->willReturn(true) ; diff --git a/src/Symfony/Bridge/Doctrine/composer.json b/src/Symfony/Bridge/Doctrine/composer.json index b792582d59..2d8a44f713 100644 --- a/src/Symfony/Bridge/Doctrine/composer.json +++ b/src/Symfony/Bridge/Doctrine/composer.json @@ -44,8 +44,7 @@ "doctrine/collections": "~1.0", "doctrine/data-fixtures": "^1.1", "doctrine/dbal": "~2.4|^3.0", - "doctrine/orm": "^2.6.3", - "doctrine/reflection": "~1.0" + "doctrine/orm": "^2.6.3" }, "conflict": { "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",