phpstan: BetterReflection error in PHPStan 1.7.0 - 1.7.1

Bug report

version 1.7.1 PHP version: 8.0.19

 -- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
     Error                                                                                                                                                                                  
 -- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 
     Internal error: Internal error: RecursiveDirectoryIterator::__construct(/var/www/html/app): Failed to open directory:                                                                  
     "PHPStan\Reflection\BetterReflection\SourceLocator\FileReadTrapStreamWrapper::dir_opendir" call failed in file                                                                         
     /var/www/html/libs/Addressbook/Components/Default/Datagrids/AddressbookGrid.php                                                                                                        
                                                                                                                                                                                            
     Post the following stack trace to https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md:                                                                                
     #0 /var/www/html/vendor/nette/finder/src/Utils/Finder.php(216): RecursiveDirectoryIterator->__construct('...', 512)                                                                    
     #1 /var/www/html/vendor/nette/finder/src/Utils/Finder.php(199): Nette\Utils\Finder->buildIterator('...')                                                                               
     #2 /var/www/html/vendor/nette/robot-loader/src/RobotLoader/RobotLoader.php(238): Nette\Utils\Finder->getIterator()                                                                     
     #3 /var/www/html/vendor/nette/robot-loader/src/RobotLoader/RobotLoader.php(116): Nette\Loaders\RobotLoader->refreshClasses()                                                           
     #4 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php(270): Nette\Loaders\RobotLoader->tryLoad('...')    
     #5 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/FileReadTrapStreamWrapper.php(59):                                           
     PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator::PHPStan\Reflection\BetterReflection\SourceLocator\{closure}()                                                 
     #6 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php(282):                                              
     PHPStan\Reflection\BetterReflection\SourceLocator\FileReadTrapStreamWrapper::withStreamWrapperOverride(Object(Closure))                                                                
     #7 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php(114):                                              
     PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator->locateClassByName('...')                                                                                      
     #8 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/AggregateSourceLocator.php(28):                               
     PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator->locateIdentifier(Object(PHPStan\BetterReflection\Reflector\DefaultReflector),                                 
     Object(PHPStan\BetterReflection\Identifier\Identifier))                                                                                                                                
     #9 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))                                                                                                                                
     #10 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))                                                                                                                                
     #11 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/Reflector/MemoizingReflector.php(45):                                                     
     PHPStan\BetterReflection\Reflector\DefaultReflector->reflectClass('...')                                                                                                               
     #12 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/BetterReflectionProvider.php(151):                                                        
     PHPStan\Reflection\BetterReflection\Reflector\MemoizingReflector->reflectClass('...')                                                                                                  
     #13 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/ReflectionProvider/MemoizingReflectionProvider.php(34):                                                    
     PHPStan\Reflection\BetterReflection\BetterReflectionProvider->hasClass('...')                                                                                                          
     #14 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Type/Constant/ConstantStringType.php(72):                                                                             
     PHPStan\Reflection\ReflectionProvider\MemoizingReflectionProvider->hasClass('...')                                                                                                     
     #15 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Dependency/DependencyResolver.php(198): PHPStan\Type\Constant\ConstantStringType->isClassString()                     
     #16 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Dependency/DependencyResolver.php(172):                                                                               
     PHPStan\Dependency\DependencyResolver->considerArrayForCallableTest(Object(PHPStan\Analyser\MutatingScope), Object(PhpParser\Node\Expr\Array_))                                        
     #17 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyser.php(172):                                                                                       
     PHPStan\Dependency\DependencyResolver->resolveDependencies(Object(PhpParser\Node\Expr\Array_), Object(PHPStan\Analyser\MutatingScope))                                                 
     #18 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Node/ClassStatementsGatherer.php(104):                                                                                
     PHPStan\Analyser\FileAnalyser->PHPStan\Analyser\{closure}(Object(PhpParser\Node\Expr\Array_), Object(PHPStan\Analyser\MutatingScope))                                                  
     #19 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(470):                                                                                  
     PHPStan\Node\ClassStatementsGatherer->__invoke(Object(PhpParser\Node\Expr\Array_), Object(PHPStan\Analyser\MutatingScope))                                                             
     #20 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(2394):                                                                                 
     PHPStan\Analyser\NodeScopeResolver::PHPStan\Analyser\{closure}(Object(PhpParser\Node\Expr\Array_), Object(PHPStan\Analyser\MutatingScope))                                             
     #21 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1418):                                                                                 
     PHPStan\Analyser\NodeScopeResolver->callNodeCallbackWithExpression(Object(Closure), Object(PhpParser\Node\Expr\Array_), Object(PHPStan\Analyser\MutatingScope),                        
     Object(PHPStan\Analyser\ExpressionContext))                                                                                                                                            
     #22 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(2592):                                                                                 
     PHPStan\Analyser\NodeScopeResolver->processExprNode(Object(PhpParser\Node\Expr\Array_), Object(PHPStan\Analyser\MutatingScope), Object(Closure),                                       
     Object(PHPStan\Analyser\ExpressionContext))                                                                                                                                            
     #23 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1628):                                                                                 
     PHPStan\Analyser\NodeScopeResolver->processArgs(Object(PHPStan\Reflection\ResolvedMethodReflection), Object(PHPStan\Reflection\ResolvedFunctionVariant), Array,                        
     Object(PHPStan\Analyser\MutatingScope), Object(Closure), Object(PHPStan\Analyser\ExpressionContext))                                                                                   
     #24 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1603):                                                                                 
     PHPStan\Analyser\NodeScopeResolver->processExprNode(Object(PhpParser\Node\Expr\MethodCall), Object(PHPStan\Analyser\MutatingScope), Object(Closure),                                   
     Object(PHPStan\Analyser\ExpressionContext))                                                                                                                                            
     #25 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(522):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processExprNode(Object(PhpParser\Node\Expr\MethodCall), Object(PHPStan\Analyser\MutatingScope), Object(Closure),                                   
     Object(PHPStan\Analyser\ExpressionContext))                                                                                                                                            
     #26 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(323):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Expression), Object(PHPStan\Analyser\MutatingScope), Object(Closure))                                   
     #27 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(485):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\ClassMethod), Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure))                          
     #28 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(323):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\ClassMethod), Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Node\ClassStatementsGatherer))     
     #29 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(569):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\Class_), Array, Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Node\ClassStatementsGatherer))  
     #30 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(323):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Class_), Object(PHPStan\Analyser\MutatingScope), Object(Closure))                                       
     #31 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(535):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\Namespace_), Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure))                           
     #32 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(294):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Namespace_), Object(PHPStan\Analyser\MutatingScope), Object(Closure))                                   
     #33 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyser.php(189): PHPStan\Analyser\NodeScopeResolver->processNodes(Array,                               
     Object(PHPStan\Analyser\MutatingScope), Object(Closure))                                                                                                                               
     #34 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Command/WorkerCommand.php(143): PHPStan\Analyser\FileAnalyser->analyseFile('...', Array,                              
     Object(PHPStan\Rules\Registry), NULL)                                                                                                                                                  
     #35 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97):                                                       
     PHPStan\Command\WorkerCommand->PHPStan\Command\{closure}(Array)                                                                                                                        
     #36 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/clue/ndjson-react/src/Decoder.php(110): _PHPStan_c24aa5a16\Evenement\EventEmitter->emit('...', Array)              
     #37 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97):                                                       
     _PHPStan_c24aa5a16\Clue\React\NDJson\Decoder->handleData(Array)                                                                                                                        
     #38 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/stream/src/Util.php(62): _PHPStan_c24aa5a16\Evenement\EventEmitter->emit('...', Array)                       
     #39 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97):                                                       
     _PHPStan_c24aa5a16\React\Stream\Util::_PHPStan_c24aa5a16\React\Stream\{closure}('...')                                                                                                 
     #40 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/stream/src/DuplexResourceStream.php(154): _PHPStan_c24aa5a16\Evenement\EventEmitter->emit('...', Array)      
     #41 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/event-loop/src/StreamSelectLoop.php(201):                                                                    
     _PHPStan_c24aa5a16\React\Stream\DuplexResourceStream->handleData(Resource id #4052)                                                                                                    
     #42 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/event-loop/src/StreamSelectLoop.php(173):                                                                    
     _PHPStan_c24aa5a16\React\EventLoop\StreamSelectLoop->waitForStreamActivity(NULL)                                                                                                       
     #43 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Command/WorkerCommand.php(106): _PHPStan_c24aa5a16\React\EventLoop\StreamSelectLoop->run()                            
     #44 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Command/Command.php(259):                                                                          
     PHPStan\Command\WorkerCommand->execute(Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Input\ArgvInput),                                                                           
     Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Output\ConsoleOutput))                                                                                                             
     #45 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(856):                                                                              
     _PHPStan_c24aa5a16\Symfony\Component\Console\Command\Command->run(Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Input\ArgvInput),                                                
     Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Output\ConsoleOutput))                                                                                                             
     #46 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(259):                                                                              
     _PHPStan_c24aa5a16\Symfony\Component\Console\Application->doRunCommand(Object(PHPStan\Command\WorkerCommand), Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Input\ArgvInput),    
     Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Output\ConsoleOutput))                                                                                                             
     #47 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(157):                                                                              
     _PHPStan_c24aa5a16\Symfony\Component\Console\Application->doRun(Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Input\ArgvInput),                                                  
     Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Output\ConsoleOutput))                                                                                                             
     #48 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/bin/phpstan(96): _PHPStan_c24aa5a16\Symfony\Component\Console\Application->run()                                          
     #49 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/bin/phpstan(97): _PHPStan_c24aa5a16\{closure}()                                                                           
     #50 /var/www/html/vendor/phpstan/phpstan/phpstan(8): require('...')                                                                                                                    
     #51 /var/www/html/vendor/bin/phpstan(117): include('...')                                                                                                                              
     #52 {main}                                                                                                                                                                             
     Internal error: Internal error: RecursiveDirectoryIterator::__construct(/var/www/html/app): Failed to open directory:                                                                  
     "PHPStan\Reflection\BetterReflection\SourceLocator\FileReadTrapStreamWrapper::dir_opendir" call failed in file                                                                         
     /var/www/html/libs/Addressbook/Components/Default/Forms/EditSubjectForm.php                                                                                                            
                                                                                                                                                                                            
     Post the following stack trace to https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md:                                                                                
     #0 /var/www/html/vendor/nette/finder/src/Utils/Finder.php(216): RecursiveDirectoryIterator->__construct('...', 512)                                                                    
     #1 /var/www/html/vendor/nette/finder/src/Utils/Finder.php(199): Nette\Utils\Finder->buildIterator('...')                                                                               
     #2 /var/www/html/vendor/nette/robot-loader/src/RobotLoader/RobotLoader.php(238): Nette\Utils\Finder->getIterator()                                                                     
     #3 /var/www/html/vendor/nette/robot-loader/src/RobotLoader/RobotLoader.php(116): Nette\Loaders\RobotLoader->refreshClasses()                                                           
     #4 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php(270): Nette\Loaders\RobotLoader->tryLoad('...')    
     #5 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/FileReadTrapStreamWrapper.php(59):                                           
     PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator::PHPStan\Reflection\BetterReflection\SourceLocator\{closure}()                                                 
     #6 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php(282):                                              
     PHPStan\Reflection\BetterReflection\SourceLocator\FileReadTrapStreamWrapper::withStreamWrapperOverride(Object(Closure))                                                                
     #7 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php(114):                                              
     PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator->locateClassByName('...')                                                                                      
     #8 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/AggregateSourceLocator.php(28):                               
     PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator->locateIdentifier(Object(PHPStan\BetterReflection\Reflector\DefaultReflector),                                 
     Object(PHPStan\BetterReflection\Identifier\Identifier))                                                                                                                                
     #9 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))                                                                                                                                
     #10 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))                                                                                                                                
     #11 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/Reflector/MemoizingReflector.php(45):                                                     
     PHPStan\BetterReflection\Reflector\DefaultReflector->reflectClass('...')                                                                                                               
     #12 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/BetterReflectionProvider.php(151):                                                        
     PHPStan\Reflection\BetterReflection\Reflector\MemoizingReflector->reflectClass('...')                                                                                                  
     #13 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/ReflectionProvider/MemoizingReflectionProvider.php(34):                                                    
     PHPStan\Reflection\BetterReflection\BetterReflectionProvider->hasClass('...')                                                                                                          
     #14 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Type/Constant/ConstantStringType.php(72):                                                                             
     PHPStan\Reflection\ReflectionProvider\MemoizingReflectionProvider->hasClass('...')                                                                                                     
     #15 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Dependency/DependencyResolver.php(198): PHPStan\Type\Constant\ConstantStringType->isClassString()                     
     #16 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Dependency/DependencyResolver.php(172):                                                                               
     PHPStan\Dependency\DependencyResolver->considerArrayForCallableTest(Object(PHPStan\Analyser\MutatingScope), Object(PhpParser\Node\Expr\Array_))                                        
     #17 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyser.php(172):                                                                                       
     PHPStan\Dependency\DependencyResolver->resolveDependencies(Object(PhpParser\Node\Expr\Array_), Object(PHPStan\Analyser\MutatingScope))                                                 
     #18 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Node/ClassStatementsGatherer.php(104):                                                                                
     PHPStan\Analyser\FileAnalyser->PHPStan\Analyser\{closure}(Object(PhpParser\Node\Expr\Array_), Object(PHPStan\Analyser\MutatingScope))                                                  
     #19 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(470):                                                                                  
     PHPStan\Node\ClassStatementsGatherer->__invoke(Object(PhpParser\Node\Expr\Array_), Object(PHPStan\Analyser\MutatingScope))                                                             
     #20 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(2394):                                                                                 
     PHPStan\Analyser\NodeScopeResolver::PHPStan\Analyser\{closure}(Object(PhpParser\Node\Expr\Array_), Object(PHPStan\Analyser\MutatingScope))                                             
     #21 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1418):                                                                                 
     PHPStan\Analyser\NodeScopeResolver->callNodeCallbackWithExpression(Object(Closure), Object(PhpParser\Node\Expr\Array_), Object(PHPStan\Analyser\MutatingScope),                        
     Object(PHPStan\Analyser\ExpressionContext))                                                                                                                                            
     #22 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1433):                                                                                 
     PHPStan\Analyser\NodeScopeResolver->processExprNode(Object(PhpParser\Node\Expr\Array_), Object(PHPStan\Analyser\MutatingScope), Object(Closure),                                       
     Object(PHPStan\Analyser\ExpressionContext))                                                                                                                                            
     #23 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(2618):                                                                                 
     PHPStan\Analyser\NodeScopeResolver->PHPStan\Analyser\{closure}(Object(PHPStan\Analyser\MutatingScope))                                                                                 
     #24 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(1441):                                                                                 
     PHPStan\Analyser\NodeScopeResolver->processAssignVar(Object(PHPStan\Analyser\MutatingScope), Object(PhpParser\Node\Expr\Variable), Object(PhpParser\Node\Expr\Array_),                 
     Object(Closure), Object(PHPStan\Analyser\ExpressionContext), Object(Closure), true)                                                                                                    
     #25 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(522):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processExprNode(Object(PhpParser\Node\Expr\Assign), Object(PHPStan\Analyser\MutatingScope), Object(Closure),                                       
     Object(PHPStan\Analyser\ExpressionContext))                                                                                                                                            
     #26 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(323):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Expression), Object(PHPStan\Analyser\MutatingScope), Object(Closure))                                   
     #27 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(485):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\ClassMethod), Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure))                          
     #28 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(323):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\ClassMethod), Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Node\ClassStatementsGatherer))     
     #29 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(569):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\Class_), Array, Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Node\ClassStatementsGatherer))  
     #30 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(323):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Class_), Object(PHPStan\Analyser\MutatingScope), Object(Closure))                                       
     #31 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(535):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\Namespace_), Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure))                           
     #32 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(294):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Namespace_), Object(PHPStan\Analyser\MutatingScope), Object(Closure))                                   
     #33 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyser.php(189): PHPStan\Analyser\NodeScopeResolver->processNodes(Array,                               
     Object(PHPStan\Analyser\MutatingScope), Object(Closure))                                                                                                                               
     #34 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Command/WorkerCommand.php(143): PHPStan\Analyser\FileAnalyser->analyseFile('...', Array,                              
     Object(PHPStan\Rules\Registry), NULL)                                                                                                                                                  
     #35 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97):                                                       
     PHPStan\Command\WorkerCommand->PHPStan\Command\{closure}(Array)                                                                                                                        
     #36 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/clue/ndjson-react/src/Decoder.php(110): _PHPStan_c24aa5a16\Evenement\EventEmitter->emit('...', Array)              
     #37 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97):                                                       
     _PHPStan_c24aa5a16\Clue\React\NDJson\Decoder->handleData(Array)                                                                                                                        
     #38 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/stream/src/Util.php(62): _PHPStan_c24aa5a16\Evenement\EventEmitter->emit('...', Array)                       
     #39 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97):                                                       
     _PHPStan_c24aa5a16\React\Stream\Util::_PHPStan_c24aa5a16\React\Stream\{closure}('...')                                                                                                 
     #40 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/stream/src/DuplexResourceStream.php(154): _PHPStan_c24aa5a16\Evenement\EventEmitter->emit('...', Array)      
     #41 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/event-loop/src/StreamSelectLoop.php(201):                                                                    
     _PHPStan_c24aa5a16\React\Stream\DuplexResourceStream->handleData(Resource id #4052)                                                                                                    
     #42 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/event-loop/src/StreamSelectLoop.php(173):                                                                    
     _PHPStan_c24aa5a16\React\EventLoop\StreamSelectLoop->waitForStreamActivity(NULL)                                                                                                       
     #43 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Command/WorkerCommand.php(106): _PHPStan_c24aa5a16\React\EventLoop\StreamSelectLoop->run()                            
     #44 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Command/Command.php(259):                                                                          
     PHPStan\Command\WorkerCommand->execute(Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Input\ArgvInput),                                                                           
     Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Output\ConsoleOutput))                                                                                                             
     #45 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(856):                                                                              
     _PHPStan_c24aa5a16\Symfony\Component\Console\Command\Command->run(Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Input\ArgvInput),                                                
     Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Output\ConsoleOutput))                                                                                                             
     #46 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(259):                                                                              
     _PHPStan_c24aa5a16\Symfony\Component\Console\Application->doRunCommand(Object(PHPStan\Command\WorkerCommand), Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Input\ArgvInput),    
     Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Output\ConsoleOutput))                                                                                                             
     #47 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(157):                                                                              
     _PHPStan_c24aa5a16\Symfony\Component\Console\Application->doRun(Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Input\ArgvInput),                                                  
     Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Output\ConsoleOutput))                                                                                                             
     #48 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/bin/phpstan(96): _PHPStan_c24aa5a16\Symfony\Component\Console\Application->run()                                          
     #49 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/bin/phpstan(97): _PHPStan_c24aa5a16\{closure}()                                                                           
     #50 /var/www/html/vendor/phpstan/phpstan/phpstan(8): require('...')                                                                                                                    
     #51 /var/www/html/vendor/bin/phpstan(117): include('...')                                                                                                                              
     #52 {main}                                                                                                                                                                             
     Child process error (exit code 1):                                                                                                                                                     
     Internal error: Internal error: RecursiveDirectoryIterator::__construct(/var/www/html/app): Failed to open directory:                                                                  
     "PHPStan\Reflection\BetterReflection\SourceLocator\FileReadTrapStreamWrapper::dir_opendir" call failed in file                                                                         
     /var/www/html/libs/RegularInvoices/Commands/IssueRegularInvoicesCommand.php                                                                                                            
                                                                                                                                                                                            
     Post the following stack trace to https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md:                                                                                
     #0 /var/www/html/vendor/nette/finder/src/Utils/Finder.php(216): RecursiveDirectoryIterator->__construct('...', 512)                                                                    
     #1 /var/www/html/vendor/nette/finder/src/Utils/Finder.php(199): Nette\Utils\Finder->buildIterator('...')                                                                               
     #2 /var/www/html/vendor/nette/robot-loader/src/RobotLoader/RobotLoader.php(238): Nette\Utils\Finder->getIterator()                                                                     
     #3 /var/www/html/vendor/nette/robot-loader/src/RobotLoader/RobotLoader.php(116): Nette\Loaders\RobotLoader->refreshClasses()                                                           
     #4 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php(270): Nette\Loaders\RobotLoader->tryLoad('...')    
     #5 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/FileReadTrapStreamWrapper.php(59):                                           
     PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator::PHPStan\Reflection\BetterReflection\SourceLocator\{closure}()                                                 
     #6 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php(282):                                              
     PHPStan\Reflection\BetterReflection\SourceLocator\FileReadTrapStreamWrapper::withStreamWrapperOverride(Object(Closure))                                                                
     #7 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/SourceLocator/AutoloadSourceLocator.php(114):                                              
     PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator->locateClassByName('...')                                                                                      
     #8 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/ondrejmirtes/better-reflection/src/SourceLocator/Type/AggregateSourceLocator.php(28):                               
     PHPStan\Reflection\BetterReflection\SourceLocator\AutoloadSourceLocator->locateIdentifier(Object(PHPStan\BetterReflection\Reflector\DefaultReflector),                                 
     Object(PHPStan\BetterReflection\Identifier\Identifier))                                                                                                                                
     #9 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))                                                                                                                                
     #10 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))                                                                                                                                
     #11 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/Reflector/MemoizingReflector.php(45):                                                     
     PHPStan\BetterReflection\Reflector\DefaultReflector->reflectClass('...')                                                                                                               
     #12 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/BetterReflection/BetterReflectionProvider.php(151):                                                        
     PHPStan\Reflection\BetterReflection\Reflector\MemoizingReflector->reflectClass('...')                                                                                                  
     #13 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Reflection/ReflectionProvider/MemoizingReflectionProvider.php(34):                                                    
     PHPStan\Reflection\BetterReflection\BetterReflectionProvider->hasClass('...')                                                                                                          
     #14 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Rules/ClassCaseSensitivityCheck.php(34):                                                                              
     PHPStan\Reflection\ReflectionProvider\MemoizingReflectionProvider->hasClass('...')                                                                                                     
     #15 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Rules/Namespaces/ExistingNamesInUseRule.php(107): PHPStan\Rules\ClassCaseSensitivityCheck->checkClassNames(Array)     
     #16 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Rules/Namespaces/ExistingNamesInUseRule.php(61):                                                                      
     PHPStan\Rules\Namespaces\ExistingNamesInUseRule->checkClasses(Array)                                                                                                                   
     #17 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyser.php(102):                                                                                       
     PHPStan\Rules\Namespaces\ExistingNamesInUseRule->processNode(Object(PhpParser\Node\Stmt\Use_), Object(PHPStan\Analyser\MutatingScope))                                                 
     #18 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(378):                                                                                  
     PHPStan\Analyser\FileAnalyser->PHPStan\Analyser\{closure}(Object(PhpParser\Node\Stmt\Use_), Object(PHPStan\Analyser\MutatingScope))                                                    
     #19 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(323):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Use_), Object(PHPStan\Analyser\MutatingScope), Object(Closure))                                         
     #20 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(535):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\Namespace_), Array, Object(PHPStan\Analyser\MutatingScope), Object(Closure))                           
     #21 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(294):                                                                                  
     PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\Namespace_), Object(PHPStan\Analyser\MutatingScope), Object(Closure))                                   
     #22 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Analyser/FileAnalyser.php(189): PHPStan\Analyser\NodeScopeResolver->processNodes(Array,                               
     Object(PHPStan\Analyser\MutatingScope), Object(Closure))                                                                                                                               
     #23 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Command/WorkerCommand.php(143): PHPStan\Analyser\FileAnalyser->analyseFile('...', Array,                              
     Object(PHPStan\Rules\Registry), NULL)                                                                                                                                                  
     #24 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97):                                                       
     PHPStan\Command\WorkerCommand->PHPStan\Command\{closure}(Array)                                                                                                                        
     #25 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/clue/ndjson-react/src/Decoder.php(110): _PHPStan_c24aa5a16\Evenement\EventEmitter->emit('...', Array)              
     #26 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97):                                                       
     _PHPStan_c24aa5a16\Clue\React\NDJson\Decoder->handleData(Array)                                                                                                                        
     #27 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/stream/src/Util.php(62): _PHPStan_c24aa5a16\Evenement\EventEmitter->emit('...', Array)                       
     #28 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/evenement/evenement/src/Evenement/EventEmitterTrait.php(97):                                                       
     _PHPStan_c24aa5a16\React\Stream\Util::_PHPStan_c24aa5a16\React\Stream\{closure}('...')                                                                                                 
     #29 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/stream/src/DuplexResourceStream.php(154): _PHPStan_c24aa5a16\Evenement\EventEmitter->emit('...', Array)      
     #30 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/event-loop/src/StreamSelectLoop.php(201):                                                                    
     _PHPStan_c24aa5a16\React\Stream\DuplexResourceStream->handleData(Resource id #4052)                                                                                                    
     #31 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/react/event-loop/src/StreamSelectLoop.php(173):                                                                    
     _PHPStan_c24aa5a16\React\EventLoop\StreamSelectLoop->waitForStreamActivity(NULL)                                                                                                       
     #32 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/src/Command/WorkerCommand.php(106): _PHPStan_c24aa5a16\React\EventLoop\StreamSelectLoop->run()                            
     #33 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Command/Command.php(259):                                                                          
     PHPStan\Command\WorkerCommand->execute(Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Input\ArgvInput),                                                                           
     Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Output\ConsoleOutput))                                                                                                             
     #34 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(856):                                                                              
     _PHPStan_c24aa5a16\Symfony\Component\Console\Command\Command->run(Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Input\ArgvInput),                                                
     Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Output\ConsoleOutput))                                                                                                             
     #35 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(259):                                                                              
     _PHPStan_c24aa5a16\Symfony\Component\Console\Application->doRunCommand(Object(PHPStan\Command\WorkerCommand), Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Input\ArgvInput),    
     Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Output\ConsoleOutput))                                                                                                             
     #36 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/vendor/symfony/console/Application.php(157):                                                                              
     _PHPStan_c24aa5a16\Symfony\Component\Console\Application->doRun(Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Input\ArgvInput),                                                  
     Object(_PHPStan_c24aa5a16\Symfony\Component\Console\Output\ConsoleOutput))                                                                                                             
     #37 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/bin/phpstan(96): _PHPStan_c24aa5a16\Symfony\Component\Console\Application->run()                                          
     #38 phar:///var/www/html/vendor/phpstan/phpstan/phpstan.phar/bin/phpstan(97): _PHPStan_c24aa5a16\{closure}()                                                                           
     #39 /var/www/html/vendor/phpstan/phpstan/phpstan(8): require('...')                                                                                                                    
     #40 /var/www/html/vendor/bin/phpstan(117): include('...')                                                                                                                              
     #41 {main}                                                                                                                                                                             
     Child process error (exit code 1):                                                                                                                                                     
 -- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 26 (10 by maintainers)

Most upvoted comments

🤷‍♂️