-
-
Notifications
You must be signed in to change notification settings - Fork 861
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
Internal error: Interface "..." not found #10378
Comments
This bug report is missing a link to reproduction at phpstan.org/try. It will most likely be closed after manual review. |
In the stack trace You can also try putting the file with this class into bootstrapFile, that should help. |
I can see how it is valid the interface does not exist anymore. However I wanted to generate a baseline with all existing issues. This one throws an exception and cannot be put in the baseline |
This error means that PHPStan crashes and the analysis is incomplete, therefore baseline cannot be generated. You need to fix this error so that PHPStan can finish analysis successfully. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug report
Internal error: Internal error: Interface "TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface" not found while analysing file
/var/www/html/local_packages/example/Classes/Hooks/ContentElementPreviewRenderer.php
Post the following stack trace to https://github.com/phpstan/phpstan/issues/new?template=Bug_report.yaml:
## /var/www/html/local_packages/my_sitepackage_example/Classes/Hooks/ContentElementPreviewRenderer.php(24)
#0 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/composer/ClassLoader.php(576): include()
#1 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/composer/ClassLoader.php(427): Composer\Autoload{closure}('/var/www/html/v...')
#2 /var/www/html/vendor/typo3/class-alias-loader/src/ClassAliasLoader.php(137): Composer\Autoload\ClassLoader->loadClass('my\mySitepack...')
#3 /var/www/html/vendor/typo3/class-alias-loader/src/ClassAliasLoader.php(125): TYPO3\ClassAliasLoader\ClassAliasLoader->loadClass('my\mySitepack...')
#4 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/AutoloadFunctionsSourceLocator.php(41):
TYPO3\ClassAliasLoader\ClassAliasLoader->loadClassWithAlias('my\mySitepack...')
#5 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/AggregateSourceLocator.php(26):
PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadFunctionsSourceLocator->locateIdentifier(Object(PHPStan\BetterReflection\Reflector\DefaultReflector), Object(PHPStan\BetterReflection\Identifier\Identifier))
#6 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/MemoizingSourceLocator.php(33):
PHPStan\BetterReflection\SourceLocator\Type\AggregateSourceLocator->locateIdentifier(Object(PHPStan\BetterReflection\Reflector\DefaultReflector), Object(PHPStan\BetterReflection\Identifier\Identifier))
#7 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/Reflector/DefaultReflector.php(32):
PHPStan\BetterReflection\SourceLocator\Type\MemoizingSourceLocator->locateIdentifier(Object(PHPStan\BetterReflection\Reflector\DefaultReflector), Object(PHPStan\BetterReflection\Identifier\Identifier))
#8 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/Reflector/MemoizingReflector.php(45): PHPStan\BetterReflection\Reflector\DefaultReflector->reflectClass('my\mySitepack...')
#9 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/BetterReflectionProvider.php(175):
PHPStan\Reflection\BetterReflection\Reflector\MemoizingReflector->reflectClass('my\mySitepack...')
#10 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/ReflectionProvider/MemoizingReflectionProvider.php(43):
PHPStan\Reflection\BetterReflection\BetterReflectionProvider->getClass('my\mySitepack...')
#11 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Dependency/DependencyResolver.php(439): PHPStan\Reflection\ReflectionProvider\MemoizingReflectionProvider->getClass('my\mySitepack...')
#12 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Dependency/DependencyResolver.php(72): PHPStan\Dependency\DependencyResolver->addClassToDependencies('my\mySitepack...', Array)
#13 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyser.php(149): PHPStan\Dependency\DependencyResolver->resolveDependencies(Object(PhpParser\Node\Stmt\Class_),
Object(PHPStan\Analyser\MutatingScope))
#14 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(458): PHPStan\Analyser\FileAnalyser->PHPStan\Analyser{closure}(Object(PhpParser\Node\Stmt\Class_),
Object(PHPStan\Analyser\MutatingScope))
#15 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(401): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Class_),
Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext))
#16 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(640): PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\Namespace_), Array,
Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext))
#17 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(370): PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Namespace_),
Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\StatementContext))
#18 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyser.php(166): PHPStan\Analyser\NodeScopeResolver->processNodes(Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure))
#19 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Command/WorkerCommand.php(132): PHPStan\Analyser\FileAnalyser->analyseFile('/var/www/html/l...', Array, Object(PHPStan\Rules\LazyRegistry),
Object(PHPStan\Collectors\Registry), NULL)
#20 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97): PHPStan\Command\WorkerCommand->PHPStan\Command{closure}(Array)
#21 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/clue/ndjson-react/src/Decoder.php(117): _PHPStan_cb6cd3c76\Evenement\EventEmitter->emit('data', Array)
#22 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97): _PHPStan_cb6cd3c76\Clue\React\NDJson\Decoder->handleData(Array)
#23 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/stream/src/Util.php(62): _PHPStan_cb6cd3c76\Evenement\EventEmitter->emit('data', Array)
#24 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97):
_PHPStan_cb6cd3c76\React\Stream\Util::_PHPStan_cb6cd3c76\React\Stream{closure}('{"action":"anal...')
#25 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/stream/src/DuplexResourceStream.php(154): _PHPStan_cb6cd3c76\Evenement\EventEmitter->emit('data', Array)
#26 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/event-loop/src/StreamSelectLoop.php(201): _PHPStan_cb6cd3c76\React\Stream\DuplexResourceStream->handleData(Resource id #22469)
#27 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/event-loop/src/StreamSelectLoop.php(173): _PHPStan_cb6cd3c76\React\EventLoop\StreamSelectLoop->waitForStreamActivity(NULL)
#28 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Command/WorkerCommand.php(98): _PHPStan_cb6cd3c76\React\EventLoop\StreamSelectLoop->run()
#29 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Command/Command.php(259): PHPStan\Command\WorkerCommand->execute(Object(_PHPStan_cb6cd3c76\Symfony\Component\Console\Input\ArgvInput),
Object(_PHPStan_cb6cd3c76\Symfony\Component\Console\Output\ConsoleOutput))
#30 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(870):
_PHPStan_cb6cd3c76\Symfony\Component\Console\Command\Command->run(Object(_PHPStan_cb6cd3c76\Symfony\Component\Console\Input\ArgvInput), Object(_PHPStan_cb6cd3c76\Symfony\Component\Console\Output\ConsoleOutput))
#31 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(261): _PHPStan_cb6cd3c76\Symfony\Component\Console\Application->doRunCommand(Object(PHPStan\Command\WorkerCommand),
Object(_PHPStan_cb6cd3c76\Symfony\Component\Console\Input\ArgvInput), Object(_PHPStan_cb6cd3c76\Symfony\Component\Console\Output\ConsoleOutput))
#32 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(157):
_PHPStan_cb6cd3c76\Symfony\Component\Console\Application->doRun(Object(_PHPStan_cb6cd3c76\Symfony\Component\Console\Input\ArgvInput), Object(_PHPStan_cb6cd3c76\Symfony\Component\Console\Output\ConsoleOutput))
#33 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/bin/phpstan(124): _PHPStan_cb6cd3c76\Symfony\Component\Console\Application->run()
#34 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/bin/phpstan(125): _PHPStan_cb6cd3c76{closure}()
#35 /var/www/html/vendor/phpstan/phpstan/phpstan(8): require('phar:///var/www...')
#36 /var/www/html/vendor/bin/phpstan(119): include('/var/www/html/v...')
#37 {main}
Internal error: Internal error: Interface "TYPO3\CMS\Backend\View\PageLayoutViewDrawItemHookInterface" not found while analysing file /var/www/html/local_packages/my_sitepackage_example/ext_localconf.php
Code snippet that reproduces the problem
No response
Expected output
No error, just things I can put in the baseline
Did PHPStan help you today? Did it make you happy in any way?
Not yet as it still early, but it has helped me great deals in the past
The text was updated successfully, but these errors were encountered: