-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
T_FN constant is used on PHP 7.3 where it is not available #811
Comments
I cannot reproduce this on php-code-coverage's own test suite, only when using it via a consuming application's PHPUnit test suite. I have a hypothesis that it's to do with |
On further debugging, I reliably see the error on my own project when using Therefore, I think it's safe to say that it's parsing (at all) that is triggering the compatibility layer and allowing T_FN to work on PHP7.3, and was previously allowing T_MATCH to work on 7.3/7.4. When using the cache, no parsing is done and the compat layer is not loaded resulting in the undefined constant errors appearing. That's why it only triggered on the pcov testing on my test suite - the pcov test there is part of the same build and runs after the Xdebug test...using the cache. |
This library (php-code-coverage) only uses the actual visitor objects, The PHP-Parser is therefore only used with non-emulative lexing in this library. |
As of ebce861, the |
Ah, of course: even when non-emulative lexing is used, PHP-Parser conditionally defines |
Thanks |
T_FN on PHP 7.3 results in an undefined constant warning. Similar to #808 I assume. The CI run that shows the error is here: https://github.com/dvdoug/behat-code-coverage/runs/1134780400
Weirdly, the error is only shown when running under PCOV on CI, although I can reproduce locally when using Xdebug too.
The text was updated successfully, but these errors were encountered: