opis/closure

PHP warning on PHP 8.1

come-nc opened this issue · 3 comments

These two deprecations warnings are showing:

PHP Deprecated:  Opis\Closure\SerializableClosure implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /home/mcmic/dev/opis/closure/src/SerializableClosure.php on line 18
PHP Deprecated:  Return type of Opis\Closure\ReflectionClosure::isStatic() should either be compatible with ReflectionFunctionAbstract::isStatic(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /home/mcmic/dev/opis/closure/src/ReflectionClosure.php on line 49

See #102. It is not possible to support PHP 8.1 here. You can use Laravel's fork or the experimental FFI version of this package.

what is the solution for Opis\Closure\SerializableClosure implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) please help for us.. what is exacrt solution

There is no solution other than one I provided. v3 of this package does not support PHP 8.1 or higher.