8000 [Form] Fixed issues mentioned in the PR comments · symfony/symfony@22c8f80 · GitHub
[go: up one dir, main page]

Skip to content

Commit 22c8f80

Browse files
committed
[Form] Fixed issues mentioned in the PR comments
1 parent 3b1b570 commit 22c8f80

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

UPGRADE-2.1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,14 +237,14 @@ UPGRADE FROM 2.0 to 2.1
237237

238238
Before:
239239

240-
public function getParent()
240+
public function getParent(array $options)
241241
{
242242
return 'single_text' === $options['widget'] ? 'text' : 'choice';
243243
}
244244

245245
After:
246246

247-
public function getParent()
247+
public function getParent(array $options)
248248
{
249249
return isset($options['widget']) && 'single_text' === $options['widget'] ? 'text' : 'choice';
250250
}

src/Symfony/Component/Form/Extension/Core/DataTransformer/ChoicesToBooleanArrayTransformer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function reverseTransform($values)
107107
}
108108

109109
if (count($unknown) > 0) {
110-
throw new TransformationFailedException('The choices "' . implode('", "', $unknown) . '" where not found');
110+
throw new TransformationFailedException('The choices "' . implode('", "', $unknown) . '" were not found');
111111
}
112112

113113
return $result;

tests/Symfony/Tests/Component/Form/Extension/Core/Type/DateTimeTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,6 @@ public function testInitializeWithDateTime()
264264
{
265265
// Throws an exception if "data_class" option is not explicitely set
266266
// to null in the type
267-
$form = $this->factory->create('datetime', new \DateTime());
267+
$this->factory->create('datetime', new \DateTime());
268268
}
269269
}

tests/Symfony/Tests/Component/Form/Extension/Core/Type/DateTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,6 @@ public function testInitializeWithDateTime()
536536
{
537537
// Throws an exception if "data_class" option is not explicitely set
538538
// to null in the type
539-
$form = $this->factory->create('date', new \DateTime());
539+
$this->factory->create('date', new \DateTime());
540540
}
541541
}

tests/Symfony/Tests/Component/Form/Extension/Core/Type/TimeTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,6 @@ public function testInitializeWithDateTime()
407407
{
408408
// Throws an exception if "data_class" option is not explicitely set
409409
// to null in the type
410-
$form = $this->factory->create('time', new \DateTime());
410+
$this->factory->create('time', new \DateTime());
411411
}
412412
}

0 commit comments

Comments
 (0)
0