Skip to content

Commit 7624b08

Browse files
committed
Config: remove code related to the now unsupported PEAR installation
PR 4 dropped support for installing PHPCS via PEAR. This commit removes code related to a PEAR placeholder called `@data_dir@` as it is not necessary anymore. The original version of this code was added in 980c835#diff-c36ecedca179eab0b3cd245e872a96ab26fa08e567437e167f4eda1779c15c89R1370-R1372. Two methods were added that use the `@data_dir@` placeholder in that commit: `setConfigData()` and `getAllConfigData()`. A subsequent commit changed `setConfigData()` to only use the PEAR path for the config file if the `@data_dir@` placeholder was replaced with something else: 7bb7383. A later commit did the same for `getAllConfigData()` together with other unrelated changes: 9392185. It seems that the PEAR file package.xml was responsible for replacing `@data_dir@` with an actual path: https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/6d22f38f6c846512d321f3d5ac15c8805c694084/package.xml#L293-L295. PR 4 removed the `@data_dir@` related code from `setConfigData()`, but not from `getAllConfigData()`. Closes 1101
1 parent 038b4a1 commit 7624b08

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/Config.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,11 +1704,6 @@ public static function getAllConfigData()
17041704
$configFile = dirname($path).DIRECTORY_SEPARATOR.'CodeSniffer.conf';
17051705
} else {
17061706
$configFile = dirname(__DIR__).DIRECTORY_SEPARATOR.'CodeSniffer.conf';
1707-
if (is_file($configFile) === false
1708-
&& strpos('@data_dir@', '@data_dir') === false
1709-
) {
1710-
$configFile = '@data_dir@/PHP_CodeSniffer/CodeSniffer.conf';
1711-
}
17121707
}
17131708

17141709
if (is_file($configFile) === false) {

0 commit comments

Comments
 (0)