Skip to content

Instantly share code, notes, and snippets.

@fiko
Last active July 20, 2022 08:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fiko/bdec71978b458cc527df03d26a695b6c to your computer and use it in GitHub Desktop.
Save fiko/bdec71978b458cc527df03d26a695b6c to your computer and use it in GitHub Desktop.
ERROR: Referenced sniff "PHPCompatibility.FunctionUse.RemovedFunctions" does not exist
diff --git a/vendor/squizlabs/php_codesniffer/src/Util/Standards.php b/vendor/squizlabs/php_codesniffer/src/Util/Standards.php
--- a/vendor/squizlabs/php_codesniffer/src/Util/Standards.php
+++ b/vendor/squizlabs/php_codesniffer/src/Util/Standards.php
@@ -33,6 +33,8 @@
}
$resolvedInstalledPaths = [];
+ $vendorDir = dirname(dirname(dirname(dirname(__DIR__))));
+ $phpCompatibilityDir = $vendorDir . '/phpcompatibility/php-compatibility/PHPCompatibility';
+ if (is_dir($phpCompatibilityDir)) {
+ $resolvedInstalledPaths[] = $phpCompatibilityDir;
+ }
+
foreach ($installedPaths as $installedPath) {
if (substr($installedPath, 0, 1) === '.') {
$installedPath = Common::realPath(__DIR__.$ds.'..'.$ds.'..'.$ds.$installedPath);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment