8000 [Form] Extracted FormConfig class to simplify the Form's constructor · symfony/symfony@2996340 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2996340

Browse files
committed
[Form] Extracted FormConfig class to simplify the Form's constructor
1 parent e4e3ce6 commit 2996340

File tree

9 files changed

+1117
-837
lines changed

9 files changed

+1117
-837
lines changed

src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\Form\Extension\Core\ChoiceList;
1313

14-
use Symfony\Component\Form\Form;
14+
use Symfony\Component\Form\FormConfig;
1515
use Symfony\Component\Form\Exception\UnexpectedTypeException;
1616
use Symfony\Component\Form\Exception\InvalidConfigurationException;
1717
use Symfony\Component\Form\Extension\Core\View\ChoiceView;
@@ -335,7 +335,7 @@ protected function addChoice(&$bucketForPreferred, &$bucketForRemaining, $choice
335335
{
336336
$index = $this->createIndex($choice);
337337

338-
if ('' === $index || null === $index || !Form::isValidName((string)$index)) {
338+
if ('' === $index || null === $index || !FormConfig::isValidName((string)$index)) {
339339
throw new InvalidConfigurationException('The index "' . $index . '" created by the choice list is invalid. It should be a valid, non-empty Form name.');
340340
}
341341

0 commit comments

Comments
 (0)
0