qossmic/deprecation-detector

Fatal error on abstract constructor

fsevestre opened this issue · 1 comments

I'm having a fatal error when the parser traverse an abstract constructor abstract public function __construct($host);:

PHP Catchable fatal error:  Argument 1 passed to PhpParser\NodeTraverser::traverse() must be of the type array, null given, called in /home/fsevestre/workspace/dev/deprecation-detector/src/TypeGuessing/ConstructorResolver/ConstructorResolver.php on line 62 and defined in /home/fsevestre/workspace/dev/deprecation-detector/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php on line 57
PHP Stack trace:
PHP   1. {main}() /home/fsevestre/workspace/dev/deprecation-detector/bin/deprecation-detector:0
PHP   2. Symfony\Component\Console\Application->run() /home/fsevestre/workspace/dev/deprecation-detector/bin/deprecation-detector:18
PHP   3. Symfony\Component\Console\Application->doRun() /home/fsevestre/workspace/dev/deprecation-detector/vendor/symfony/console/Application.php:126
PHP   4. Symfony\Component\Console\Application->doRunCommand() /home/fsevestre/workspace/dev/deprecation-detector/vendor/symfony/console/Application.php:195
PHP   5. Symfony\Component\Console\Command\Command->run() /home/fsevestre/workspace/dev/deprecation-detector/vendor/symfony/console/Application.php:886
PHP   6. SensioLabs\DeprecationDetector\Console\Command\CheckCommand->execute() /home/fsevestre/workspace/dev/deprecation-detector/vendor/symfony/console/Command/Command.php:259
PHP   7. SensioLabs\DeprecationDetector\Detector\ViolationDetector->getViolations() /home/fsevestre/workspace/dev/deprecation-detector/src/Console/Command/CheckCommand.php:144
PHP   8. SensioLabs\DeprecationDetector\Finder\ParsedPhpFileFinder->getIterator() /home/fsevestre/workspace/dev/deprecation-detector/src/Console/Command/CheckCommand.php:45
PHP   9. SensioLabs\DeprecationDetector\Parser\UsageParser->parseFile() /home/fsevestre/workspace/dev/deprecation-detector/src/Finder/ParsedPhpFileFinder.php:49
PHP  10. PhpParser\NodeTraverser->traverse() /home/fsevestre/workspace/dev/deprecation-detector/src/Parser/UsageParser.php:71
PHP  11. PhpParser\NodeTraverser->traverseArray() /home/fsevestre/workspace/dev/deprecation-detector/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:64
PHP  12. PhpParser\NodeTraverser->traverseNode() /home/fsevestre/workspace/dev/deprecation-detector/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:129
PHP  13. PhpParser\NodeTraverser->traverseArray() /home/fsevestre/workspace/dev/deprecation-detector/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:84
PHP  14. SensioLabs\DeprecationDetector\TypeGuessing\ConstructorResolver\Visitor\ConstructorResolverVisitor->enterNode() /home/fsevestre/workspace/dev/deprecation-detector/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php:120
PHP  15. SensioLabs\DeprecationDetector\TypeGuessing\ConstructorResolver\ConstructorResolver->resolveConstructor() /home/fsevestre/workspace/dev/deprecation-detector/src/TypeGuessing/ConstructorResolver/Visitor/ConstructorResolverVisitor.php:22
PHP  16. PhpParser\NodeTraverser->traverse() /home/fsevestre/workspace/dev/deprecation-detector/src/TypeGuessing/ConstructorResolver/ConstructorResolver.php:62

👍
I'll fix this one later today.