From c11c2957653bdbfd68adc851692d094b43d39221 Mon Sep 17 00:00:00 2001
From: Klaus Purer <klaus.purer@protonmail.ch>
Date: Sat, 7 Dec 2019 17:00:28 +0100
Subject: [PATCH] fix(autoload): Move autoloading to more unique file name to
 workaround PHPCS relative path confusion

---
 .../{autoload.php => coder_unique_autoload_phpcs_bug_2751.php}  | 2 ++
 coder_sniffer/Drupal/ruleset.xml                                | 2 +-
 coder_sniffer/DrupalPractice/ruleset.xml                        | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)
 rename coder_sniffer/Drupal/{autoload.php => coder_unique_autoload_phpcs_bug_2751.php} (83%)

diff --git a/coder_sniffer/Drupal/autoload.php b/coder_sniffer/Drupal/coder_unique_autoload_phpcs_bug_2751.php
similarity index 83%
rename from coder_sniffer/Drupal/autoload.php
rename to coder_sniffer/Drupal/coder_unique_autoload_phpcs_bug_2751.php
index a853b7b8..8d90280a 100644
--- a/coder_sniffer/Drupal/autoload.php
+++ b/coder_sniffer/Drupal/coder_unique_autoload_phpcs_bug_2751.php
@@ -3,6 +3,8 @@
 /**
  * Includes classes which are not detected by PHP_CodeSniffer's autoloader.
  *
+ * This file has a weird name on purpose because of https://github.com/squizlabs/PHP_CodeSniffer/pull/2751
+ *
  * @category PHP
  * @package  PHP_CodeSniffer
  * @link     http://pear.php.net/package/PHP_CodeSniffer
diff --git a/coder_sniffer/Drupal/ruleset.xml b/coder_sniffer/Drupal/ruleset.xml
index c894bcc7..8b7d1582 100644
--- a/coder_sniffer/Drupal/ruleset.xml
+++ b/coder_sniffer/Drupal/ruleset.xml
@@ -5,7 +5,7 @@
  <!-- All Drupal code files must be UTF-8 encoded and we treat them as such. -->
  <arg name="encoding" value="utf-8"/>
 
- <autoload>autoload.php</autoload>
+ <autoload>./coder_unique_autoload_phpcs_bug_2751.php</autoload>
 
  <rule ref="Internal.NoCodeFound">
   <!-- Empty files are fine, might be used for testing. -->
diff --git a/coder_sniffer/DrupalPractice/ruleset.xml b/coder_sniffer/DrupalPractice/ruleset.xml
index 1b7c3bbb..4336bbde 100644
--- a/coder_sniffer/DrupalPractice/ruleset.xml
+++ b/coder_sniffer/DrupalPractice/ruleset.xml
@@ -5,7 +5,7 @@
   <!-- All Drupal code files must be UTF-8 encoded and we treat them as such. -->
   <arg name="encoding" value="utf-8"/>
 
-  <autoload>../Drupal/autoload.php</autoload>
+  <autoload>../Drupal/coder_unique_autoload_phpcs_bug_2751.php</autoload>
 
   <rule ref="Internal.NoCodeFound">
     <!-- Empty files are fine, might be used for testing. -->
-- 
GitLab