File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
packages/fractor/src/DependencyInjection Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 44
55namespace a9f \Fractor \DependencyInjection ;
66
7+ use a9f \Fractor \Exception \ShouldNotHappenException ;
78use a9f \FractorExtensionInstaller \Generated \InstalledPackages ;
89use Symfony \Component \Config \FileLocator ;
910use Symfony \Component \Console \DependencyInjection \AddConsoleCommandPass ;
@@ -60,7 +61,16 @@ private function collectConfigFilesFromExtensions(): array
6061 }
6162
6263 foreach (InstalledPackages::PACKAGES as $ package ) {
63- $ collectedConfigFiles [] = $ package ['path ' ] . '/config/application.php ' ;
64+ $ configPath = $ package ['path ' ] . '/config/application.php ' ;
65+
66+ if (! is_readable ($ configPath )) {
67+ throw new ShouldNotHappenException (sprintf (
68+ 'Config file "%s" is not readable or does not exist. ' ,
69+ $ configPath
70+ ));
71+ }
72+
73+ $ collectedConfigFiles [] = $ configPath ;
6474 }
6575
6676 return $ collectedConfigFiles ;
You can’t perform that action at this time.
0 commit comments