Skip to content

Commit dad6934

Browse files
committed
minor #49420 improve deprecation message (xabbuh)
This PR was merged into the 6.2 branch. Discussion ---------- improve deprecation message | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | #46518 (comment) and #46518 (comment) | License | MIT | Doc PR | Commits ------- 54a1d1b improve deprecation message
2 parents 57901a1 + 54a1d1b commit dad6934

File tree

1 file changed

+2
-2
lines changed
  • src/Symfony/Component/Validator/Constraints

1 file changed

+2
-2
lines changed

src/Symfony/Component/Validator/Constraints/Email.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Email extends Constraint
2929
public const VALIDATION_MODE_HTML5 = 'html5';
3030
public const VALIDATION_MODE_STRICT = 'strict';
3131
/**
32-
* @deprecated since Symfony 6.2
32+
* @deprecated since Symfony 6.2, use VALIDATION_MODE_HTML5 instead
3333
*/
3434
public const VALIDATION_MODE_LOOSE = 'loose';
3535

@@ -74,7 +74,7 @@ public function __construct(
7474
$this->normalizer = $normalizer ?? $this->normalizer;
7575

7676
if (self::VALIDATION_MODE_LOOSE === $this->mode) {
77-
trigger_deprecation('symfony/validator', '6.2', 'The "%s" mode is deprecated. The default mode will be changed to "%s" in 7.0.', self::VALIDATION_MODE_LOOSE, self::VALIDATION_MODE_HTML5);
77+
trigger_deprecation('symfony/validator', '6.2', 'The "%s" mode is deprecated. It will be removed in 7.0 and the default mode will be changed to "%s".', self::VALIDATION_MODE_LOOSE, self::VALIDATION_MODE_HTML5);
7878
}
7979

8080
if (self::VALIDATION_MODE_STRICT === $this->mode && !class_exists(StrictEmailValidator::class)) {

0 commit comments

Comments
 (0)