summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-10-24 14:51:52 +0200
committerRemi Collet <remi@remirepo.net>2017-10-24 14:51:52 +0200
commit45f68a9fdfee53fa54a7d558b43a867844f67b9e (patch)
tree6c0dd5cc87dd9d7dddcb9fa9c33fc9ed846bdc44
parent121cee76c8ca36707465a33079f7385be651acff (diff)
fix FTBFS from Koschei, add patch for PHP 7.2 from https://github.com/zendframework/zend-form/pull/171
-rw-r--r--fbda16c3e87725ac64418e8578d167320855f20b.patch37
-rw-r--r--php-zendframework-zend-form.spec11
2 files changed, 46 insertions, 2 deletions
diff --git a/fbda16c3e87725ac64418e8578d167320855f20b.patch b/fbda16c3e87725ac64418e8578d167320855f20b.patch
new file mode 100644
index 0000000..31b93c8
--- /dev/null
+++ b/fbda16c3e87725ac64418e8578d167320855f20b.patch
@@ -0,0 +1,37 @@
+From fbda16c3e87725ac64418e8578d167320855f20b Mon Sep 17 00:00:00 2001
+From: Filippo Tessarotto <zoeslam@gmail.com>
+Date: Thu, 22 Jun 2017 14:57:02 +0200
+Subject: [PATCH] Prepare to PHP 7.2
+
+---
+ src/Form.php | 2 +-
+ test/View/Helper/FormSelectTest.php | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/Form.php b/src/Form.php
+index c9c1a43f..937d9265 100644
+--- a/src/Form.php
++++ b/src/Form.php
+@@ -328,7 +328,7 @@ public function setHydrator(HydratorInterface $hydrator)
+ * @param array $values
+ * @return mixed
+ */
+- public function bindValues(array $values = [])
++ public function bindValues(array $values = [], array $validationGroup = null)
+ {
+ if (! is_object($this->object)) {
+ if ($this->baseFieldset === null || $this->baseFieldset->allowValueBinding() == false) {
+diff --git a/test/View/Helper/FormSelectTest.php b/test/View/Helper/FormSelectTest.php
+index 5988ef78..3db96928 100644
+--- a/test/View/Helper/FormSelectTest.php
++++ b/test/View/Helper/FormSelectTest.php
+@@ -216,7 +216,8 @@ public function testScalarOptionValues($options)
+ $element = new SelectElement('foo');
+ $element->setValueOptions($options);
+ $markup = $this->helper->render($element);
+- list($value, $label) = each($options);
++ $value = key($options);
++ $label = current($options);
+ $this->assertRegexp(sprintf('#option .*?value="%s"#', (string) $value), $markup);
+ }
+
diff --git a/php-zendframework-zend-form.spec b/php-zendframework-zend-form.spec
index 8ce3489..29f7acf 100644
--- a/php-zendframework-zend-form.spec
+++ b/php-zendframework-zend-form.spec
@@ -21,7 +21,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 2.10.2
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -30,6 +30,8 @@ URL: https://zendframework.github.io/%{gh_project}/
Source0: %{gh_commit}/%{name}-%{version}-%{gh_short}.tgz
Source1: makesrc.sh
+Patch0: https://github.com/zendframework/zend-form/commit/fbda16c3e87725ac64418e8578d167320855f20b.patch
+
BuildArch: noarch
# Tests
%if %{with_tests}
@@ -140,6 +142,7 @@ Documentation: https://zendframework.github.io/%{gh_project}/
%prep
%setup -q -n %{gh_project}-%{gh_commit}
+%patch0 -p1
mv LICENSE.md LICENSE
@@ -175,7 +178,7 @@ EOF
ret=0
# 7.2: https://github.com/zendframework/zend-form/issues/157
-for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71; do
+for cmdarg in "php %{phpunit}" "php56 %{_bindir}/phpunit" php70 php71 php72; do
if which $cmdarg; then
set $cmdarg
$1 ${2:-%{_bindir}/phpunit6} -d memory_limit=1G || ret=1
@@ -197,6 +200,10 @@ exit $ret
%changelog
+* Tue Oct 24 2017 Remi Collet <remi@remirepo.net> - 2.10.2-3
+- fix FTBFS from Koschei, add patch for PHP 7.2 from
+ https://github.com/zendframework/zend-form/pull/171
+
* Mon May 22 2017 Remi Collet <remi@remirepo.net> - 2.10.2-1
- Update to 2.10.2