| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  | declare(strict_types=1); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  | namespace App\Runner; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  | use Error; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  | use ErrorException; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  | use Exception; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  | use Psr\Container\ContainerInterface; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  | use Yiisoft\Config\Config; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  | use Yiisoft\Di\Container; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  | use Yiisoft\Factory\Exception\CircularReferenceException; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  | use Yiisoft\Factory\Exception\InvalidConfigException; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  | use Yiisoft\Factory\Exception\NotFoundException; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  | use Yiisoft\Factory\Exception\NotInstantiableException; | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  | use Yiisoft\Yii\Console\Application; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  | use Yiisoft\Yii\Console\Output\ConsoleBufferedOutput; | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 19 |  |  |  | 
            
                                                                        
                            
            
                                    
            
            
                | 20 |  |  | final class ConsoleApplicationRunner | 
            
                                                                        
                            
            
                                    
            
            
                | 21 |  |  | { | 
            
                                                                        
                            
            
                                    
            
            
                | 22 |  |  |     /** | 
            
                                                                        
                            
            
                                    
            
            
                | 23 |  |  |      * @throws CircularReferenceException|ErrorException|Exception|InvalidConfigException|NotFoundException | 
            
                                                                        
                            
            
                                    
            
            
                | 24 |  |  |      * @throws NotInstantiableException | 
            
                                                                        
                            
            
                                    
            
            
                | 25 |  |  |      */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |     public function run(): void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  |         $config = new Config( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |             dirname(__DIR__, 2), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  |             '/config/packages', // Configs path. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  |             null, | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  |             [ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  |                 'params', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  |                 'events', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  |                 'events-web', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  |                 'events-console', | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  |             ], | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |         $container = new Container( | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |             $config->get('console'), | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  |             $config->get('providers-console') | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  |         ); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  |         $container = $container->get(ContainerInterface::class); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |         // Run bootstrap | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |         $this->runBootstrap($container, $config->get('bootstrap-console')); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  |         /** @var Application */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 51 |  |  |         $application = $container->get(Application::class); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 52 |  |  |         $exitCode = 1; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 53 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 54 |  |  |         try { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  |             $application->start(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  |             $exitCode = $application->run(null, new ConsoleBufferedOutput()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 57 |  |  |         } catch (Error $error) { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 58 |  |  |             $application->renderThrowable($error, new ConsoleBufferedOutput()); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 59 |  |  |         } finally { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 60 |  |  |             $application->shutdown($exitCode); | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 61 |  |  |             exit($exitCode); | 
                            
                    |  |  |  | 
                                                                                        
                                                                                     | 
            
                                                                        
                            
            
                                    
            
            
                | 62 |  |  |         } | 
            
                                                                        
                            
            
                                    
            
            
                | 63 |  |  |     } | 
            
                                                                        
                            
            
                                    
            
            
                | 64 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 65 |  |  |     private function runBootstrap(ContainerInterface $container, array $bootstrapList): void | 
            
                                                                                                            
                            
            
                                    
            
            
                | 66 |  |  |     { | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 67 |  |  |         (new BootstrapRunner($container, $bootstrapList))->run(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 68 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 69 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 70 |  |  |  | 
            
                        
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths