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
Native tries to set property values in mapByReference. This fails for virtual properties that have no setter.
Virtual properties simply should be excluded from any serialization. By definition, they are derived values and should be reproducible from other serialized values.
Steps To Reproduce
useLaravel\SerializableClosure\Serializers\Native;
class Test
{
publicstring$test {
get => 'test';
}
publicstaticfunctiontest_it(): string
{
$t = newTest();
$clo = function () use ($t) {
return$t;
};
$n = newNative(closure: $clo);
returnserialize(value: $n);
}
}
Test::test_it();
PHP Error: Property Test::$test is read-only in /var/www/html/vendor/laravel/serializable-closure/src/Serializers/Native.php on line 509
The text was updated successfully, but these errors were encountered:
Laravel Version
11.41.3
PHP Version
8.4.3
Database Driver & Version
No response
Description
Native tries to set property values in mapByReference. This fails for virtual properties that have no setter.
Virtual properties simply should be excluded from any serialization. By definition, they are derived values and should be reproducible from other serialized values.
Steps To Reproduce
Test::test_it();
The text was updated successfully, but these errors were encountered: