-
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
Doesn't support comments outside of namespaces declared with bracketed syntax #412
Comments
It seems I had a syntax error :( |
Ok I was able to reproduce it now |
Hi, could you send failing test to be sure? |
Sure here it is Just PHP without PhpParser works:
With PhpParser, Fatal error:
|
I meant send PR with test to this project, so we can see build fail. It would be easier to fix then. Something like this: Roave/BetterReflection#274 |
Ok you mean create a unit test for it and do a pull request? All source code is in the first comment, it's not much |
Sure, I can do that later this week if you want |
It's better to have (edge) cases covered for future references of the same issues.
That would be great. Just wait for @nikic to confirm, if he needs that. |
Thanks @nikic |
What I mainly care about is having some reproduce code -- it's not so important whether it comes in test form or standalone :) |
@nikic I really appreciate your activity around this repo. It's very rare for me to see such active maintainer 🙇♂️ |
Comments outside of namespaces defined with brackets seems to crash the parser.
Steps to reproduce:
testClass.php
like thistest.php
Expected result:
It works
Actual result:
It fails with error
PHP Fatal error: Uncaught PhpParser\Error: No code may exist outside of namespace {} on line 19
The text was updated successfully, but these errors were encountered: