summaryrefslogtreecommitdiffstats
path: root/fbda16c3e87725ac64418e8578d167320855f20b.patch
blob: 31b93c89818df52b577cfe57d28a29aa5f07d12f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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);
     }