Skip to content

Commit 5c7b4a0

Browse files
Merge branch '4.2' into 4.3
* 4.2: [Validator] fix deprecation layer of ValidatorBuilder
2 parents 6875f66 + d98dd9b commit 5c7b4a0

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

UPGRADE-4.2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ Validator
385385
* The `symfony/translation` dependency has been removed - run `composer require symfony/translation` if you need the component
386386
* The `checkMX` and `checkHost` options of the `Email` constraint are deprecated
387387
* The component is now decoupled from `symfony/translation` and uses `Symfony\Contracts\Translation\TranslatorInterface` instead
388-
* The `ValidatorBuilderInterface` has been deprecated and `ValidatorBuilder` made final
388+
* The `ValidatorBuilderInterface` has been deprecated and `ValidatorBuilder::setTranslator()` has been made final
389389
* Deprecated validating instances of `\DateTimeInterface` in `DateTimeValidator`, `DateValidator` and `TimeValidator`. Use `Type` instead or remove the constraint if the underlying model is type hinted to `\DateTimeInterface` already.
390390
* Using the `Bic`, `Country`, `Currency`, `Language` and `Locale` constraints without `symfony/intl` is deprecated
391391
* Using the `Email` constraint in strict mode without `egulias/email-validator` is deprecated

UPGRADE-5.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ Validator
401401
* Calling `EmailValidator::__construct()` method with a boolean parameter has been removed, use `EmailValidator("strict")` instead.
402402
* Removed the `checkDNS` and `dnsMessage` options from the `Url` constraint.
403403
* The component is now decoupled from `symfony/translation` and uses `Symfony\Contracts\Translation\TranslatorInterface` instead
404-
* The `ValidatorBuilderInterface` has been removed and `ValidatorBuilder` is now final
404+
* The `ValidatorBuilderInterface` has been removed
405405
* Removed support for validating instances of `\DateTimeInterface` in `DateTimeValidator`, `DateValidator` and `TimeValidator`. Use `Type` instead or remove the constraint if the underlying model is type hinted to `\DateTimeInterface` already.
406406
* The `symfony/intl` component is now required for using the `Bic`, `Country`, `Currency`, `Language` and `Locale` constraints
407407
* The `egulias/email-validator` component is now required for using the `Email` constraint in strict mode

src/Symfony/Component/Validator/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ CHANGELOG
2525
* added `DivisibleBy` constraint
2626
* decoupled from `symfony/translation` by using `Symfony\Contracts\Translation\TranslatorInterface`
2727
* deprecated `ValidatorBuilderInterface`
28-
* made `ValidatorBuilder` final
28+
* made `ValidatorBuilder::setTranslator()` final
2929
* marked `format` the default option in `DateTime` constraint
3030
* deprecated validating instances of `\DateTimeInterface` in `DateTimeValidator`, `DateValidator` and `TimeValidator`.
3131
* deprecated using the `Bic`, `Country`, `Currency`, `Language` and `Locale` constraints without `symfony/intl`

src/Symfony/Component/Validator/ValidatorBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
* The default implementation of {@link ValidatorBuilderInterface}.
3939
*
4040
* @author Bernhard Schussek <bschussek@gmail.com>
41-
*
42-
* @final since Symfony 4.2
4341
*/
4442
class ValidatorBuilder implements ValidatorBuilderInterface
4543
{
@@ -255,6 +253,8 @@ public function setConstraintValidatorFactory(ConstraintValidatorFactoryInterfac
255253

256254
/**
257255
* {@inheritdoc}
256+
*
257+
* @final since Symfony 4.2
258258
*/
259259
public function setTranslator(LegacyTranslatorInterface $translator)
260260
{

0 commit comments

Comments
 (0)