You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bug symfony#58110 [PropertyAccess] Fix handling property names with a . (alexandre-daubois)
This PR was merged into the 5.4 branch.
Discussion
----------
[PropertyAccess] Fix handling property names with a `.`
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fixsymfony#58100
| License | MIT
If the property path contains a dot, it is considered to be an access to an underlying property. However, some edge cases allow to have dots in property names, especially with `stdClass`.
Minimal reproducer:
```php
$stdclass = (object) ['bankAccount.iban' => 'NL16TEST0436169118', 'bankSummary' => ''];
$accessor = PropertyAccess::createPropertyAccessor();
dump($accessor->getValue($stdclass, 'bankAccount.iban')); // returns "NL16TEST0436169118"
$accessor->setValue($stdclass, 'bankAccount.iban', 'value');
dump($accessor->getValue($stdclass, 'bankAccount.iban')); // returns "value"
```
Commits
-------
d939a16 [PropertyAccess] Fix handling property names with a `.`
0 commit comments