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
minor #32234 [PropertyAccess] Add type-hints to public interfaces and classes (jschaedl)
This PR was squashed before being merged into the 5.0-dev branch (closes#32234).
Discussion
----------
[PropertyAccess] Add type-hints to public interfaces and classes
| Q | A
| ------------- | ---
| Branch? | master <!-- see below -->
| Bug fix? | no
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| BC breaks? | no <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass? | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | #32179 <!-- #-prefixed issue number(s), if any -->
| License | MIT
| Doc PR | N/A <!-- required for new features -->
This PR adds type hints to public interfaces and classes of the PropertyAccess component. Some docblocks without valuable information got also removed.
Commits
-------
91138a9 [PropertyAccess] Add type-hints to public interfaces and classes
thrownewNoSuchPropertyException(sprintf('Cannot read property "%s" from an array. Maybe you intended to write the property path as "[%1$s]" instead.', $property));
@@ -430,12 +430,9 @@ private function readProperty($zval, $property, bool $ignoreInvalidProperty = fa
if (!$zval[self::VALUE] instanceof \ArrayAccess && !\is_array($zval[self::VALUE])) {
526
523
thrownewNoSuchIndexException(sprintf('Cannot modify index "%s" in object of type "%s" because it doesn\'t implement \ArrayAccess.', $index, \get_class($zval[self::VALUE])));
@@ -538,7 +535,7 @@ private function writeIndex($zval, $index, $value)
538
535
*
539
536
* @throws NoSuchPropertyException if the property does not exist or is not public
thrownewNoSuchPropertyException(sprintf('Cannot write property "%s" to an array. Maybe you should write the property path as "[%1$s]" instead?', $property));
@@ -579,7 +576,7 @@ private function writeProperty($zval, $property, $value)
579
576
* @param string $addMethod The add*() method
580
577
* @param string $removeMethod The remove*() method
@trigger_error(sprintf('Passing null as "$defaultLifetime" 2nd argument of the "%s()" method is deprecated since Symfony 4.4, pass 0 instead.', __METHOD__), E_USER_DEPRECATED);
0 commit comments