Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the standard cache and logs dir for the micro kernel example #6935

Closed
wants to merge 1 commit into from
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