update lock clucknut
All checks were successful
All checks were successful
This commit is contained in:
@@ -222,7 +222,7 @@ public static function getSimpleHydrator($class)
|
||||
if ($propertyReflector->isStatic()) {
|
||||
continue;
|
||||
}
|
||||
if (!$propertyReflector->isAbstract() && $propertyReflector->getHooks()) {
|
||||
if (\PHP_VERSION_ID >= 80400 && !$propertyReflector->isAbstract() && $propertyReflector->getHooks()) {
|
||||
$notByRef->{$propertyReflector->name} = $propertyReflector->setRawValue(...);
|
||||
} elseif ($propertyReflector->isReadOnly()) {
|
||||
$notByRef->{$propertyReflector->name} = static function ($object, $value) use ($propertyReflector) {
|
||||
@@ -277,7 +277,7 @@ public static function getPropertyScopes($class): array
|
||||
$name = $property->name;
|
||||
$access = ($flags << 2) | ($flags & \ReflectionProperty::IS_READONLY ? self::PROPERTY_NOT_BY_REF : 0);
|
||||
|
||||
if (!$property->isAbstract() && $h = $property->getHooks()) {
|
||||
if (\PHP_VERSION_ID >= 80400 && !$property->isAbstract() && $h = $property->getHooks()) {
|
||||
$access |= self::PROPERTY_HAS_HOOKS | (isset($h['get']) && !$h['get']->returnsReference() ? self::PROPERTY_NOT_BY_REF : 0);
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ public static function getPropertyScopes($class): array
|
||||
|
||||
$propertyScopes[$name] = [$class, $name, null, $access, $property];
|
||||
|
||||
if ($flags & \ReflectionProperty::IS_PRIVATE_SET) {
|
||||
if ($flags & (\PHP_VERSION_ID >= 80400 ? \ReflectionProperty::IS_PRIVATE_SET : \ReflectionProperty::IS_READONLY)) {
|
||||
$propertyScopes[$name][2] = $property->class;
|
||||
}
|
||||
|
||||
@@ -310,7 +310,7 @@ public static function getPropertyScopes($class): array
|
||||
$name = $property->name;
|
||||
$access = ($flags << 2) | ($flags & \ReflectionProperty::IS_READONLY ? self::PROPERTY_NOT_BY_REF : 0);
|
||||
|
||||
if ($h = $property->getHooks()) {
|
||||
if (\PHP_VERSION_ID >= 80400 && $h = $property->getHooks()) {
|
||||
$access |= self::PROPERTY_HAS_HOOKS | (isset($h['get']) && !$h['get']->returnsReference() ? self::PROPERTY_NOT_BY_REF : 0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user