Giter Club home page Giter Club logo

Comments (8)

arokettu avatar arokettu commented on August 16, 2024

Ok, it might be an insanity due to implicit use() :(

from super_closure.

b1rdex avatar b1rdex commented on August 16, 2024

Any thoughts on this? Php 7.4 is live, just stumbled upon this issue using PHP-DI compiled container (PHP-DI/PHP-DI#706).

from super_closure.

arokettu avatar arokettu commented on August 16, 2024

@b1rdex If I remember correctly, the fix for PHP-DI is trivial and I even managed to make it work sort of, but super_closure is not only a PHP-DI backend and it should serialize variables in use() statement. This was the problem when I got stuck

from super_closure.

b1rdex avatar b1rdex commented on August 16, 2024

@arokettu could you please share the fix for arrow functions without use()? It'd be better than nothing.

from super_closure.

arokettu avatar arokettu commented on August 16, 2024

@b1rdex just replace this check

if ($node instanceof ClosureNode) {

with $node instanceof ClosureNode || $node instanceof ArrowFunctionNode and it will work except for $uses warning

from super_closure.

arokettu avatar arokettu commented on August 16, 2024

This is a full file with the change, sorry, don't have it in git

https://gist.github.com/arokettu/aac75ac809577b83b16d2583587c5af6

from super_closure.

jeremeamia avatar jeremeamia commented on August 16, 2024

This software is no longer maintained. Consider using opis/closure instead. I believe they have added short function support.

from super_closure.

b1rdex avatar b1rdex commented on August 16, 2024

@jeremeamia yes you're right. Here is the implementation: opis/closure@86fc51f

from super_closure.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.