diff options
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | composer.json | 6 | ||||
-rw-r--r-- | php-phpmd-PHP-PMD-rpm.patch | 30 | ||||
-rw-r--r-- | php-phpmd-PHP-PMD.spec | 13 |
4 files changed, 23 insertions, 28 deletions
@@ -1,5 +1,7 @@ +clog package-*.xml *.tgz +*.tar.bz2 *.tar.gz *.tar.xz *.tar.xz.asc diff --git a/composer.json b/composer.json index 9fc1437..3d9e796 100644 --- a/composer.json +++ b/composer.json @@ -45,6 +45,8 @@ "squizlabs/php_codesniffer": "^2.0", "mikey179/vfsstream": "^1.6.4", "gregwar/rst": "^1.0", + "ext-simplexml": "*", + "ext-json": "*", "easy-doc/easy-doc": "0.0.0 || ^1.3.2" }, "autoload": { @@ -57,8 +59,8 @@ ], "scripts": { "test": "phpunit", - "cs-check": "phpcs -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 ./src/main/php ./src/test/php", - "cs-fix": "phpcbf -p --standard=PSR2 --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 ./src/main/php ./src/test/php", + "cs-check": "phpcs -p --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1", + "cs-fix": "phpcbf -p --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1", "build-website": "easy-doc build src/site/config.php --verbose" } } diff --git a/php-phpmd-PHP-PMD-rpm.patch b/php-phpmd-PHP-PMD-rpm.patch index 9f02d99..aab3e64 100644 --- a/php-phpmd-PHP-PMD-rpm.patch +++ b/php-phpmd-PHP-PMD-rpm.patch @@ -1,7 +1,7 @@ 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 @@ +--- ./src/bin/phpmd.rpm 2020-09-02 15:30:24.934332729 +0200 ++++ ./src/bin/phpmd 2020-09-02 15:31:27.992170861 +0200 +@@ -19,12 +19,7 @@ use Composer\XdebugHandler\XdebugHandler; use PHPMD\TextUI\Command; @@ -10,35 +10,19 @@ diff -up ./src/bin/phpmd.rpm ./src/bin/phpmd - 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 +--- ./src/main/php/PHPMD/RuleSetFactory.php.rpm 2020-09-02 15:30:24.934332729 +0200 ++++ ./src/main/php/PHPMD/RuleSetFactory.php 2020-09-02 15:36:12.703445806 +0200 +@@ -57,7 +57,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__ . '/../../resources'; + $this->location = __DIR__ . '/../../php-phpmd-PHP-PMD/resources'; } diff --git a/php-phpmd-PHP-PMD.spec b/php-phpmd-PHP-PMD.spec index 91e04cf..3f2f19c 100644 --- a/php-phpmd-PHP-PMD.spec +++ b/php-phpmd-PHP-PMD.spec @@ -7,7 +7,7 @@ # # Please, preserve the changelog entries # -%global gh_commit 714629ed782537f638fe23c4346637659b779a77 +%global gh_commit 2a346575a45a6f00e631f4d7f3f71b6a05e0d46d %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpmd %global gh_project phpmd @@ -18,7 +18,7 @@ %global with_tests 0%{!?_without_tests:1} Name: php-phpmd-PHP-PMD -Version: 2.8.2 +Version: 2.9.0 Release: 1%{?dist} Summary: PHPMD - PHP Mess Detector @@ -39,6 +39,8 @@ BuildArch: noarch # "squizlabs/php_codesniffer": "^2.0", # "mikey179/vfsstream": "^1.6.4", # "gregwar/rst": "^1.0", +# "ext-simplexml": "*", +# "ext-json": "*", # "easy-doc/easy-doc": "0.0.0 || ^1.3.2" BuildRequires: php-composer(phpunit/phpunit) >= 4.8.36 BuildRequires: php(language) >= 5.3.9 @@ -54,6 +56,7 @@ BuildRequires: php-composer(composer/xdebug-handler) >= 1.0 BuildRequires: php-composer(mikey179/vfsstream) < 2 BuildRequires: php-composer(mikey179/vfsstream) >= 1.6.4 %endif +BuildRequires: php-reflection BuildRequires: php-date BuildRequires: php-json BuildRequires: php-libxml @@ -80,7 +83,8 @@ Requires: php-composer(composer/xdebug-handler) < 2 Requires: php-composer(composer/xdebug-handler) >= 1.0 %endif Requires: php-xml -# From phpcompatinfo report for version 2.7.0 +# From phpcompatinfo report for version 2.9.0 +Requires: php-reflection Requires: php-date Requires: php-json Requires: php-libxml @@ -177,6 +181,9 @@ fi %changelog +* Wed Sep 2 2020 Remi Collet <remi@remirepo.net> - 2.9.0-1 +- update to 2.9.0 + * Tue Feb 25 2020 Remi Collet <remi@remirepo.net> - 2.8.2-1 - update to 2.8.2 - raise dependency on pdepend/pdepend version 2.7.1 |