From 45f68a9fdfee53fa54a7d558b43a867844f67b9e Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 24 Oct 2017 14:51:52 +0200 Subject: fix FTBFS from Koschei, add patch for PHP 7.2 from https://github.com/zendframework/zend-form/pull/171 --- fbda16c3e87725ac64418e8578d167320855f20b.patch | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 fbda16c3e87725ac64418e8578d167320855f20b.patch (limited to 'fbda16c3e87725ac64418e8578d167320855f20b.patch') 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 +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); + } + -- cgit