Skip to content

Commit ea62b28

Browse files
committed
Merge branch '7.3' into 7.4
* 7.3: [Messenger] fix test file/class name src/Symfony/Component/JsonPath - fix [PropertyInfo] Fix calling same-named method with required args instead of reading public property [Serializer] Do not skip nested `null` values when denormalizing
2 parents a5d6333 + 243a05b commit ea62b28

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Extractor/ReflectionExtractor.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,10 @@ public function getReadInfo(string $class, string $property, array $context = []
388388

389389
if ($allowGetterSetter && $reflClass->hasMethod($getsetter) && ($reflClass->getMethod($getsetter)->getModifiers() & $this->methodReflectionFlags)) {
390390
$method = $reflClass->getMethod($getsetter);
391-
392-
return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD, $getsetter, $this->getReadVisibilityForMethod($method), $method->isStatic(), false);
391+
// Only consider jQuery-style accessors when they don't require parameters
392+
if (!$method->getNumberOfRequiredParameters()) {
393+
return new PropertyReadInfo(PropertyReadInfo::TYPE_METHOD, $getsetter, $this->getReadVisibilityForMethod($method), $method->isStatic(), false);
394+
}
393395
}
394396

395397
if ($allowMagicGet && $reflClass->hasMethod('__get') && (($r = $reflClass->getMethod('__get'))->getModifiers() & $this->methodReflectionFlags)) {

0 commit comments

Comments
 (0)