-
-
Notifications
You must be signed in to change notification settings - Fork 19
fix #112 - EPV doesn't work with PHP 8 #115
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
Conversation
composer.lockClick to show 62 changes in this composer.lock filePackage changes
Dev Package changes
Important Metadata Changes
Settings · Docs · Powered by Private Packagist |
@Skouat But does it still work correctly? Looking at the tests a bunch of them fail now, which didn't happen in the past. It would also be nice if we run it at least on 1 php8 version on GitHub. We also will need to have it both php7 and php8 compatible. |
Hi @paul999
Sure. I can check this. |
The composer.lock diff comment has been updated to reflect new changes in this PR. |
The composer.lock diff comment has been updated to reflect new changes in this PR. |
The composer.lock diff comment has been updated to reflect new changes in this PR. |
The composer.lock diff comment has been updated to reflect new changes in this PR. |
22cab79
to
63921cc
Compare
The composer.lock diff comment has been updated to reflect new changes in this PR. |
The composer.lock diff comment has been updated to reflect new changes in this PR. |
1 similar comment
The composer.lock diff comment has been updated to reflect new changes in this PR. |
@paul999 Normally, now it works with PHP 7 and PHP 8 |
I think the test runner needs to be updated to run on |
Your master branch use |
PHP-Parser 4.x parses PHP 5.2 to PHP 8.0 (https://github.com/nikic/PHP-Parser/blob/4.x/doc/0_Introduction.markdown#introduction), so can fail in cases of using some 8.1+ specific syntax. PHP-Parser 5.x parses PHP 7 and PHP 8 (https://github.com/nikic/PHP-Parser/blob/master/doc/0_Introduction.markdown#what-can-it-parse), so I'd suggest trying to use it instead. That will require more code changes in EPV as things got changed in the Parser code, f.e. |
That should be a separate PR. This one is just about getting EPV to just work. Plus I'm not sure who's writing extensions using PHP 8.1 or newer syntax yet, that's less of a priority. |
Well, 4.0 is PHP 8.1 minimum requirement, and all extensions will be as well :) |
Sure but that does not mean they are rewritten using 8.1 introduced constructs. |
So |
Looks like that, but there're more changes here https://github.com/nikic/PHP-Parser/blob/master/UPGRADE-5.0.md (I actually didn't dig deeply into EPV code, so no idea how many of these are relevant). Also 5.x requires PHP 7.4+ so respective version constraints in |
Probably you're right and this is something for another PR. |
Well now that sounds like updating that dependency could break BC with the current phpBB PHP specs, so not just something for another PR, but for another future version of EPV that drops support for phpBB 3.3.x and PHP 7.1, 7.2 and 7.3. |
But shouldn't version constrains work automatically? Like, if you test on PHP 7.2/7.3, it installs PHP-Parser 4.x, and on PHP 7.4+ it installs PHP-Parser 5.x. |
I think the lock file needs updating again? |
Because of the |
Everything looks good to me, except that to run this using PHP 8.1 with phpBB 3.3.x requires the |
With PHP 7.2, only the |
Hello First of all, thanks to everyone who made it possible to run EPV under PHP 8. It's also very important to me that PHP code >=7.2 is now supported. :-) In my specific case: 7.4 code. What is the current status of EPV? Can we already use the current development version, or should we wait for 0.0.13? Tests have been very positive, see issue 116, and I would now of course like to use the latest version of EPV with phpBB Ext Check (14 Ext developers). |
Hello, Just keep in mind that for PHP8 and newer, you must add the |
Also to clarify further, |
Hello Skouat and Matt Thanks for your answers. You've really confused me, and it took me a few minutes to understand your answers. At least, I hope so. ^^ I think there's a misunderstanding here. I use EPV as a standalone tool within my own test suite, phpBB Ext Check. It has nothing to do with GitHub Actions or with phpBB directly, and I don't have a This test suite was developed because many Ext developers are having trouble with GitHub. This gives this group the opportunity to receive a report from the official phpBB.com tools "Extension Pre Validator" and "phpBB PHP Strict Standard Extensions," which they wouldn't otherwise receive. Plus more reports from additional tools. |
Hi @rxu Regarding the following information:
The root of https://github.com/nikic/PHP-Parser/ reads:
Which of the two statements is true regarding EPV? In our test of phpBB Ext Check 1.9.0, 30 extensions were successfully tested with the latest EPV. Of these, 7 extensions had PHP 7.4 code and 2 extensions had PHP 8.0 code. Therefore, it would be interesting to know where the "upper limit" of the current EPV lies. |
I don't know, EPV uses PHP-Parser but documentation for the latter is authored by PHP-Parser author. But it turns out this documentation contradicts to itself. Then asking in https://github.com/nikic/PHP-Parser/issues would be a logical step probably. |
Okay, then I'll ask there and post the answer here so that this information is complete. |
This is correct:
|
From Titania, when we submit a revision and Titania runs under PHP8, EPV fails with the following message:
Upgrading
nikic/php-parser
to version 4 fix this issue, and also the issue #112