Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nikic/php-parser v5 #31

Closed
dereuromark opened this issue Jan 24, 2024 · 12 comments · Fixed by #33
Closed

nikic/php-parser v5 #31

dereuromark opened this issue Jan 24, 2024 · 12 comments · Fixed by #33

Comments

@dereuromark
Copy link
Contributor

My app reported:

packages are not up to date:

  - nikic/php-parser (v4.18.0) latest is v5.0.0


brick/varexporter         0.4.0   requires nikic/php-parser (^4.0)          
cakephp/bake              3.0.5   requires nikic/php-parser (^4.13.2)       
phpunit/php-code-coverage 10.1.11 requires nikic/php-parser (^4.18 || ^5.0) 
sebastian/complexity      3.2.0   requires nikic/php-parser (^4.18 || ^5.0) 
sebastian/lines-of-code   2.0.2   requires nikic/php-parser (^4.18 || ^5.0) 
@BenMorel
Copy link
Member

BenMorel commented Feb 4, 2024

Good point, php-parser v5 has been released a couple weeks ago. However, Psalm still supports v4 only, so our dev dependencies are locked to php-parser v4, and we cannot run tests with v5 unless we create another composer.json just for Psalm (which could make sense, but adds a bit to maintenance).

Should we just wait until Psalm becomes compatible with v5? Looks like it's a work in progress: vimeo/psalm#10567

@Fahl-Design
Copy link

FYI Psalm update is released

@BenMorel
Copy link
Member

@Fahl-Design AFAICS, vimeo/psalm#10567 has been merged into master but not 5.x, so not released yet :/

@Fahl-Design
Copy link

Oh, my bad..
for now I ended up with a hacky fork and "composer provides" in the same package, until it's released ;)

@snapshotpl
Copy link
Contributor

@acelaya
Copy link

acelaya commented Feb 27, 2024

What about require psalm as phar https://github.com/vimeo/psalm/blob/5.x/docs/running_psalm/installation.md#using-the-phar ?

I usually find using tools via phars a bit cumbersome, as using composer is more convenient.

That said, this option (from that same link) might be a good alternative with the best of both worlds composer require --dev psalm/phar.

PHPStan has been shipping as a phar but via composer, for some time already. I wish more tools took that approach.

@sten
Copy link

sten commented Apr 29, 2024

@acelaya & @snapshotpl are there any updates on the PR to upgrade to nikic/php-parser v5?

I am also experiencing issues when upgrading to Laravel 11 which requires v5 via phpunit.
statikbe/laravel-filament-chained-translation-manager#37

Thank you!

@snapshotpl
Copy link
Contributor

I have created #33 as first step to upgrade nikic/php-parser to v5, but still quiet 😞

@BenMorel
Copy link
Member

Sorry for the delay. Let's merge #33, and I'll add support for php-parser v5 thereafter.

@acelaya
Copy link

acelaya commented May 5, 2024

@snapshotpl could you apply requested changes to your PR so that it can be merged and things can move forward?

@BenMorel
Copy link
Member

At first glance it looks like supporting nikic/php-parser v4 & v5 at the same time would be a pain.
I'll probably release brick/varexporter v0.5 with support for nikic/php-parser v5 only.

@BenMorel BenMorel reopened this May 10, 2024
@BenMorel
Copy link
Member

Fixed in 0.5.0!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants