Hi,
I’d like to open the discussion on a new RFC:
https://wiki.php.net/rfc/serializable_closures
PHP 8.5 allowed closures in attribute arguments and parameter defaults. These closures are static and capture nothing, yet they cannot be serialized, which silently breaks every serialize()-based metadata cache that meets them.
The RFC proposes to make them serializable as references to their declaration site.
Feedback welcome.
Cheers,
Nicolas