From 6bcd0f9e1e5160acb9353ca043c3779f4565a0b6 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Nov 01 2017 10:29:03 +0000 Subject: fix FTBFS from Koschei, add patch for PHP 7.2 from https://github.com/pdepend/pdepend/pull/303 provide pdepend --- diff --git a/303.patch b/303.patch new file mode 100644 index 0000000..a3e0687 --- /dev/null +++ b/303.patch @@ -0,0 +1,23 @@ +From c1b369a621c826c10dbad4c60e67fbd07e12cccd Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Tue, 16 May 2017 11:57:30 +0200 +Subject: [PATCH] fix count(): Parameter must be an array or an object that + implements Countable (php 7.2) + +--- + src/main/php/PDepend/Metrics/Analyzer/InheritanceAnalyzer.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/main/php/PDepend/Metrics/Analyzer/InheritanceAnalyzer.php b/src/main/php/PDepend/Metrics/Analyzer/InheritanceAnalyzer.php +index 03c0d6f..7b2aa8b 100644 +--- a/src/main/php/PDepend/Metrics/Analyzer/InheritanceAnalyzer.php ++++ b/src/main/php/PDepend/Metrics/Analyzer/InheritanceAnalyzer.php +@@ -86,7 +86,7 @@ class InheritanceAnalyzer extends AbstractAnalyzer implements + * + * @var array(integer) + */ +- private $rootClasses = null; ++ private $rootClasses = array(); + + /** + * The maximum depth of inheritance tree value within the analyzed source code. diff --git a/php-pdepend-PHP-Depend.spec b/php-pdepend-PHP-Depend.spec index dace950..0911a20 100644 --- a/php-pdepend-PHP-Depend.spec +++ b/php-pdepend-PHP-Depend.spec @@ -18,7 +18,7 @@ Name: php-pdepend-PHP-Depend Version: 2.5.0 -Release: 4%{?dist} +Release: 5%{?dist} Summary: PHP_Depend design quality metrics for PHP package Group: Development/Libraries @@ -31,6 +31,9 @@ Source1: makesrc.sh Source2: %{name}-autoload.php Patch0: %{name}-rpm.patch +# https://github.com/pdepend/pdepend/pull/303 +Patch1: 303.patch + BuildArch: noarch %if %{with_tests} # From composer/json, "require-dev": { @@ -94,6 +97,7 @@ Obsoletes: php-channel-pdepend <= 1.3 Provides: php-pear(%{pear_channel}/%{pear_name}) = %{version} Provides: php-composer(%{gh_owner}/%{gh_project}) = %{version} +Provides: pdepend = %{version} %description @@ -106,6 +110,7 @@ reusability and maintainability. %setup -q -n %{gh_project}-%{gh_commit} %patch0 -p0 +%patch1 -p1 cp %{SOURCE2} src/main/php/PDepend/autoload.php find src/main/php -name \*php -exec sed -e 's:@package_version@:%{version}:' -i {} \; @@ -138,8 +143,7 @@ require '%{buildroot}%{php_home}/autoload.php'; EOF ret=0 -# PHP 7.2: count(): Parameter must be an array or an object that implements Countable -for cmd in php php56 php70 php71; do +for cmd in php php56 php70 php71 php72; do if which $cmd; then $cmd %{_bindir}/phpunit -d memory_limit=1G --verbose || ret=1 fi @@ -168,6 +172,11 @@ fi %changelog +* Wed Nov 1 2017 Remi Collet - 2.5.0-5 +- fix FTBFS from Koschei, add patch for PHP 7.2 from + https://github.com/pdepend/pdepend/pull/303 +- provide pdepend + * Thu Jul 27 2017 Fedora Release Engineering - 2.5.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild