Athari / YaLinqo

Yet Another LINQ to Objects for PHP [Simplified BSD]
https://athari.github.io/YaLinqo
BSD 2-Clause "Simplified" License
441 stars 39 forks source link

not PHP8 compatible -> obsolete function create_function #54

Closed Headley76 closed 2 years ago

Headley76 commented 3 years ago

Hi developers,

current version is not PHP8 compatible because of the obsolete function create_function in utils.php line 154.

It should be replaced with something like this:

$fun = function($args) use ($code){ ... };

But I could not successfully hanlde the statements in $code :-(

Can someone fix it?

Thx very much.

Headley76 commented 3 years ago

sorry -> duplicate issue

I could fix it myself with:

$fun = fn($args) => $code;
// @codeCoverageIgnoreStart
if (!is_callable($fun))

Perhaps you can also fix it here,

Greetings