blob: 9f02d99ab5dd551c27b9a403044cef3bdf647ee8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
diff -up ./src/bin/phpmd.rpm ./src/bin/phpmd
--- ./src/bin/phpmd.rpm 2020-01-07 08:21:19.905248145 +0100
+++ ./src/bin/phpmd 2020-01-07 08:21:58.064003463 +0100
@@ -19,23 +19,7 @@
use Composer\XdebugHandler\XdebugHandler;
use PHPMD\TextUI\Command;
-if (file_exists(__DIR__ . '/../../../../autoload.php')) {
- // phpmd is part of a composer installation
- require_once __DIR__ . '/../../../../autoload.php';
-} else {
- require_once __DIR__ . '/../../vendor/autoload.php';
-
- // PEAR installation workaround
- if (strpos('@package_version@', '@package_version') === 0) {
- set_include_path(
- dirname(__FILE__) . '/../main/php' .
- PATH_SEPARATOR .
- dirname(__FILE__) . '/../../vendor/pdepend/pdepend/src/main/php' .
- PATH_SEPARATOR .
- '.'
- );
- }
-}
+require '/usr/share/php/PHPMD/autoload.php';
// Restart if xdebug is loading, unless the environment variable PHPMD_ALLOW_XDEBUG is set.
$xdebug = new XdebugHandler('PHPMD');
diff -up ./src/main/php/PHPMD/RuleSetFactory.php.rpm ./src/main/php/PHPMD/RuleSetFactory.php
--- ./src/main/php/PHPMD/RuleSetFactory.php.rpm 2020-01-07 08:21:19.905248145 +0100
+++ ./src/main/php/PHPMD/RuleSetFactory.php 2020-01-07 08:23:37.062368597 +0100
@@ -58,12 +58,7 @@ class RuleSetFactory
*/
public function __construct()
{
- // PEAR installer workaround
- if (strpos($this->location, '@data_dir') === 0) {
- $this->location = __DIR__ . '/../../resources';
- return;
- }
- $this->location .= '/PHPMD/resources';
+ $this->location = __DIR__ . '/../../php-phpmd-PHP-PMD/resources';
}
/**
|