opis / closure

Serialize closures (anonymous functions)
https://opis.io/closure
MIT License
2.5k stars 84 forks source link

Backport PHP 8.1 support to 3.x #102

Closed GrahamCampbell closed 3 years ago

GrahamCampbell commented 3 years ago

I will handle this task next week. Related: https://github.com/opis/closure/commit/48557b54f6bf12cd85db14a7cf0c05656c6ce363.

nunomaduro commented 3 years ago

@GrahamCampbell This can be closed, as we will be maintaining our own fork.

xpader commented 3 years ago

fork???

GrahamCampbell commented 3 years ago

Because we had to make breaking changes to get it to work, and the 4.x branch on this repo is already reserved for the FFI version, which is currently unsuitable for use with php-fpm.

sorinsarca commented 3 years ago

@GrahamCampbell can you tell me why is not (properly) working with php-fpm? I've used php-fpm to test it and I had no issues

nunomaduro commented 3 years ago

FFI may work with PHP FPM, but it's simply not enabled by default.

sorinsarca commented 3 years ago

You mean the ffi extension?

nunomaduro commented 3 years ago

@sorinsarca Correct. Edited my previous comment.

GrahamCampbell commented 3 years ago

It's also very slow to initialize, and there have been no improvements to address told starts with fpm.

sorinsarca commented 3 years ago

It is slower in dev mode, when you don't use preloading. Try it with preload enabled

You just have to add in your preload file a single line

\Opis\Closure\Library::preload();
xpader commented 3 years ago

I think we still need no FFI version, or auto detect and use FFI when it's enabled.