summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-01-07 08:26:52 +0100
committerRemi Collet <remi@remirepo.net>2020-01-07 08:26:52 +0100
commit630da9643ad6b55e1e90d474c877a3a50656b373 (patch)
treefa676dd72cc4e925317154cd8acf2acbe152c733
parentf0be2b7c58cde65f582dbb10d3e26b535f68b781 (diff)
update to 2.8.1
raise dependency on pdepend/pdepend version 2.6 add dependency on composer/xdebug-handler
-rw-r--r--composer.json11
-rw-r--r--php-phpmd-PHP-PMD-autoload.php1
-rw-r--r--php-phpmd-PHP-PMD-rpm.patch26
-rw-r--r--php-phpmd-PHP-PMD.spec47
4 files changed, 52 insertions, 33 deletions
diff --git a/composer.json b/composer.json
index 12b293c..1383bad 100644
--- a/composer.json
+++ b/composer.json
@@ -36,14 +36,16 @@
"minimum-stability": "stable",
"require": {
"php": ">=5.3.9",
- "pdepend/pdepend": "^2.5",
- "ext-xml": "*"
+ "pdepend/pdepend": "^2.6",
+ "ext-xml": "*",
+ "composer/xdebug-handler": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36 || ^5.7.27",
"squizlabs/php_codesniffer": "^2.0",
"mikey179/vfsstream": "^1.6.4",
- "gregwar/rst": "^1.0"
+ "gregwar/rst": "^1.0",
+ "easy-doc/easy-doc": "0.0.0 || ^1.3.2"
},
"autoload": {
"psr-0": {
@@ -56,6 +58,7 @@
"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-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",
+ "build-website": "easy-doc build src/site/config.php --verbose"
}
}
diff --git a/php-phpmd-PHP-PMD-autoload.php b/php-phpmd-PHP-PMD-autoload.php
index 502c4e2..5f459ef 100644
--- a/php-phpmd-PHP-PMD-autoload.php
+++ b/php-phpmd-PHP-PMD-autoload.php
@@ -5,5 +5,6 @@ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('PHPMD\\', __DIR__);
\Fedora\Autoloader\Dependencies::required(array(
'/usr/share/php/PDepend/autoload.php',
+ '/usr/share/php/Composer/XdebugHandler/autoload.php',
));
diff --git a/php-phpmd-PHP-PMD-rpm.patch b/php-phpmd-PHP-PMD-rpm.patch
index 7006ca4..9f02d99 100644
--- a/php-phpmd-PHP-PMD-rpm.patch
+++ b/php-phpmd-PHP-PMD-rpm.patch
@@ -1,8 +1,8 @@
-diff -up src/bin/phpmd.rpm src/bin/phpmd
---- src/bin/phpmd.rpm 2015-09-22 09:01:46.283971581 +0200
-+++ src/bin/phpmd 2015-09-22 09:02:14.155400697 +0200
-@@ -3,23 +3,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 @@
+ use Composer\XdebugHandler\XdebugHandler;
use PHPMD\TextUI\Command;
-if (file_exists(__DIR__ . '/../../../../autoload.php')) {
@@ -24,21 +24,21 @@ diff -up src/bin/phpmd.rpm src/bin/phpmd
-}
+require '/usr/share/php/PHPMD/autoload.php';
- if (!ini_get('date.timezone')) {
- date_default_timezone_set('UTC');
-diff -up src/main/php/PHPMD/RuleSetFactory.php.rpm src/main/php/PHPMD/RuleSetFactory.php
---- src/main/php/PHPMD/RuleSetFactory.php.rpm 2015-09-22 08:56:25.000000000 +0200
-+++ src/main/php/PHPMD/RuleSetFactory.php 2015-09-22 09:01:46.283971581 +0200
-@@ -79,12 +79,7 @@ class RuleSetFactory
+ // 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';
-- } else {
-- $this->location .= '/PHPMD/resources';
+- return;
- }
+- $this->location .= '/PHPMD/resources';
+ $this->location = __DIR__ . '/../../php-phpmd-PHP-PMD/resources';
}
diff --git a/php-phpmd-PHP-PMD.spec b/php-phpmd-PHP-PMD.spec
index e327918..133119d 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 a05a999c644f4bc9a204846017db7bb7809fbe4c
+%global gh_commit 5664b95d484797582f5af9536238deb9ecde58a1
%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.7.0
+Version: 2.8.1
Release: 1%{?dist}
Summary: PHPMD - PHP Mess Detector
@@ -38,17 +38,21 @@ BuildArch: noarch
# "phpunit/phpunit": "^4.8.36 || ^5.7.27",
# "squizlabs/php_codesniffer": "^2.0",
# "mikey179/vfsstream": "^1.6.4",
-# "gregwar/rst": "^1.0"
+# "gregwar/rst": "^1.0",
+# "easy-doc/easy-doc": "0.0.0 || ^1.3.2"
BuildRequires: php-composer(phpunit/phpunit) >= 4.8.36
BuildRequires: php(language) >= 5.3.9
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-BuildRequires: (php-composer(pdepend/pdepend) >= 2.5 with php-composer(pdepend/pdepend) < 3)
-BuildRequires: (php-composer(mikey179/vfsstream) >= 1.6.4 with php-composer(mikey179/vfsstream) < 2)
+BuildRequires: (php-composer(pdepend/pdepend) >= 2.6 with php-composer(pdepend/pdepend) < 3)
+BuildRequires: (php-composer(composer/xdebug-handler) >= 1.0 with php-composer(composer/xdebug-handler) < 2)
+BuildRequires: (php-composer(mikey179/vfsstream) >= 1.6.4 with php-composer(mikey179/vfsstream) < 2)
%else
-BuildRequires: php-composer(pdepend/pdepend) < 3
-BuildRequires: php-composer(pdepend/pdepend) >= 2.5
-BuildRequires: php-composer(mikey179/vfsstream) < 2
-BuildRequires: php-composer(mikey179/vfsstream) >= 1.6.4
+BuildRequires: php-composer(pdepend/pdepend) < 3
+BuildRequires: php-composer(pdepend/pdepend) >= 2.5
+BuildRequires: php-composer(composer/xdebug-handler) < 2
+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-date
BuildRequires: php-json
@@ -61,15 +65,19 @@ BuildRequires: php-composer(fedora/autoloader)
%endif
# From composer.json, "require": {
-# "php": ">=5.3.9",
-# "pdepend/pdepend": "^2.5",
-# "ext-xml": "*"
+# "php": ">=5.3.9",
+# "pdepend/pdepend": "^2.6",
+# "ext-xml": "*",
+# "composer/xdebug-handler": "^1.0"
Requires: php(language) >= 5.3.9
%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
-Requires: (php-composer(pdepend/pdepend) >= 2.5 with php-composer(pdepend/pdepend) < 3)
+Requires: (php-composer(pdepend/pdepend) >= 2.6 with php-composer(pdepend/pdepend) < 3)
+Requires: (php-composer(composer/xdebug-handler) >= 1.0 with php-composer(composer/xdebug-handler) < 2)
%else
-Requires: php-composer(pdepend/pdepend) < 3
-Requires: php-composer(pdepend/pdepend) >= 2.5
+Requires: php-composer(pdepend/pdepend) < 3
+Requires: php-composer(pdepend/pdepend) >= 2.6
+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
@@ -99,7 +107,9 @@ stream measured by PHP Depend.
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-%patch0 -p0
+%patch0 -p0 -b .rpm
+find . -name \*.rpm -delete
+
cp %{SOURCE2} src/main/php/PHPMD/autoload.php
find src/main/php -name \*php -exec sed -e 's:@package_version@:%{version}:' -i {} \;
@@ -166,6 +176,11 @@ fi
%changelog
+* Tue Jan 7 2020 Remi Collet <remi@remirepo.net> - 2.8.1-1
+- update to 2.8.1
+- raise dependency on pdepend/pdepend version 2.6
+- add dependency on composer/xdebug-handler
+
* Fri Aug 2 2019 Remi Collet <remi@remirepo.net> - 2.7.0-1
- update to 2.7.0