Skip to content

Conversation

@nexxome
Copy link
Contributor

@nexxome nexxome commented Dec 9, 2025

PHPFileExtractor needs nikic/php-parser 5 since this commit 44d8690#diff-54aad4ca5a1c43e17f2d4722aa2448cd7686a6e9c9e41250ccd2c651414e0193

"require": {
"php": "^8.1",
"nikic/php-parser": "^4.0 || ^5.0",
"nikic/php-parser": "^5.0",
Copy link
Member

@bocharsky-bw bocharsky-bw Dec 9, 2025

Choose a reason for hiding this comment

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

Could you explain in more detail? I mean, the package allowed v5 before

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, but also v4, and v4 is not doesn't have ParserFactory()->createForVersion()

$parser = (new ParserFactory())->createForVersion(PhpVersion::fromString('8.1'));

So yeah, the change is more likely to disallow v4.

Copy link
Member

Choose a reason for hiding this comment

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

Ah ok, I see we use that createForVersion() in the code, thanks for more details

@nexxome nexxome changed the title Require nikic/php-parser 5 Require nikic/php-parser 5 only Dec 9, 2025
Copy link
Member

@bocharsky-bw bocharsky-bw left a comment

Choose a reason for hiding this comment

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

OK, I don't think it will cause any problems cus nikic/php-parser literally has no deps. let's do it

@bocharsky-bw bocharsky-bw merged commit 5924447 into php-translation:master Dec 9, 2025
4 of 5 checks passed
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 this pull request may close these issues.

2 participants