Skip to content

Commit 2f0f4e7

Browse files
committed
fixed some deprecation messages
1 parent 423c6b0 commit 2f0f4e7

File tree

12 files changed

+18
-18
lines changed

12 files changed

+18
-18
lines changed

ChoiceList/ArrayKeyChoiceList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\Form\ChoiceList;
1313

14-
@trigger_error('The '.__NAMESPACE__.'\ArrayKeyChoiceList class is deprecated since version 2.8 and will be removed in 3.0. Use '.__NAMESPACE__.'\ArrayChoiceList instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\ArrayKeyChoiceList class is deprecated since Symfony 2.8 and will be removed in 3.0. Use '.__NAMESPACE__.'\ArrayChoiceList instead.', E_USER_DEPRECATED);
1515

1616
use Symfony\Component\Form\Exception\InvalidArgumentException;
1717

Extension/Core/Type/ChoiceType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ public function configureOptions(OptionsResolver $resolver)
354354

355355
$choicesAsValuesNormalizer = function (Options $options, $choicesAsValues) use ($that) {
356356
if (true !== $choicesAsValues && null === $options['choice_loader']) {
357-
@trigger_error(sprintf('The value "false" for the "choices_as_values" option of the "%s" form type (%s) is deprecated since version 2.8 and will not be supported anymore in 3.0. Set this option to "true" and flip the contents of the "choices" option instead.', $that->getName(), __CLASS__), E_USER_DEPRECATED);
357+
@trigger_error(sprintf('The value "false" for the "choices_as_values" option of the "%s" form type (%s) is deprecated since Symfony 2.8 and will not be supported anymore in 3.0. Set this option to "true" and flip the contents of the "choices" option instead.', $that->getName(), __CLASS__), E_USER_DEPRECATED);
358358
}
359359

360360
return $choicesAsValues;

Extension/Core/Type/CollectionType.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ public function configureOptions(OptionsResolver $resolver)
8989
};
9090
$optionsNormalizer = function (Options $options, $value) use ($entryOptionsNormalizer) {
9191
if (null !== $value) {
92-
@trigger_error('The form option "options" is deprecated since version 2.8 and will be removed in 3.0. Use "entry_options" instead.', E_USER_DEPRECATED);
92+
@trigger_error('The form option "options" is deprecated since Symfony 2.8 and will be removed in 3.0. Use "entry_options" instead.', E_USER_DEPRECATED);
9393
}
9494

9595
return $entryOptionsNormalizer($options, $value);
9696
};
9797
$typeNormalizer = function (Options $options, $value) {
9898
if (null !== $value) {
99-
@trigger_error('The form option "type" is deprecated since version 2.8 and will be removed in 3.0. Use "entry_type" instead.', E_USER_DEPRECATED);
99+
@trigger_error('The form option "type" is deprecated since Symfony 2.8 and will be removed in 3.0. Use "entry_type" instead.', E_USER_DEPRECATED);
100100
}
101101

102102
return $value;

Extension/Core/Type/FormType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ public function configureOptions(OptionsResolver $resolver)
199199

200200
$readOnlyNormalizer = function (Options $options, $readOnly) {
201201
if (null !== $readOnly) {
202-
@trigger_error('The form option "read_only" is deprecated since version 2.8 and will be removed in 3.0. Use "attr[\'readonly\']" instead.', E_USER_DEPRECATED);
202+
@trigger_error('The form option "read_only" is deprecated since Symfony 2.8 and will be removed in 3.0. Use "attr[\'readonly\']" instead.', E_USER_DEPRECATED);
203203

204204
return $readOnly;
205205
}

Extension/Core/Type/TimezoneType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function getBlockPrefix()
7373
*/
7474
public static function getTimezones()
7575
{
76-
@trigger_error('The TimezoneType::getTimezones() method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
76+
@trigger_error('The TimezoneType::getTimezones() method is deprecated since Symfony 2.8 and will be removed in 3.0.', E_USER_DEPRECATED);
7777

7878
if (null === static::$timezones) {
7979
static::$timezones = array();

Extension/Csrf/Type/FormTypeCsrfExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function configureOptions(OptionsResolver $resolver)
121121
// BC clause for the "intention" option
122122
$csrfTokenId = function (Options $options) {
123123
if (null !== $options['intention']) {
124-
@trigger_error('The form option "intention" is deprecated since version 2.8 and will be removed in 3.0. Use "csrf_token_id" instead.', E_USER_DEPRECATED);
124+
@trigger_error('The form option "intention" is deprecated since Symfony 2.8 and will be removed in 3.0. Use "csrf_token_id" instead.', E_USER_DEPRECATED);
125125
}
126126

127127
return $options['intention'];
@@ -141,7 +141,7 @@ public function configureOptions(OptionsResolver $resolver)
141141
$defaultTokenManager = $this->defaultTokenManager;
142142
$csrfProviderNormalizer = function (Options $options, $csrfProvider) use ($defaultTokenManager) {
143143
if (null !== $csrfProvider) {
144-
@trigger_error('The form option "csrf_provider" is deprecated since version 2.8 and will be removed in 3.0. Use "csrf_token_manager" instead.', E_USER_DEPRECATED);
144+
@trigger_error('The form option "csrf_provider" is deprecated since Symfony 2.8 and will be removed in 3.0. Use "csrf_token_manager" instead.', E_USER_DEPRECATED);
145145

146146
return $csrfProvider;
147147
}

Extension/Validator/EventListener/ValidationListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function __construct($validator, ViolationMapperInterface $violationMappe
4747
}
4848

4949
if (!$validator instanceof ValidatorInterface) {
50-
@trigger_error('Passing an instance of Symfony\Component\Validator\ValidatorInterface as argument to the '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use an implementation of Symfony\Component\Validator\Validator\ValidatorInterface instead', E_USER_DEPRECATED);
50+
@trigger_error('Passing an instance of Symfony\Component\Validator\ValidatorInterface as argument to the '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use an implementation of Symfony\Component\Validator\Validator\ValidatorInterface instead', E_USER_DEPRECATED);
5151
}
5252

5353
$this->validator = $validator;

Extension/Validator/Type/FormTypeValidatorExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function configureOptions(OptionsResolver $resolver)
6262

6363
$cascadeValidationNormalizer = function (Options $options, $cascadeValidation) {
6464
if (null !== $cascadeValidation) {
65-
@trigger_error('The "cascade_validation" option is deprecated since version 2.8 and will be removed in 3.0. Use "constraints" with a Valid constraint instead.', E_USER_DEPRECATED);
65+
@trigger_error('The "cascade_validation" option is deprecated since Symfony 2.8 and will be removed in 3.0. Use "constraints" with a Valid constraint instead.', E_USER_DEPRECATED);
6666
}
6767

6868
return null === $cascadeValidation ? false : $cascadeValidation;

Extension/Validator/ValidatorExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function __construct($validator)
4040
$metadata = $validator->getMetadataFor('Symfony\Component\Form\Form');
4141
// 2.4 API
4242
} elseif ($validator instanceof LegacyValidatorInterface) {
43-
@trigger_error('Passing an instance of Symfony\Component\Validator\ValidatorInterface as argument to the '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use an implementation of Symfony\Component\Validator\Validator\ValidatorInterface instead', E_USER_DEPRECATED);
43+
@trigger_error('Passing an instance of Symfony\Component\Validator\ValidatorInterface as argument to the '.__METHOD__.' method is deprecated since Symfony 2.8 and will be removed in 3.0. Use an implementation of Symfony\Component\Validator\Validator\ValidatorInterface instead', E_USER_DEPRECATED);
4444
$metadata = $validator->getMetadataFactory()->getMetadataFor('Symfony\Component\Form\Form');
4545
} else {
4646
throw new UnexpectedTypeException($validator, 'Symfony\Component\Validator\Validator\ValidatorInterface or Symfony\Component\Validator\ValidatorInterface');

FormFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ public function createNamedBuilder($name, $type = 'Symfony\Component\Form\Extens
9494
}
9595

9696
if ($type instanceof FormTypeInterface) {
97-
@trigger_error(sprintf('Passing type instances to FormBuilder::add(), Form::add() or the FormFactory is deprecated since version 2.8 and will not be supported in 3.0. Use the fully-qualified type class name instead (%s).', get_class($type)), E_USER_DEPRECATED);
97+
@trigger_error(sprintf('Passing type instances to FormBuilder::add(), Form::add() or the FormFactory is deprecated since Symfony 2.8 and will not be supported in 3.0. Use the fully-qualified type class name instead (%s).', get_class($type)), E_USER_DEPRECATED);
9898
$type = $this->resolveType($type);
9999
} elseif (is_string($type)) {
100100
$type = $this->registry->getType($type);
101101
} elseif ($type instanceof ResolvedFormTypeInterface) {
102-
@trigger_error(sprintf('Passing type instances to FormBuilder::add(), Form::add() or the FormFactory is deprecated since version 2.8 and will not be supported in 3.0. Use the fully-qualified type class name instead (%s).', get_class($type->getInnerType())), E_USER_DEPRECATED);
102+
@trigger_error(sprintf('Passing type instances to FormBuilder::add(), Form::add() or the FormFactory is deprecated since Symfony 2.8 and will not be supported in 3.0. Use the fully-qualified type class name instead (%s).', get_class($type->getInnerType())), E_USER_DEPRECATED);
103103
} else {
104104
throw new UnexpectedTypeException($type, 'string, Symfony\Component\Form\ResolvedFormTypeInterface or Symfony\Component\Form\FormTypeInterface');
105105
}

0 commit comments

Comments
 (0)