8000 fixed tests · symfony/symfony@9a06630 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9a06630

Browse files
committed
fixed tests
1 parent 3a1811e commit 9a06630

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ public function configureOptions(OptionsResolver $resolver)
339339
};
340340

341341
$placeholderNormalizer = function (Options $options, $placeholder) use ($that) {
342-
if (self::DEPRECATED_EMPTY_VALUE !== $options['empty_value']) {
342+
if ($that::DEPRECATED_EMPTY_VALUE !== $options['empty_value']) {
343343
@trigger_error(sprintf('The form option "empty_value" of the "%s" form type (%s) is deprecated since version 2.6 and will be removed in 3.0. Use "placeholder" instead.', $that->getName(), __CLASS__), E_USER_DEPRECATED);
344344

345345
if (null === $placeholder || '' === $placeholder) {

src/Symfony/Component/Form/Extension/Core/Type/DateType.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ class DateType extends AbstractType
3030

3131
const HTML5_FORMAT = 'yyyy-MM-dd';
3232

33-
// To be removed in 3.0
34-
const DEPRECATED_EMPTY_VALUE = '__deprecated_empty_value__';
35-
3633
private static $acceptedFormats = array(
3734
\IntlDateFormatter::FULL,
3835
\IntlDateFormatter::LONG,
@@ -186,7 +183,7 @@ public function configureOptions(OptionsResolver $resolver)
186183
};
187184

188185
$placeholderNormalizer = function (Options $options, $placeholder) use ($placeholderDefault) {
189-
if (self::DEPRECATED_EMPTY_VALUE !== $options['empty_value']) {
186+
if (ChoiceType::DEPRECATED_EMPTY_VALUE !== $options['empty_value']) {
190187
@trigger_error('The form option "empty_value" is deprecated since version 2.6 and will be removed in 3.0. Use "placeholder" instead.', E_USER_DEPRECATED);
191188

192189
$placeholder = $options['empty_value'];
@@ -221,7 +218,7 @@ public function configureOptions(OptionsResolver $resolver)
221218
'format' => $format,
222219
'model_timezone' => null,
223220
'view_timezone' => null,
224-
'empty_value' => self::DEPRECATED_EMPTY_VALUE,
221+
'empty_value' => ChoiceType::DEPRECATED_EMPTY_VALUE,
225222
'placeholder' => $placeholder,
226223
'html5' => true,
227224
// Don't modify \DateTime classes by reference, we treat

src/Symfony/Component/Form/Extension/Core/Type/TimeType.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525

2626
class TimeType extends AbstractType
2727
{
28-
// To be removed in 3.0
29-
const DEPRECATED_EMPTY_VALUE = '__deprecated_empty_value__';
30-
3128
/**
3229
* {@inheritdoc}
3330
*/
@@ -174,7 +171,7 @@ public function configureOptions(OptionsResolver $resolver)
174171
};
175172

176173
$placeholderNormalizer = function (Options $options, $placeholder) use ($placeholderDefault) {
177-
if (self::DEPRECATED_EMPTY_VALUE !== $options['empty_value']) {
174+
if (ChoiceType::DEPRECATED_EMPTY_VALUE !== $options['empty_value']) {
178175
@trigger_error('The form option "empty_value" is deprecated since version 2.6 and will be removed in 3.0. Use "placeholder" instead.', E_USER_DEPRECATED);
179176

180177
$placeholder = $options['empty_value'];
@@ -206,7 +203,7 @@ public function configureOptions(OptionsResolver $resolver)
206203
'with_seconds' => false,
207204
'model_timezone' => null,
208205
'view_timezone' => null,
209-
'empty_value' => self::DEPRECATED_EMPTY_VALUE,
206+
'empty_value' => ChoiceType::DEPRECATED_EMPTY_VALUE,
210207
'placeholder' => $placeholder,
211208
'html5' => true,
212209
// Don't modify \DateTime classes by reference, we treat

0 commit comments

Comments
 (0)
0