File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1515use Psr \Log \LoggerInterface ;
1616use Symfony \Bundle \FrameworkBundle \DependencyInjection \CompatibilityServiceSubscriberInterface as ServiceSubscriberInterface ;
1717use Symfony \Component \Config \Loader \LoaderInterface ;
18+ use Symfony \Component \Config \Resource \FileExistenceResource ;
19+ use Symfony \Component \Config \Resource \FileResource ;
1820use Symfony \Component \DependencyInjection \Config \ContainerParametersResource ;
1921use Symfony \Component \DependencyInjection \ContainerInterface as SymfonyContainerInterface ;
2022use Symfony \Component \DependencyInjection \Exception \ParameterNotFoundException ;
@@ -71,6 +73,16 @@ public function getRouteCollection()
7173 $ this ->collection = $ this ->container ->get ('routing.loader ' )->load ($ this ->resource , $ this ->options ['resource_type ' ]);
7274 $ this ->resolveParameters ($ this ->collection );
7375 $ this ->collection ->addResource (new ContainerParametersResource ($ this ->collectedParameters ));
76+
77+ try {
78+ $ containerFile = ($ this ->paramFetcher )('kernel.cache_dir ' ).'/ ' .($ this ->paramFetcher )('kernel.container_class ' ).'.php ' ;
79+ if (file_exists ($ containerFile )) {
80+ $ this ->collection ->addResource (new FileResource ($ containerFile ));
81+ } else {
82+ $ this ->collection ->addResource (new FileExistenceResource ($ containerFile ));
83+ }
84+ } catch (ParameterNotFoundException $ exception ) {
85+ }
7486 }
7587
7688 return $ this ->collection ;
You can’t perform that action at this time.
0 commit comments