Skip to content

Commit

Permalink
bug #37053 [PropertyAccess] Fix getter call order BC (1ed)
Browse files Browse the repository at this point in the history
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
-------

8cf8068 [PropertyAccess] Fix getter call order BC
  • Loading branch information
nicolas-grekas committed Jun 7, 2020
2 parents 717de3e + 8cf8068 commit 5de548b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/PropertyAccess/composer.json
Expand Up @@ -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"
Expand Down
Expand Up @@ -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
Expand Down

0 comments on commit 5de548b

Please sign in to comment.