Giter VIP home page Giter VIP logo

Comments (4)

sidz avatar sidz commented on September 7, 2024

I didn't deep dive into this issue yet but based on the output issue is related to PHP-Parser 4.18.

As a workaround could you please try to downgrade PHP-Parser to 4.17.1

I'll try to create PR to update PHP-Parser to 4.18 as the minimum version today

from infection.

arall avatar arall commented on September 7, 2024

I confim setting the nikic/php-parser version to 4.17.1 worked. Thanks!

from infection.

sidz avatar sidz commented on September 7, 2024

Hey @arall
Seems like you some how installed PHP-Parser 5 and Infection globally.

as based on the exception error Infection passed and array to Lexer while it expects PhpVersion object. So this was added in PHP-Parser 5 https://github.com/nikic/PHP-Parser/blob/v5.0.0/lib/PhpParser/Lexer/Emulative.php#L38

while PHP-Parser 4 still accepts an array: https://github.com/nikic/PHP-Parser/blob/v4.18.0/lib/PhpParser/Lexer/Emulative.php#L44

I'd say it's even not an Infection issue.

Could you please try to update to PHP-Parser 4.18 and run Infection again. I don't think that there will be an issue.

from infection.

arall avatar arall commented on September 7, 2024

Using nikic/php-parser: ^4.17.1 on my project composer.json works fine.
Since infection is installed globally in my env, my project dependencies break the whole thing, as it use version 5 recently (due some other dependencies).
So yeah, seems like the issue is on my side. Sorry!

from infection.

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.