From: William Desportes <williamdes@wdes.fr>
Date: Sun, 15 Dec 2024 23:37:51 +0100
Subject: Disable all the file generation or deletion in ServerFilesGenerator
 and CheckDirectDependencyUse command

Origin: vendor
Forwarded: not-needed
---
 plugins/Installation/ServerFilesGenerator.php            | 12 ++++++++++++
 plugins/TestRunner/Commands/CheckDirectDependencyUse.php |  5 +++++
 2 files changed, 17 insertions(+)

diff --git a/plugins/Installation/ServerFilesGenerator.php b/plugins/Installation/ServerFilesGenerator.php
index 8889cd0..f127989 100644
--- a/plugins/Installation/ServerFilesGenerator.php
+++ b/plugins/Installation/ServerFilesGenerator.php
@@ -17,6 +17,8 @@ class ServerFilesGenerator
 {
     public static function createFilesForSecurity()
     {
+        return;
+
         self::createHtAccessFiles();
         self::createWebConfigFiles();
         self::createWebRootFiles();
@@ -28,6 +30,8 @@ class ServerFilesGenerator
      */
     public static function createHtAccessFiles()
     {
+        return;
+
         $denyAll = self::getDenyAllHtaccessContent();
         $allow = self::getAllowHtaccessContent();
 
@@ -111,6 +115,8 @@ Header set Cache-Control \"Cache-Control: private, no-cache, no-store\"
      */
     protected static function createHtAccess($path, $overwrite, $content)
     {
+        return;
+
         $file = $path . '/.htaccess';
 
         $content = "# This file is auto generated by Matomo, do not edit directly\n# Please report any issue or improvement directly to the Matomo team.\n\n" . $content;
@@ -212,6 +218,8 @@ Header set Cache-Control \"Cache-Control: private, no-cache, no-store\"
 
     public static function deleteWebConfigFiles()
     {
+        return;
+
         $path = PIWIK_INCLUDE_PATH;
         @unlink($path . '/web.config');
         @unlink($path . '/libs/web.config');
@@ -230,6 +238,8 @@ Header set Cache-Control \"Cache-Control: private, no-cache, no-store\"
      */
     public static function createWebRootFiles()
     {
+        return;
+
         $filesToCreate = array(
             '/robots.txt',
             '/favicon.ico',
@@ -326,6 +336,8 @@ HTACCESS_ALLOW;
      */
     public static function deleteHtAccessFiles()
     {
+        return;
+
         $files = Filesystem::globr(PIWIK_INCLUDE_PATH, ".htaccess");
 
         // only delete files that match the list of directories we create htaccess files in
diff --git a/plugins/TestRunner/Commands/CheckDirectDependencyUse.php b/plugins/TestRunner/Commands/CheckDirectDependencyUse.php
index 00582cd..f81aa86 100644
--- a/plugins/TestRunner/Commands/CheckDirectDependencyUse.php
+++ b/plugins/TestRunner/Commands/CheckDirectDependencyUse.php
@@ -21,6 +21,11 @@ class CheckDirectDependencyUse extends ConsoleCommand
 
     protected function doExecute(): int
     {
+        $output = $this->getOutput();
+        $output->writeln("<error>Unavailable on Debian systems, the dependencies are installed by packages.</error>");
+
+        return self::FAILURE;
+
         [$psr4NamespacePrefixes, $psr0Prefixes] = $this->getCoreDependencyNamespacePrefixes();
 
         $input = $this->getInput();
