From dfbc2a4cd2fc361875e1128c9a18581f8a5b8d39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ca=C5=82ka?= <25438601+rafaucau@users.noreply.github.com> Date: Tue, 19 Nov 2024 15:16:15 +0100 Subject: [PATCH] docs: improve .htaccess warning --- src/Utility/HtaccessManager.php | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/Utility/HtaccessManager.php b/src/Utility/HtaccessManager.php index 72d4e0b..275acc5 100644 --- a/src/Utility/HtaccessManager.php +++ b/src/Utility/HtaccessManager.php @@ -17,16 +17,14 @@ class HtaccessManager private string $htaccessPath; private Filesystem $filesystem; - private CookieFactory $cookie; - private SettingsRepositoryInterface $settings; - public function __construct(Paths $paths, CookieFactory $cookie, SettingsRepositoryInterface $settings) - { + public function __construct( + Paths $paths, + private readonly CookieFactory $cookie, + private readonly SettingsRepositoryInterface $settings, + ) { $this->filesystem = new Filesystem(); $this->htaccessPath = $paths->public.'/.htaccess'; - - $this->cookie = $cookie; - $this->settings = $settings; } /** @@ -50,7 +48,7 @@ public function updateHtaccess(): void /** Generates the content of the LSCache block to be inserted into the .htaccess file. */ private function generateLsCacheBlock(): string { - $block = self::BEGIN_LSCACHE." - Do not edit the contents of this block!\n"; + $block = self::BEGIN_LSCACHE." - Generated by LSCache extension. Do not manually edit the contents of this block!\n"; $block .= ''. $this->addLine('CacheLookup on'). $this->addLine('RewriteEngine On').