-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
TokenPolyfill tries to construct itself with an id which is a string #974
Comments
This means you are using some other library that has buggy token emulation. I'll have to add an extra check to
|
This might be an issue with |
I don't think this is related to phpunit. Try grepping for T_NAME_QUALIFIED in your vendor/ directory, which should hopefully show which library defines the constant. |
could be related to an issue that is addressed by phpDocumentor/TypeResolver#197 |
That PR fixes this issue. See my comment phpDocumentor/TypeResolver#197 (comment) |
I updated to PhpParser https://github.com/nikic/PHP-Parser/releases/tag/v5.0.0
When I run
phpunit
in one repo, I get:Related issue https://github.com/owncloud/files_classifier/issues/847 (sorry, that is a private repo)
Note: I added some debug lines in https://github.com/nikic/PHP-Parser/blob/master/lib/PhpParser/Internal/TokenPolyfill.php
And discovered that the constant
\T_NAME_QUALIFIED
is just becoming the literal string "T_NAME_QUALIFIED", when it should be some number, like in https://github.com/nikic/PHP-Parser/blob/master/lib/PhpParser/Parser/Php7.phppublic const T_NAME_QUALIFIED = 393;
I don't see where
TokenPolyfill.php
includes thatPhp7.php
Is there something I need to do around the environment of PHP-parser, or does the code of
TokenPolyfill.php
need to includePhp7.php
and use it?The text was updated successfully, but these errors were encountered: