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); }