Skip to content

Commit bd9ad23

Browse files
committed
Do not serialize properties with hook get or set hook only
1 parent 6def72b commit bd9ad23

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/ColumnBuilder.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ public static function fromReflection(\ReflectionClass $reflectionClass): array
3939
if ($property->isStatic() || $property->isPrivate()) {
4040
continue;
4141
}
42+
if (method_exists($property, 'getHooks') && count($property->getHooks()) === 1) {
43+
continue;
44+
}
4245
/** @var array<class-string, object> $propertyAttributes */
4346
$propertyAttributes = [];
4447
foreach ($property->getAttributes() as $attribute) {

0 commit comments

Comments
 (0)