From 798ad9e459020a5142a3b705fd95017e50179716 Mon Sep 17 00:00:00 2001 From: quietone <quietone@2572884.no-reply.drupal.org> Date: Mon, 20 Jan 2025 13:48:40 +1300 Subject: [PATCH] =?UTF-8?q?Issue=20#3495778=20by=20bramdriesen,=20smustgra?= =?UTF-8?q?ve,=20cmlara,=20dawehner,=20drumm,=20effulgentsia,=20fabianx,?= =?UTF-8?q?=20catch,=20berdir,=20alexpott,=20amateescu,=20BarisW,=20benjif?= =?UTF-8?q?isher,=20g=C3=A1bor=20hojtsy,=20guypaddock,=20tim.plunkett,=20w?= =?UTF-8?q?ebchick,=20wim=20leers,=20quicksketch,=20xjm,=20tedbow,=20poker?= =?UTF-8?q?10,=20kim.pepper,=20jenlampton,=20larowlan,=20longwave,=20plach?= =?UTF-8?q?,=20mondrake:=20Update=20all=20references=20to=20file=5Fsave=5F?= =?UTF-8?q?htaccess()?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer/Plugin/VendorHardening/FileSecurity.php | 2 +- .../Functional/File/FileSaveHtaccessLoggingTest.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/composer/Plugin/VendorHardening/FileSecurity.php b/composer/Plugin/VendorHardening/FileSecurity.php index 3424c5617e2b..5186fa6447fd 100644 --- a/composer/Plugin/VendorHardening/FileSecurity.php +++ b/composer/Plugin/VendorHardening/FileSecurity.php @@ -43,7 +43,7 @@ public static function writeHtaccess($directory, $deny_public_access = TRUE, $fo * @return string * The desired contents of the .htaccess file. * - * @see file_save_htaccess() + * @see \Drupal\Component\FileSecurity\FileSecurity::writeHtaccess() */ public static function htaccessLines($deny_public_access = TRUE) { $lines = static::htaccessPreventExecution(); diff --git a/core/modules/system/tests/src/Functional/File/FileSaveHtaccessLoggingTest.php b/core/modules/system/tests/src/Functional/File/FileSaveHtaccessLoggingTest.php index d901a7701cbd..e2770b15a1db 100644 --- a/core/modules/system/tests/src/Functional/File/FileSaveHtaccessLoggingTest.php +++ b/core/modules/system/tests/src/Functional/File/FileSaveHtaccessLoggingTest.php @@ -8,7 +8,7 @@ use Drupal\Tests\BrowserTestBase; /** - * Tests the log message added by file_save_htaccess(). + * Tests the log message added by the HtaccessWriter service. * * @group File */ @@ -25,15 +25,15 @@ class FileSaveHtaccessLoggingTest extends BrowserTestBase { protected $defaultTheme = 'stark'; /** - * Tests file_save_htaccess(). + * Tests the HtaccessWriter service write functionality. */ public function testHtaccessSave(): void { // Prepare test directories. $private = $this->publicFilesDirectory . '/test/private'; - // Verify that file_save_htaccess() returns FALSE if .htaccess cannot be - // written and writes a correctly formatted message to the error log. Set - // $private to TRUE so all possible .htaccess lines are written. + // Verify that HtaccessWriter service returns FALSE if .htaccess cannot be + // written and writes a correctly formatted message to the error log. + // Set $private to TRUE so all possible .htaccess lines are written. /** @var \Drupal\Core\File\HtaccessWriterInterface $htaccess */ $htaccess = \Drupal::service('file.htaccess_writer'); $this->assertFalse($htaccess->write($private, TRUE)); -- GitLab