diff options
author | Remi Collet <remi@remirepo.net> | 2022-03-28 12:10:58 +0200 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2022-03-28 12:10:58 +0200 |
commit | af5d097c0664cd2e8bdc903a1c9778df655f2e1e (patch) | |
tree | 67d42e103a561d70d628bef1aa5aef895472d7fa | |
parent | e4e45e1131e3c00e74943a71bb2f9d5fee6eea3b (diff) |
update to 2.12.0
raise dependency on pdepend 2.10.2
allow version 3.0 of the composer/xdebug-handler
-rw-r--r-- | composer.json | 4 | ||||
-rw-r--r-- | php-phpmd-PHP-PMD-autoload.php | 13 | ||||
-rw-r--r-- | php-phpmd-PHP-PMD.spec | 46 |
3 files changed, 34 insertions, 29 deletions
diff --git a/composer.json b/composer.json index 5fe757d..35c3cde 100644 --- a/composer.json +++ b/composer.json @@ -36,9 +36,9 @@ "minimum-stability": "stable", "require": { "php": ">=5.3.9", - "pdepend/pdepend": "^2.10.2", + "pdepend/pdepend": "^2.10.3", "ext-xml": "*", - "composer/xdebug-handler": "^1.0 || ^2.0" + "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0" }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^5.7.27", diff --git a/php-phpmd-PHP-PMD-autoload.php b/php-phpmd-PHP-PMD-autoload.php deleted file mode 100644 index 1f1c8ee..0000000 --- a/php-phpmd-PHP-PMD-autoload.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/* Autoloader for pdepend/pdepend and its dependencies */ - -require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; -\Fedora\Autoloader\Autoload::addPsr4('PHPMD\\', __DIR__); -\Fedora\Autoloader\Dependencies::required([ - '/usr/share/php/PDepend/autoload.php', - [ - '/usr/share/php/Composer/XdebugHandler2/autoload.php', - '/usr/share/php/Composer/XdebugHandler/autoload.php', - ], -]); - diff --git a/php-phpmd-PHP-PMD.spec b/php-phpmd-PHP-PMD.spec index 3a27a54..18c59c7 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 08b60a2eb7e14c23f46ff8865b510ae08b75d0fd +%global gh_commit c0b678ba71902f539c27c14332aa0ddcf14388ec %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.11.1 +Version: 2.12.0 Release: 1%{?dist} Summary: PHPMD - PHP Mess Detector @@ -28,7 +28,6 @@ URL: http://phpmd.org/ Source0: %{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh # Autoloader -Source2: %{name}-autoload.php Patch0: %{name}-rpm.patch BuildArch: noarch @@ -46,14 +45,14 @@ BuildRequires: php-composer(phpunit/phpunit) >= 4.8.36 BuildRequires: php(language) >= 5.3.9 # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -BuildRequires: (php-composer(pdepend/pdepend) >= 2.10.2 with php-composer(pdepend/pdepend) < 3) -BuildRequires: (php-composer(composer/xdebug-handler) >= 1.0 with php-composer(composer/xdebug-handler) < 3) +BuildRequires: (php-composer(pdepend/pdepend) >= 2.10.3 with php-composer(pdepend/pdepend) < 3) +BuildRequires: (php-composer(composer/xdebug-handler) >= 1.0 with php-composer(composer/xdebug-handler) < 4) BuildRequires: (php-composer(mikey179/vfsstream) >= 1.6.8 with php-composer(mikey179/vfsstream) < 2) # remirepo:8 %else BuildRequires: php-composer(pdepend/pdepend) < 3 -BuildRequires: php-composer(pdepend/pdepend) >= 2.10.2 -BuildRequires: php-composer(composer/xdebug-handler) < 3 +BuildRequires: php-composer(pdepend/pdepend) >= 2.10.3 +BuildRequires: php-composer(composer/xdebug-handler) < 4 BuildRequires: php-composer(composer/xdebug-handler) >= 1.0 BuildRequires: php-composer(mikey179/vfsstream) < 2 BuildRequires: php-composer(mikey179/vfsstream) >= 1.6.8 @@ -71,20 +70,20 @@ BuildRequires: php-composer(fedora/autoloader) # From composer.json, "require": { # "php": ">=5.3.9", -# "pdepend/pdepend": "^2.10.2", +# "pdepend/pdepend": "^2.10.3", # "ext-xml": "*", -# "composer/xdebug-handler": "^1.0 || ^2.0" +# "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0" Requires: php(language) >= 5.3.9 Requires: php-xml # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 -Requires: (php-composer(pdepend/pdepend) >= 2.10.2 with php-composer(pdepend/pdepend) < 3) -Requires: (php-composer(composer/xdebug-handler) >= 1.0 with php-composer(composer/xdebug-handler) < 3) +Requires: (php-composer(pdepend/pdepend) >= 2.10.3 with php-composer(pdepend/pdepend) < 3) +Requires: (php-composer(composer/xdebug-handler) >= 1.0 with php-composer(composer/xdebug-handler) < 4) # remirepo:6 %else Requires: php-composer(pdepend/pdepend) < 3 -Requires: php-composer(pdepend/pdepend) >= 2.10.2 -Requires: php-composer(composer/xdebug-handler) < 3 +Requires: php-composer(pdepend/pdepend) >= 2.10.3 +Requires: php-composer(composer/xdebug-handler) < 4 Requires: php-composer(composer/xdebug-handler) >= 1.0 %endif # From phpcompatinfo report for version 2.9.0 @@ -118,7 +117,21 @@ stream measured by PHP Depend. %patch0 -p0 -b .rpm find . -name \*.rpm -delete -cp %{SOURCE2} src/main/php/PHPMD/autoload.php +cat << 'EOF' | tee src/main/php/PHPMD/autoload.php +<?php +/* Autoloader for pdepend/pdepend and its dependencies */ + +require_once '/usr/share/php/Fedora/Autoloader/autoload.php'; +\Fedora\Autoloader\Autoload::addPsr4('PHPMD\\', __DIR__); +\Fedora\Autoloader\Dependencies::required([ + '/usr/share/php/PDepend/autoload.php', + [ + '/usr/share/php/Composer/XdebugHandler3/autoload.php', + '/usr/share/php/Composer/XdebugHandler2/autoload.php', + '/usr/share/php/Composer/XdebugHandler/autoload.php', + ], +]); +EOF find src/main/php -name \*php -exec sed -e 's:@package_version@:%{version}:' -i {} \; find src/test -type f -exec sed -e 's:@package_version@:%{version}:' -i {} \; @@ -186,6 +199,11 @@ fi %changelog +* Mon Mar 28 2022 Remi Collet <remi@remirepo.net> - 2.12.0-1 +- update to 2.12.0 +- raise dependency on pdepend 2.10.2 +- allow version 3.0 of the composer/xdebug-handler + * Mon Dec 20 2021 Remi Collet <remi@remirepo.net> - 2.11.1-1 - update to 2.11.1 |