From 8cf80688c7256801d9ba9af24b10d804938a1ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Egyed?= Date: Mon, 1 Jun 2020 23:14:04 +0200 Subject: [PATCH] [PropertyAccess] Fix getter call order BC --- .../Component/PropertyAccess/Tests/Fixtures/TestClass.php | 5 +++++ src/Symfony/Component/PropertyAccess/composer.json | 2 +- .../Component/PropertyInfo/Extractor/ReflectionExtractor.php | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClass.php b/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClass.php index a667997a9b7e..baf377427d38 100644 --- a/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClass.php +++ b/src/Symfony/Component/PropertyAccess/Tests/Fixtures/TestClass.php @@ -69,6 +69,11 @@ public function getPublicAccessor() return $this->publicAccessor; } + public function isPublicAccessor($param) + { + throw new \LogicException('This method should never have been called.'); + } + public function getPublicAccessorWithDefaultValue() { return $this->publicAccessorWithDefaultValue; diff --git a/src/Symfony/Component/PropertyAccess/composer.json b/src/Symfony/Component/PropertyAccess/composer.json index 4cde7bacf9a1..dd7bfb1ac7f5 100644 --- a/src/Symfony/Component/PropertyAccess/composer.json +++ b/src/Symfony/Component/PropertyAccess/composer.json @@ -19,7 +19,7 @@ "php": ">=7.2.5", "symfony/inflector": "^4.4|^5.0", "symfony/polyfill-php80": "^1.15", - "symfony/property-info": "^5.1" + "symfony/property-info": "^5.1.1" }, "require-dev": { "symfony/cache": "^4.4|^5.0" diff --git a/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php b/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php index 8de931d9c577..1cf15345028c 100644 --- a/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php +++ b/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php @@ -40,7 +40,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp /** * @internal */ - public static $defaultAccessorPrefixes = ['is', 'can', 'get', 'has']; + public static $defaultAccessorPrefixes = ['get', 'is', 'has', 'can']; /** * @internal