alexfinnarn/moz

Remove ParameterBagInterface from controllers

Opened this issue · 0 comments

You can use a helper method to get configuration in a controller method.

// Current.
$params->get('posts.post_directory')

// Better.
$this->getParameter('posts.post_directory')

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