You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
+4-10
Original file line number
Diff line number
Diff line change
@@ -245,17 +245,11 @@ public function configureOptions(OptionsResolver $resolver)
245
245
return'';
246
246
};
247
247
248
-
$placeholder = function (Options$options) {
248
+
$placeholderDefault = function (Options$options) {
249
249
return$options['required'] ? null : '';
250
250
};
251
251
252
-
$choiceListNormalizer = function (Options$options, $choiceList) use ($choiceListFactory) {
253
-
if ($choiceList) {
254
-
@trigger_error('The "choice_list" option is deprecated since version 2.7 and will be removed in 3.0. Use "choice_loader" instead.', E_USER_DEPRECATED);
255
-
256
-
return$choiceList;
257
-
}
258
-
252
+
$choiceListNormalizer = function (Options$options) use ($choiceListFactory) {
259
253
if (null !== $options['choice_loader']) {
260
254
return$choiceListFactory->createListFromLoader(
261
255
$options['choice_loader'],
@@ -316,7 +310,7 @@ public function configureOptions(OptionsResolver $resolver)
316
310
'preferred_choices' => array(),
317
311
'group_by' => null,
318
312
'empty_data' => $emptyData,
319
-
'placeholder' => $placeholder,
313
+
'placeholder' => $placeholderDefault,
320
314
'error_bubbling' => false,
321
315
'compound' => $compound,
322
316
// The view data is always a string, even if the "data" option
@@ -330,7 +324,7 @@ public function configureOptions(OptionsResolver $resolver)
* @expectedExceptionMessage Expected argument of type "string, Symfony\Component\Form\ResolvedFormTypeInterface or Symfony\Component\Form\FormTypeInterface", "stdClass" given
165
+
* @expectedExceptionMessage Expected argument of type "string", "stdClass" given
0 commit comments