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

Support the nikic/php-parser to 5.x #41

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

kayw-geek
Copy link
Contributor

@kayw-geek kayw-geek commented Apr 2, 2024

This PR addresses the issue #40, support the nikic/php-parser to 5.x.

Closes #40

@kayw-geek
Copy link
Contributor Author

Hi @owenvoke, Can you help review when you have time?
This can benefit everyone who relies on nikic/php-parser 5.x in all projects.
Thank you for providing such a great project.

Copy link
Member

@owenvoke owenvoke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kayw-geek, thanks for the PR! 👍🏻 From a code side, this looks ok for 5.x (love the changes to createForNewestSupportedVersion()), however it seems to break a lot of tests when running with PHP-Parser 4.x locally. 🤔 Would you be able to update this PR so that both are supported? 👀

The failing tests in CI just appeart to be related to Windows line endings. 😐

@kayw-geek
Copy link
Contributor Author

Hi @owenvoke, I have already simultaneously supported two major versions. In order to solve the problem with PHPStan, I had to add two stub files. I don't know if this is the best practice because I hadn't considered compatibility with multiple versions before.

@kayw-geek
Copy link
Contributor Author

Hi @owenvoke, Can you help review again?

@sebastiaanluca
Copy link

Hi all, is there anything left we can do to wrap up this PR? It's the only package left that's blocking the upgrade to PHPUnit 11.

Copy link
Member

@owenvoke owenvoke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed the notification for this. The tests seem to pass locally for both 4.x and 5.x, and they are passing in CI. So, LGTM! Thanks for your work on this, @kayw-geek

@owenvoke owenvoke merged commit d9c9750 into worksome:main Apr 18, 2024
5 of 9 checks passed
@sebastiaanluca
Copy link

Thanks both!

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

Successfully merging this pull request may close these issues.

Update nikic/php-parser to v5 to allow installation of PHPUnit 11
3 participants