From 5b70506cf318282378a5b2c750d36df16f7c43e5 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 4 Aug 2017 10:11:22 +0200 Subject: v2.9.2 --- .gitignore | 7 ++++++ php-zendframework-zend-validator-pr190.patch | 28 +++++++++++++++++++++ php-zendframework-zend-validator.spec | 37 +++++++++++++++------------- 3 files changed, 55 insertions(+), 17 deletions(-) create mode 100644 .gitignore create mode 100644 php-zendframework-zend-validator-pr190.patch diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ab5c4f --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/php-zendframework-zend-validator-pr190.patch b/php-zendframework-zend-validator-pr190.patch new file mode 100644 index 0000000..1d46933 --- /dev/null +++ b/php-zendframework-zend-validator-pr190.patch @@ -0,0 +1,28 @@ +From 61969df070bbfa3e889b253738828064b8ff211b Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Fri, 4 Aug 2017 09:59:14 +0200 +Subject: [PATCH] fix for PHP 7.2, count(): Parameter must be an array or an + object that implements Countable + +--- + src/File/Upload.php | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/File/Upload.php b/src/File/Upload.php +index 55025f63..b03dc4a6 100644 +--- a/src/File/Upload.php ++++ b/src/File/Upload.php +@@ -109,10 +109,10 @@ public function getFiles($file = null) + */ + public function setFiles($files = []) + { +- if (count($files) === 0) { +- $this->options['files'] = $_FILES; +- } else { ++ if (is_array($files) && count($files) > 0) { + $this->options['files'] = $files; ++ } else { ++ $this->options['files'] = $_FILES; + } + + if ($this->options['files'] === null) { diff --git a/php-zendframework-zend-validator.spec b/php-zendframework-zend-validator.spec index 4aa6521..2c0d8ab 100644 --- a/php-zendframework-zend-validator.spec +++ b/php-zendframework-zend-validator.spec @@ -7,7 +7,7 @@ # Please, preserve the changelog entries # %global bootstrap 0 -%global gh_commit b71641582297eab52753b72cd4eb45a5ded4485c +%global gh_commit a58dbe8463b93de0d650e296d56cb7da4a129ff3 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner zendframework %global gh_project zend-validator @@ -20,7 +20,7 @@ %endif Name: php-%{gh_owner}-%{gh_project} -Version: 2.9.0 +Version: 2.9.2 Release: 1%{?dist} Summary: Zend Framework %{library} component @@ -30,7 +30,9 @@ URL: https://zendframework.github.io/%{gh_project}/ Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root +# https://github.com/zendframework/zend-validator/pull/190 +Patch0: %{name}-pr190.patch + BuildArch: noarch # Tests %if %{with_tests} @@ -131,6 +133,7 @@ Documentation: https://zendframework.github.io/%{gh_project}/ %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 mv LICENSE.md LICENSE @@ -161,28 +164,20 @@ Zend\Loader\AutoloaderFactory::factory(array( require_once '%{php_home}/Zend/autoload.php'; EOF -# remirepo:7 ret=0 -if which php56; then - php56 %{_bindir}/phpunit || ret=1 -fi -if which php71; then - php71 %{_bindir}/phpunit6 || ret=1 -fi -%{phpunit} --verbose -# remirepo:1 +for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72; do + if which $cmdarg; then + set $cmdarg + $1 ${2:-%{_bindir}/phpunit6} --verbose || ret=1 + fi +done exit $ret %else : Test suite disabled %endif -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -191,6 +186,14 @@ rm -rf %{buildroot} %changelog +* Fri Aug 4 2017 Remi Collet - 2.9.2-1 +- Update to 2.9.2 +- add patch for PHP 7.2 from + https://github.com/zendframework/zend-validator/pull/190 + +* Mon May 22 2017 Remi Collet - 2.9.1-1 +- Update to 2.9.1 + * Fri Mar 17 2017 Remi Collet - 2.9.0-1 - Update to 2.9.0 - raise dependency on PHP 5.6 -- cgit