bug #37053 [PropertyAccess] Fix getter call order BC (1ed)
This PR was merged into the 5.1 branch.
Discussion
----------
[PropertyAccess] Fix getter call order BC
| Q | A
| ------------- | ---
| Branch? | 5.1
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | #37052
| License | MIT
| Doc PR | -
Property Accessor breaks BC due to a change in the order of calling the getters, see #37052
Commits
-------
8cf80688c7
[PropertyAccess] Fix getter call order BC
This commit is contained in:
commit
5de548b60e
@ -69,6 +69,11 @@ class TestClass
|
|||||||
return $this->publicAccessor;
|
return $this->publicAccessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function isPublicAccessor($param)
|
||||||
|
{
|
||||||
|
throw new \LogicException('This method should never have been called.');
|
||||||
|
}
|
||||||
|
|
||||||
public function getPublicAccessorWithDefaultValue()
|
public function getPublicAccessorWithDefaultValue()
|
||||||
{
|
{
|
||||||
return $this->publicAccessorWithDefaultValue;
|
return $this->publicAccessorWithDefaultValue;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
"php": ">=7.2.5",
|
"php": ">=7.2.5",
|
||||||
"symfony/inflector": "^4.4|^5.0",
|
"symfony/inflector": "^4.4|^5.0",
|
||||||
"symfony/polyfill-php80": "^1.15",
|
"symfony/polyfill-php80": "^1.15",
|
||||||
"symfony/property-info": "^5.1"
|
"symfony/property-info": "^5.1.1"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"symfony/cache": "^4.4|^5.0"
|
"symfony/cache": "^4.4|^5.0"
|
||||||
|
@ -40,7 +40,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
|
|||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
public static $defaultAccessorPrefixes = ['is', 'can', 'get', 'has'];
|
public static $defaultAccessorPrefixes = ['get', 'is', 'has', 'can'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
|
Reference in New Issue
Block a user