Skip to content
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

fileName Attribute appears to be lost when recursing into parent class #8

Closed
brad-jones opened this issue Feb 27, 2016 · 4 comments
Closed
Labels

Comments

@brad-jones
Copy link

Hi There,

I have done a very quick test case to highlight my issue:
https://gist.github.com/brad-jones/392122e55f751d8497fc

Just git clone the above and run composer install, then run test.php
You will see something like:

Warning: file_get_contents(): Filename cannot be empty in /var/www/vhosts/parser-test/vendor/goaop/parser-reflection/src/ReflectionEngine.php on line 190
PHP Fatal error:  Uncaught Go\ParserReflection\ReflectionException: Namespace Symfony\Component\Console\Command was not found in the file  in /var/www/vhosts/parser-test/vendor/goaop/parser-reflection/src/ReflectionEngine.php:218
Stack trace:
#0 /var/www/vhosts/parser-test/vendor/goaop/parser-reflection/src/ReflectionFileNamespace.php(77): Go\ParserReflection\ReflectionEngine::parseFileNamespace(NULL, 'Symfony\\Compone...')
#1 /var/www/vhosts/parser-test/vendor/goaop/parser-reflection/src/ValueResolver/NodeExpressionResolver.php(236): Go\ParserReflection\ReflectionFileNamespace->__construct(NULL, 'Symfony\\Compone...')
#2 /var/www/vhosts/parser-test/vendor/goaop/parser-reflection/src/ValueResolver/NodeExpressionResolver.php(118): Go\ParserReflection\ValueResolver\NodeExpressionResolver->resolveExprConstFetch(Object(PhpParser\Node\Expr\ConstFetch))
#3 /var/www/vhosts/parser-test/vendor/goaop/parser-reflection/src/ValueResolver/NodeExpressionResolver.php(99): Go\ParserReflection\ValueResolver\NodeExpressionResolver->resolve(Obje in /var/www/vhosts/parser-test/vendor/goaop/parser-reflection/src/ReflectionEngine.php on line 218
@lisachenko lisachenko added the Bug label Feb 27, 2016
@lisachenko
Copy link
Member

Nice catch! Will fix this now.

@lisachenko
Copy link
Member

Should be fixed now in 1.0.2, run composer update

@lisachenko
Copy link
Member

Thank you for reporting!

  - Parameters [1] {
    Parameter #0 [ <optional> $name = NULL ]
  }

@brad-jones
Copy link
Author

Thanks @lisachenko, works beautifully.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants