Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-1331

Rector failing hard after update to phpstan/phpstan 1.10.55

    • Type: Icon: Build Failure Build Failure
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.17.1, 1.18.0
    • Affects Version/s: 1.17.0
    • Component/s: Tests
    • None

      After automatic upgrade to phpstan/phpstan 1.10.55, the rector command is failing.

                                                                                                                              
       [ERROR] Could not process "src/Model/IndexInfoIteratorIterator.php" file, due  
               to:                                                                                                            
               "System error: "Call to undefined method                                                                       
               PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode::getRequireExtendsTagValues()"                                      
                                                                                                                              
               Stack trace:                                                                                                   
               #0 phar://vendor/phpstan/phpstan/phpstan.phar/src/PhpDoc/ResolvedPhpDocBlock.php(503):                         
               PHPStan\PhpDoc\PhpDocNodeResolver->resolveRequireExtendsTags(Object(PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode 
               ), Object(PHPStan\Analyser\NameScope))                                                                         
               #1 phar://vendor/phpstan/phpstan/phpstan.phar/src/PhpDoc/ResolvedPhpDocBlock.php(258):                         
               PHPStan\PhpDoc\ResolvedPhpDocBlock->getRequireExtendsTags()                                                    
               #2 phar://vendor/phpstan/phpstan/phpstan.phar/src/PhpDoc/PhpDocInheritanceResolver.php(56):                    
               PHPStan\PhpDoc\ResolvedPhpDocBlock->merge(Array, Array)                                                        
               #3 phar://vendor/phpstan/phpstan/phpstan.phar/src/PhpDoc/PhpDocInheritanceResolver.php(42):                    
               PHPStan\PhpDoc\PhpDocInheritanceResolver->docBlockTreeToResolvedDocBlock(Object(PHPStan\PhpDoc\PhpDocBlock),   
               NULL, '__construct', NULL, NULL)                                                                               
               #4 phar://vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(3737):                        
               PHPStan\PhpDoc\PhpDocInheritanceResolver->resolvePhpDocForMethod('/** @param Trav...', '/Users/jerome/D...',   
               Object(PHPStan\Reflection\ClassReflection), NULL, '__construct', Array)                                        
               #5 phar://vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(527):                         
               PHPStan\Analyser\NodeScopeResolver->getPhpDocs(Object(PHPStan\Analyser\MutatingScope),                         
               Object(PhpParser\Node\Stmt\ClassMethod))                                                                       
               #6 phar://vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(401):                         
               PHPStan\Analyser\NodeScopeResolver->processStmtNode(Object(PhpParser\Node\Stmt\ClassMethod),                   
               Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Node\ClassStatementsGatherer),                          
               Object(PHPStan\Analyser\StatementContext))                                                                     
               #7 phar://vendor/phpstan/phpstan/phpstan.phar/src/Analyser/NodeScopeResolver.php(668):                         
               PHPStan\Analyser\NodeScopeResolver->processStmtNodes(Object(PhpParser\Node\Stmt\Class_), Array,                
               Object(PHPStan\Analyser\MutatingScope), Object(PHPStan\Node\ClassStatementsGatherer),                          
               Object(PHPStan\Analyser\StatementContext))                                                                     
               #8 phar://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))            
               #9 phar://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))            
               #10 phar://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))            
               #11 vendor/rector/rector/packages/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php(211):            
               PHPStan\Analyser\NodeScopeResolver->processNodes(Array, Object(PHPStan\Analyser\MutatingScope),                
               Object(Closure))                                                                                               
               #12 vendor/rector/rector/packages/NodeTypeResolver/NodeScopeAndMetadataDecorator.php(53):                      
               Rector\NodeTypeResolver\PHPStan\Scope\PHPStanNodeScopeResolver->processNodes(Array, '/Users/jerome/D...')      
               #13 vendor/rector/rector/src/Application/FileProcessor.php(200):                                               
               Rector\NodeTypeResolver\NodeScopeAndMetadataDecorator->decorateNodesFromFile('/Users/jerome/D...', Array)      
               #14 vendor/rector/rector/src/Application/FileProcessor.php(146):                                               
               Rector\Core\Application\FileProcessor->parseFileNodes(Object(Rector\Core\ValueObject\Application\File))        
               #15 vendor/rector/rector/src/Application/FileProcessor.php(105):                                               
               Rector\Core\Application\FileProcessor->parseFileAndDecorateNodes(Object(Rector\Core\ValueObject\Application\Fi 
               le))                                                                                                           
               #16 vendor/rector/rector/src/Application/ApplicationFileProcessor.php(177):                                    
               Rector\Core\Application\FileProcessor->processFile(Object(Rector\Core\ValueObject\Application\File),           
               Object(Rector\Core\ValueObject\Configuration))                                                                 
               #17 vendor/rector/rector/src/Application/ApplicationFileProcessor.php(153):                                    
               Rector\Core\Application\ApplicationFileProcessor->processFile(Object(Rector\Core\ValueObject\Application\File) 
               , Object(Rector\Core\ValueObject\Configuration))                                                               
               #18 vendor/rector/rector/src/Console/Command/WorkerCommand.php(132):                                           
               Rector\Core\Application\ApplicationFileProcessor->processFiles(Array,                                          
               Object(Rector\Core\ValueObject\Configuration), NULL)                                                           
               #19 vendor/rector/rector/vendor/evenement/evenement/src/EventEmitterTrait.php(111):                            
               Rector\Core\Console\Command\WorkerCommand->Rector\Core\Console\Command\{closure}(Array)                        
               #20 vendor/rector/rector/vendor/clue/ndjson-react/src/Decoder.php(117):                                        
               RectorPrefix202312\Evenement\EventEmitter->emit('data', Array)                                                 
               #21 vendor/rector/rector/vendor/evenement/evenement/src/EventEmitterTrait.php(111):                            
               RectorPrefix202312\Clue\React\NDJson\Decoder->handleData(Array)                                                
               #22 vendor/rector/rector/vendor/react/stream/src/Util.php(62):                                                 
               RectorPrefix202312\Evenement\EventEmitter->emit('data', Array)                                                 
               #23 vendor/rector/rector/vendor/evenement/evenement/src/EventEmitterTrait.php(111):                            
               RectorPrefix202312\React\Stream\Util::RectorPrefix202312\React\Stream\{closure}('{"action":"main...')          
               #24 vendor/rector/rector/vendor/react/stream/src/DuplexResourceStream.php(154):                                
               RectorPrefix202312\Evenement\EventEmitter->emit('data', Array)                                                 
               #25 vendor/rector/rector/vendor/react/event-loop/src/StreamSelectLoop.php(201):                                
               RectorPrefix202312\React\Stream\DuplexResourceStream->handleData(Resource id #1687)                            
               #26 vendor/rector/rector/vendor/react/event-loop/src/StreamSelectLoop.php(173):                                
               RectorPrefix202312\React\EventLoop\StreamSelectLoop->waitForStreamActivity(NULL)                               
               #27 vendor/rector/rector/src/Console/Command/WorkerCommand.php(90):                                            
               RectorPrefix202312\React\EventLoop\StreamSelectLoop->run()                                                     
               #28 vendor/rector/rector/vendor/symfony/console/Command/Command.php(327):                                      
               Rector\Core\Console\Command\WorkerCommand->execute(Object(RectorPrefix202312\Symfony\Component\Console\Input\A 
               rgvInput), Object(RectorPrefix202312\Symfony\Component\Console\Output\ConsoleOutput))                          
               #29 vendor/rector/rector/vendor/symfony/console/Application.php(960):                                          
               RectorPrefix202312\Symfony\Component\Console\Command\Command->run(Object(RectorPrefix202312\Symfony\Component\ 
               Console\Input\ArgvInput), Object(RectorPrefix202312\Symfony\Component\Console\Output\ConsoleOutput))           
               #30 vendor/rector/rector/vendor/symfony/console/Application.php(333):                                          
               RectorPrefix202312\Symfony\Component\Console\Application->doRunCommand(Object(Rector\Core\Console\Command\Work 
               erCommand), Object(RectorPrefix202312\Symfony\Component\Console\Input\ArgvInput),                              
               Object(RectorPrefix202312\Symfony\Component\Console\Output\ConsoleOutput))                                     
               #31 vendor/rector/rector/src/Console/ConsoleApplication.php(53):                                               
               RectorPrefix202312\Symfony\Component\Console\Application->doRun(Object(RectorPrefix202312\Symfony\Component\Co 
               nsole\Input\ArgvInput), Object(RectorPrefix202312\Symfony\Component\Console\Output\ConsoleOutput))             
               #32 vendor/rector/rector/vendor/symfony/console/Application.php(216):                                          
               Rector\Core\Console\ConsoleApplication->doRun(Object(RectorPrefix202312\Symfony\Component\Console\Input\ArgvIn 
               put), Object(RectorPrefix202312\Symfony\Component\Console\Output\ConsoleOutput))                               
               #33 vendor/rector/rector/bin/rector.php(129): RectorPrefix202312\Symfony\Component\Console\Application->run()  
               #34 vendor/rector/rector/bin/rector(5): require_once('/Users/jerome/D...')                                     
               #35 vendor/bin/rector(119): include('/Users/jerome/D...')                                                      
               #36 {main}". On line: 330                                                                                      
                                                                                                                              
      
      
      

            Assignee:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Reporter:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: