diff --git a/src/Twig/AppExtension.php b/src/Twig/AppExtension.php index 4856bd846..522b49a5d 100644 --- a/src/Twig/AppExtension.php +++ b/src/Twig/AppExtension.php @@ -29,6 +29,8 @@ class AppExtension extends AbstractExtension public function __construct(string $locales) { + // The $locales argument is injected thanks to the service container. + // See https://symfony.com/doc/current/service_container.html#binding-arguments-by-name-or-type $localeCodes = explode('|', $locales); sort($localeCodes); $this->localeCodes = $localeCodes; diff --git a/src/Twig/SourceCodeExtension.php b/src/Twig/SourceCodeExtension.php index 4034fdc2f..87f42e8eb 100644 --- a/src/Twig/SourceCodeExtension.php +++ b/src/Twig/SourceCodeExtension.php @@ -21,7 +21,7 @@ * CAUTION: this is an extremely advanced Twig extension. It's used to get the * source code of the controller and the template used to render the current * page. If you are starting with Symfony, don't look at this code and consider - * studying instead the code of the src/App/Twig/AppExtension.php extension. + * studying instead the code of the src/Twig/AppExtension.php extension. * * @author Ryan Weaver * @author Javier Eguiluz