Comments (4)
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.
I confim setting the nikic/php-parser
version to 4.17.1
worked. Thanks!
from infection.
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.
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)
- Infection reports mutations on impossible to cover parts: PHP Attributes HOT 5
- Alternative Badge SVG File as report for use in Gitlab and private Repositories HOT 9
- nikic/php-parser 5 support HOT 3
- Clean project ApiPlatform + PhpUnit 11 + PHP 8.3.x -> nikic/php-parser minimum version bump needed HOT 3
- Upgrade `php-cs-fixer` and add more rules
- Randomly failing test HOT 2
- Gitlab logger errors when run outside git repository HOT 2
- GPG key expired HOT 3
- Excluded sources are being processed for mutation
- Mutations should be skipped base on individual time, not total time HOT 9
- Fail to find testcase from Junit report (Pest) HOT 2
- Support for short circuit evaluation with assignment statements HOT 5
- GitLab Logger generates invalid links HOT 3
- Error when running infection (fatal: not a git repository (or any of the parent directories): .git) HOT 8
- git command might be not found HOT 4
- 0.29.* PHAR version throws Fatal Error: Undefined constant when running tests with PHP-Parser 4 HOT 8
- Function parameter default values aren't handled appropriately (code-coverage issue) HOT 1
- specify in what folders apply --only-covered HOT 2
- Add "include" option to configuration files.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from infection.