Skip to content

PHPStan failing with extension introduction #35

@dpi

Description

@dpi

My PHPStan instance is no longer able to complete due to fatal internal errors, likely introduced by #30

Error


 Internal error: Call to undefined method PhpParser\Node\Expr\MethodCall::getArg() while analysing file
 MYPROJECTFILEWASHERE.PHP
 Post the following stack trace to https://github.com/phpstan/phpstan/issues/new?template=Bug_report.yaml:
 ## /a/long/dir/vendor/good-php/reflection/src/PHPStan/ReflectorReturnType.php(90)
 #0 /a/long/dir/vendor/good-php/reflection/src/PHPStan/ReflectorReturnType.php(50):
 GoodPhp\Reflection\PHPStan\ReflectorReturnType->typeFromMethodCall(Object(PhpParser\Node\Expr\MethodCall),
 Object(PHPStan\Analyser\MutatingScope))
 #1 phar:///a/long/dir/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php(4006):
 GoodPhp\Reflection\PHPStan\ReflectorReturnType->getTypeFromMethodCall(Object(PHPStan\Reflection\ResolvedMethodReflection),
 Object(PhpParser\Node\Expr\MethodCall), Object(PHPStan\Analyser\MutatingScope))
 #2 phar:///a/long/dir/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php(1551):
 PHPStan\Analyser\MutatingScope->methodCallReturnType(Object(PHPStan\Type\ObjectType), 'forType',
 Object(PhpParser\Node\Expr\MethodCall))
 #3 phar:///a/long/dir/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php(594):
 PHPStan\Analyser\MutatingScope->resolveType('$this::$reflect...', Object(PhpParser\Node\Expr\MethodCall))
 #4 phar:///a/long/dir/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php(808):
 PHPStan\Analyser\MutatingScope->getType(Object(PhpParser\Node\Expr\MethodCall))
 #5 phar:///a/long/dir/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/MutatingScope.php(594):
 PHPStan\Analyser\MutatingScope->resolveType('$reflectClass =...', Object(PhpParser\Node\Expr\Assign))
 #6 phar:///a/long/dir/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1943):
 PHPStan\Analyser\MutatingScope->getType(Object(PhpParser\Node\Expr\Assign))
 #7 phar:///a/long/dir/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(807):
 PHPStan\Analyser\NodeScopeResolver->findEarlyTerminatingExpr(Object(PhpParser\Node\Expr\Assign),
 Object(PHPStan\Analyser\MutatingScope))
 #8 phar:///a/long/dir/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(513):
 PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Expression), Object(PHPStan\Analyser\MutatingScope),
 Object(Closure), Object(PHPStan\Analyser\StatementContext))
 #9 phar:///a/long/dir/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1052):
 PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\Foreach_), Array,
 Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext))

truncated...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions