bug #19141 Throw less misleading exception when property access not found (bramtweedegolf)
bug #19141 Throw less misleading exception when property access not found (bramtweedegolf)

This PR was submitted for the master branch but it was merged into the 3.1 branch instead (closes #19141).

Discussion
----------

Throw less misleading exception when property access not found

Prevent throwing a NoSuchPropertyException with a somewhat misleading message "Neither the property "X" nor one of the methods "addX()"/"removeX()", "setX()", "x()", "__set()" or "__call()" exist and have public access in class when the access cannot be determined, for instance if the doctrine schema is not up to date.

| Q | A |
| --- | --- |
| Branch? | 3.1 for fixes |
| Bug fix? | no |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| License | MIT |

Commits
-------

ec28da4 Throw less misleading exception when property access not found

symfony/PropertyAccess,symfony/property-access