alexfinnarn/moz

Remove KernelInterface from controllers

Opened this issue · 0 comments

You can actually use the parameter bag to grab values related to the kernel.

// Current
$kernel->getProjectDir();

// Better.
$this->getParameter('kernel.project_dir')

Reference: https://symfony.com/doc/current/controller.html#accessing-configuration-values