File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/Symfony/Component/HttpKernel Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 30
30
use Symfony \Component \Config \Loader \LoaderResolver ;
31
31
use Symfony \Component \Config \Loader \DelegatingLoader ;
32
32
use Symfony \Component \Config \ConfigCache ;
33
- use Symfony \Component \Config \Util \CacheFileUtils ;
34
33
use Symfony \Component \ClassLoader \ClassCollectionLoader ;
35
34
36
35
/**
@@ -614,7 +613,13 @@ protected function getEnvParameters()
614
613
protected function buildContainer ()
615
614
{
616
615
foreach (array ('cache ' => $ this ->getCacheDir (), 'logs ' => $ this ->getLogDir ()) as $ name => $ dir ) {
617
- CacheFileUtils::createCacheDir ($ dir , $ name );
616
+ if (!is_dir ($ dir )) {
617
+ if (false === @mkdir ($ dir , 0777 , true )) {
618
+ throw new \RuntimeException (sprintf ("Unable to create the %s directory (%s) \n" , $ name , $ dir ));
619
+ }
620
+ } elseif (!is_writable ($ dir )) {
621
+ throw new \RuntimeException (sprintf ("Unable to write in the %s directory (%s) \n" , $ name , $ dir ));
622
+ }
618
623
}
619
624
620
625
$ container = $ this ->getContainerBuilder ();
You can’t perform that action at this time.
0 commit comments