Skip to content

Commit ba48cc3

Browse files
Merge branch '3.4' into 4.4
* 3.4: Enable "native_constant_invocation" CS rule Make AbstractPhpFileCacheWarmer public
2 parents cee2f13 + 451ce73 commit ba48cc3

30 files changed

+75
-75
lines changed

ConstraintViolation.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ class ConstraintViolation implements ConstraintViolationInterface
5252
public function __construct($message, ?string $messageTemplate, array $parameters, $root, ?string $propertyPath, $invalidValue, int $plural = null, $code = null, Constraint $constraint = null, $cause = null)
5353
{
5454
if (null === $message) {
55-
@trigger_error(sprintf('Passing a null message when instantiating a "%s" is deprecated since Symfony 4.4.', __CLASS__), E_USER_DEPRECATED);
55+
@trigger_error(sprintf('Passing a null message when instantiating a "%s" is deprecated since Symfony 4.4.', __CLASS__), \E_USER_DEPRECATED);
5656
$message = '';
5757
}
5858

5959
if (null !== $code && !\is_string($code)) {
60-
@trigger_error(sprintf('Not using a string as the error code in %s() is deprecated since Symfony 4.4. A type-hint will be added in 5.0.', __METHOD__), E_USER_DEPRECATED);
60+
@trigger_error(sprintf('Not using a string as the error code in %s() is deprecated since Symfony 4.4. A type-hint will be added in 5.0.', __METHOD__), \E_USER_DEPRECATED);
6161
}
6262

6363
if (!\is_string($message) && !(\is_object($message) && method_exists($message, '__toString'))) {

Constraints/Bic.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function __construct($options = null)
4949
{
5050
if (!class_exists(Countries::class)) {
5151
// throw new LogicException('The Intl component is required to use the Bic constraint. Try running "composer require symfony/intl".');
52-
@trigger_error(sprintf('Using the "%s" constraint without the "symfony/intl" component installed is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
52+
@trigger_error(sprintf('Using the "%s" constraint without the "symfony/intl" component installed is deprecated since Symfony 4.2.', __CLASS__), \E_USER_DEPRECATED);
5353
}
5454

5555
if (isset($options['iban']) && isset($options['ibanPropertyPath'])) {

Constraints/Country.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function __construct($options = null)
3535
{
3636
if (!class_exists(Countries::class)) {
3737
// throw new LogicException('The Intl component is required to use the Country constraint. Try running "composer require symfony/intl".');
38-
@trigger_error(sprintf('Using the "%s" constraint without the "symfony/intl" component installed is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
38+
@trigger_error(sprintf('Using the "%s" constraint without the "symfony/intl" component installed is deprecated since Symfony 4.2.', __CLASS__), \E_USER_DEPRECATED);
3939
}
4040

4141
parent::__construct($options);

Constraints/Currency.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function __construct($options = null)
3636
{
3737
if (!class_exists(Currencies::class)) {
3838
// throw new LogicException('The Intl component is required to use the Currency constraint. Try running "composer require symfony/intl".');
39-
@trigger_error(sprintf('Using the "%s" constraint without the "symfony/intl" component installed is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
39+
@trigger_error(sprintf('Using the "%s" constraint without the "symfony/intl" component installed is deprecated since Symfony 4.2.', __CLASS__), \E_USER_DEPRECATED);
4040
}
4141

4242
parent::__construct($options);

Constraints/DateTimeValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function validate($value, Constraint $constraint)
3535
}
3636

3737
if ($value instanceof \DateTimeInterface) {
38-
@trigger_error(sprintf('Validating a \\DateTimeInterface with "%s" is deprecated since version 4.2. Use "%s" instead or remove the constraint if the underlying model is already type hinted to \\DateTimeInterface.', DateTime::class, Type::class), E_USER_DEPRECATED);
38+
@trigger_error(sprintf('Validating a \\DateTimeInterface with "%s" is deprecated since version 4.2. Use "%s" instead or remove the constraint if the underlying model is already type hinted to \\DateTimeInterface.', DateTime::class, Type::class), \E_USER_DEPRECATED);
3939

4040
return;
4141
}

Constraints/DateValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function validate($value, Constraint $constraint)
4747
}
4848

4949
if ($value instanceof \DateTimeInterface) {
50-
@trigger_error(sprintf('Validating a \\DateTimeInterface with "%s" is deprecated since version 4.2. Use "%s" instead or remove the constraint if the underlying model is already type hinted to \\DateTimeInterface.', Date::class, Type::class), E_USER_DEPRECATED);
50+
@trigger_error(sprintf('Validating a \\DateTimeInterface with "%s" is deprecated since version 4.2. Use "%s" instead or remove the constraint if the underlying model is already type hinted to \\DateTimeInterface.', Date::class, Type::class), \E_USER_DEPRECATED);
5151

5252
return;
5353
}

Constraints/Email.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ class Email extends Constraint
7979
public function __construct($options = null)
8080
{
8181
if (\is_array($options) && \array_key_exists('strict', $options)) {
82-
@trigger_error(sprintf('The "strict" property is deprecated since Symfony 4.1. Use "mode"=>"%s" instead.', self::VALIDATION_MODE_STRICT), E_USER_DEPRECATED);
82+
@trigger_error(sprintf('The "strict" property is deprecated since Symfony 4.1. Use "mode"=>"%s" instead.', self::VALIDATION_MODE_STRICT), \E_USER_DEPRECATED);
8383
}
8484

8585
if (\is_array($options) && \array_key_exists('checkMX', $options)) {
86-
@trigger_error('The "checkMX" option is deprecated since Symfony 4.2.', E_USER_DEPRECATED);
86+
@trigger_error('The "checkMX" option is deprecated since Symfony 4.2.', \E_USER_DEPRECATED);
8787
}
8888

8989
if (\is_array($options) && \array_key_exists('checkHost', $options)) {
90-
@trigger_error('The "checkHost" option is deprecated since Symfony 4.2.', E_USER_DEPRECATED);
90+
@trigger_error('The "checkHost" option is deprecated since Symfony 4.2.', \E_USER_DEPRECATED);
9191
}
9292

9393
if (\is_array($options) && \array_key_exists('mode', $options) && !\in_array($options['mode'], self::$validationModes, true)) {
@@ -98,7 +98,7 @@ public function __construct($options = null)
9898

9999
if ((self::VALIDATION_MODE_STRICT === $this->mode || true === $this->strict) && !class_exists(StrictEmailValidator::class)) {
100100
// throw new LogicException(sprintf('The "egulias/email-validator" component is required to use the "%s" constraint in strict mode.', __CLASS__));
101-
@trigger_error(sprintf('Using the "%s" constraint in strict mode without the "egulias/email-validator" component installed is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
101+
@trigger_error(sprintf('Using the "%s" constraint in strict mode without the "egulias/email-validator" component installed is deprecated since Symfony 4.2.', __CLASS__), \E_USER_DEPRECATED);
102102
}
103103

104104
if (null !== $this->normalizer && !\is_callable($this->normalizer)) {

Constraints/EmailValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class EmailValidator extends ConstraintValidator
5050
public function __construct($defaultMode = Email::VALIDATION_MODE_LOOSE)
5151
{
5252
if (\is_bool($defaultMode)) {
53-
@trigger_error(sprintf('Calling `new %s(%s)` is deprecated since Symfony 4.1, use `new %s("%s")` instead.', self::class, $defaultMode ? 'true' : 'false', self::class, $defaultMode ? Email::VALIDATION_MODE_STRICT : Email::VALIDATION_MODE_LOOSE), E_USER_DEPRECATED);
53+
@trigger_error(sprintf('Calling `new %s(%s)` is deprecated since Symfony 4.1, use `new %s("%s")` instead.', self::class, $defaultMode ? 'true' : 'false', self::class, $defaultMode ? Email::VALIDATION_MODE_STRICT : Email::VALIDATION_MODE_LOOSE), \E_USER_DEPRECATED);
5454

5555
$defaultMode = $defaultMode ? Email::VALIDATION_MODE_STRICT : Email::VALIDATION_MODE_LOOSE;
5656
}
@@ -89,7 +89,7 @@ public function validate($value, Constraint $constraint)
8989
}
9090

9191
if (null !== $constraint->strict) {
92-
@trigger_error(sprintf('The %s::$strict property is deprecated since Symfony 4.1. Use %s::mode="%s" instead.', Email::class, Email::class, Email::VALIDATION_MODE_STRICT), E_USER_DEPRECATED);
92+
@trigger_error(sprintf('The %s::$strict property is deprecated since Symfony 4.1. Use %s::mode="%s" instead.', Email::class, Email::class, Email::VALIDATION_MODE_STRICT), \E_USER_DEPRECATED);
9393

9494
if ($constraint->strict) {
9595
$constraint->mode = Email::VALIDATION_MODE_STRICT;

Constraints/Expression.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct($options = null)
3838
{
3939
if (!class_exists(ExpressionLanguage::class)) {
4040
// throw new LogicException(sprintf('The "symfony/expression-language" component is required to use the "%s" constraint.', __CLASS__));
41-
@trigger_error(sprintf('Using the "%s" constraint without the "symfony/expression-language" component installed is deprecated since Symfony 4.2.', __CLASS__), E_USER_DEPRECATED);
41+
@trigger_error(sprintf('Using the "%s" constraint without the "symfony/expression-language" component installed is deprecated since Symfony 4.2.', __CLASS__), \E_USER_DEPRECATED);
4242
}
4343

4444
parent::__construct($options);

Constraints/ExpressionValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ class ExpressionValidator extends ConstraintValidator
2828
public function __construct(/*ExpressionLanguage */$expressionLanguage = null)
2929
{
3030
if (\func_num_args() > 1) {
31-
@trigger_error(sprintf('The "%s" instance should be passed as "%s" first argument instead of second argument since 4.4.', ExpressionLanguage::class, __METHOD__), E_USER_DEPRECATED);
31+
@trigger_error(sprintf('The "%s" instance should be passed as "%s" first argument instead of second argument since 4.4.', ExpressionLanguage::class, __METHOD__), \E_USER_DEPRECATED);
3232

3333
$expressionLanguage = func_get_arg(1);
3434

3535
if (null !== $expressionLanguage && !$expressionLanguage instanceof ExpressionLanguage) {
3636
throw new \TypeError(sprintf('Argument 2 passed to "%s()" must be an instance of "%s" or null, "%s" given. Since 4.4, passing it as the second argument is deprecated and will trigger a deprecation. Pass it as the first argument instead.', __METHOD__, ExpressionLanguage::class, \is_object($expressionLanguage) ? \get_class($expressionLanguage) : \gettype($expressionLanguage)));
3737
}
3838
} elseif (null !== $expressionLanguage && !$expressionLanguage instanceof ExpressionLanguage) {
39-
@trigger_error(sprintf('The "%s" first argument must be an instance of "%s" or null since 4.4. "%s" given', __METHOD__, ExpressionLanguage::class, \is_object($expressionLanguage) ? \get_class($expressionLanguage) : \gettype($expressionLanguage)), E_USER_DEPRECATED);
39+
@trigger_error(sprintf('The "%s" first argument must be an instance of "%s" or null since 4.4. "%s" given', __METHOD__, ExpressionLanguage::class, \is_object($expressionLanguage) ? \get_class($expressionLanguage) : \gettype($expressionLanguage)), \E_USER_DEPRECATED);
4040

4141
$expressionLanguage = null;
4242
}

0 commit comments

Comments
 (0)