Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR updates the minimum supported versions of
nikic/php-parserfor both the v4 and v5 dependency lines.Version 4: bump from
4.10to4.18PR #33 added support for PHP 7.4+ by replacing the call to
PhpParser\ParserFactory::create()withPhpParser\ParserFactory::createForNewestSupportedVersion().createForNewestSupportedVersion()is only available starting withnikic/php-parser4.18, and the minimum required v4 version was not updated accordingly.Bumping the minimum v4 version to
4.18removes the risk of calling an undefined method.Version 5: bump from
5.1to5.5Starting with
nikic/php-parser5.5.0, attribute printing was fixed to work correctly on PHP versions < 8.0 (also see the related issue: nikic/PHP-Parser#1081). The minimum required v5 version has not been updated since.Bumping the minimum v5 version to
5.5removes the risk of generating stubs that might cause parse errors when running on PHP < 8.0.For discussion
The attribute-printing fix was not backported to the v4 line. If it is intended to keep supporting
nikic/php-parserv4, it may be better to explicitly document that attribute printing on PHP < 8.0 remains unfixed there. Alternatively, support for v4 could be dropped.