Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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