summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2017-02-22 09:59:31 +0100
committerRemi Collet <fedora@famillecollet.com>2017-02-22 09:59:31 +0100
commit3b10ae05c4075e9bff7b2a088eefefa5437eac77 (patch)
treec724625e397ed5b1e8526c8928ed176f4474c570
parentf2d258a1f5e84874d245ac2ce3387c98e42d7227 (diff)
php-zendframework-zend-filter: fix FTBFS again
-rw-r--r--php-zendframework-zend-filter.spec23
1 files changed, 18 insertions, 5 deletions
diff --git a/php-zendframework-zend-filter.spec b/php-zendframework-zend-filter.spec
index 7063b77..b33d08d 100644
--- a/php-zendframework-zend-filter.spec
+++ b/php-zendframework-zend-filter.spec
@@ -18,10 +18,11 @@
%else
%global with_tests 0%{!?_without_tests:1}
%endif
+%global php_version %(php -r 'echo PHP_VERSION;')
Name: php-%{gh_owner}-%{gh_project}
Version: 2.7.1
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -38,6 +39,7 @@ BuildRequires: php(language) >= 5.5
BuildRequires: php-date
BuildRequires: php-iconv
BuildRequires: php-mbstring
+BuildRequires: php-mcrypt
BuildRequires: php-pcre
BuildRequires: php-spl
BuildRequires: php-zip
@@ -130,21 +132,29 @@ Zend\Loader\AutoloaderFactory::factory(array(
require_once '%{php_home}/Zend/autoload.php';
EOF
-# For mcrypt and PHP 7.1
-sed -e '/error_reporting/s/. E_STRICT/- E_DEPRECATED/' -i test/bootstrap.php
-
-# remirepo:11
+# remirepo:18
run=0
ret=0
if which php56; then
php56 %{_bindir}/phpunit || ret=1
run=1
fi
+if which php70; then
+ php70 %{_bindir}/phpunit || ret=1
+ run=1
+fi
if which php71; then
+ # For mcrypt and PHP 7.1
+ sed -e '/error_reporting/s/. E_STRICT/- E_DEPRECATED/' -i test/bootstrap.php
+ sed -e 's/colors=/convertErrorsToExceptions="false" colors=/' phpunit.xml.dist > phpunit.xml
php71 %{_bindir}/phpunit || ret=1
run=1
fi
if [ $run -eq 0 ]; then
+%if "%{php_version}" > "7.1"
+ sed -e '/error_reporting/s/. E_STRICT/- E_DEPRECATED/' -i test/bootstrap.php
+ sed -e 's/colors=/convertErrorsToExceptions="false" colors=/' phpunit.xml.dist > phpunit.xml
+%endif
%{_bindir}/phpunit --verbose
# remirepo:2
fi
@@ -168,6 +178,9 @@ rm -rf %{buildroot}
%changelog
+* Wed Feb 22 2017 Remi Collet <remi@fedoraproject.org> - 2.7.1-3
+- don't convertErrorsToExceptions, fix FTBFS #1424085
+
* Fri Nov 25 2016 Remi Collet <remi@fedoraproject.org> - 2.7.1-2
- fix FTBFS, disable E_DEPRECATED during test suite