diff --git a/src/Twig/SourceCodeExtension.php b/src/Twig/SourceCodeExtension.php index 415fd0fa1..c0248209b 100644 --- a/src/Twig/SourceCodeExtension.php +++ b/src/Twig/SourceCodeExtension.php @@ -30,19 +30,16 @@ */ final class SourceCodeExtension extends AbstractExtension { - private FileLinkFormatter $fileLinkFormat; - private string $projectDir; /** * @var callable|null */ private $controller; public function __construct( - FileLinkFormatter $fileLinkFormat, + private FileLinkFormatter $fileLinkFormat, #[Autowire('%kernel.project_dir%')] - string $projectDir, + private string $projectDir, ) { - $this->fileLinkFormat = $fileLinkFormat; $this->projectDir = str_replace('\\', '/', $projectDir).'/'; }