Skip to content

Commit

Permalink
Use the standard cache and logs dir for the micro kernel example
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz authored and xabbuh committed Sep 21, 2016
1 parent 3682e6b commit ca53cb5
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions configuration/micro_kernel_trait.rst
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,18 @@ to hold the kernel. Now it looks like this::
// load the annotation routes
$routes->import(__DIR__.'/../src/App/Controller/', '/', 'annotation');
}

// optional, to use the standard Symfony cache directory
public function getCacheDir()
{
return dirname(__DIR__).'/var/cache/'.$this->getEnvironment();
}

// optional, to use the standard Symfony logs directory
public function getLogDir()
{
return dirname(__DIR__).'/var/logs';
}
}

Unlike the previous kernel, this loads an external ``app/config/config.yml`` file,
Expand Down Expand Up @@ -294,9 +306,7 @@ this:
your-project/
├─ app/
| ├─ AppKernel.php
│ ├─ cache/
│ ├─ config/
│ ├─ logs/
│ └─ Resources
| └─ views
| ├─ base.html.twig
Expand All @@ -306,6 +316,9 @@ this:
│ └─ App
| └─ Controller
| └─ MicroController.php
├─ var/
| ├─ cache/
│ └─ logs/
├─ vendor/
│ └─ ...
├─ web/
Expand Down

0 comments on commit ca53cb5

Please sign in to comment.