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 15
15
use Psr \Log \LoggerInterface ;
16
16
use Symfony \Bundle \FrameworkBundle \DependencyInjection \CompatibilityServiceSubscriberInterface as ServiceSubscriberInterface ;
17
17
use Symfony \Component \Config \Loader \LoaderInterface ;
18
+ use Symfony \Component \Config \Resource \FileExistenceResource ;
19
+ use Symfony \Component \Config \Resource \FileResource ;
18
20
use Symfony \Component \DependencyInjection \Config \ContainerParametersResource ;
19
21
use Symfony \Component \DependencyInjection \ContainerInterface as SymfonyContainerInterface ;
20
22
use Symfony \Component \DependencyInjection \Exception \ParameterNotFoundException ;
@@ -71,6 +73,16 @@ public function getRouteCollection()
71
73
$ this ->collection = $ this ->container ->get ('routing.loader ' )->load ($ this ->resource , $ this ->options ['resource_type ' ]);
72
74
$ this ->resolveParameters ($ this ->collection );
73
75
$ 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
+ }
74
86
}
75
87
76
88
return $ this ->collection ;
You can’t perform that action at this time.
0 commit comments