summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--303.patch23
-rw-r--r--php-pdepend-PHP-Depend.spec12
2 files changed, 32 insertions, 3 deletions
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 <remi@remirepo.net>
+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 07ebec8..7b668de 100644
--- a/php-pdepend-PHP-Depend.spec
+++ b/php-pdepend-PHP-Depend.spec
@@ -19,7 +19,7 @@
Name: php-pdepend-PHP-Depend
Version: 2.5.0
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: PHP_Depend design quality metrics for PHP package
Group: Development/Libraries
@@ -32,6 +32,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": {
@@ -107,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 {} \;
@@ -139,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
@@ -169,6 +172,9 @@ fi
%changelog
+* Tue May 16 2017 Remi Collet <remi@fedoraproject.org> - 2.5.0-4
+- open https://github.com/pdepend/pdepend/pull/303 - fix for 7.2
+
* Wed May 10 2017 Remi Collet <remi@fedoraproject.org> - 2.5.0-3
- adapt for Symfony v3