Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 154ce81

Browse filesBrowse files
[Validator] fix deprecation layer of ValidatorBuilder
1 parent 9c37d18 commit 154ce81
Copy full SHA for 154ce81

File tree

Expand file treeCollapse file tree

4 files changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+5
-5
lines changed

‎UPGRADE-4.2.md

Copy file name to clipboardExpand all lines: UPGRADE-4.2.md
+1-1Lines 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

Copy file name to clipboardExpand all lines: UPGRADE-5.0.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ Validator
259259
* Calling `EmailValidator::__construct()` method with a boolean parameter has been removed, use `EmailValidator("strict")` instead.
260260
* Removed the `checkDNS` and `dnsMessage` options from the `Url` constraint.
261261
* The component is now decoupled from `symfony/translation` and uses `Symfony\Contracts\Translation\TranslatorInterface` instead
262-
* The `ValidatorBuilderInterface` has been removed and `ValidatorBuilder` is now final
262+
* The `ValidatorBuilderInterface` has been removed
263263
* 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.
264264
* The `symfony/intl` component is now required for using the `Bic`, `Country`, `Currency`, `Language` and `Locale` constraints
265265
* The `egulias/email-validator` component is now required for using the `Email` constraint in strict mode

‎src/Symfony/Component/Validator/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CHANGELOG
99
* added `DivisibleBy` constraint
1010
* decoupled from `symfony/translation` by using `Symfony\Contracts\Translation\TranslatorInterface`
1111
* deprecated `ValidatorBuilderInterface`
12-
* made `ValidatorBuilder` final
12+
* made `ValidatorBuilder::setTranslator()` final
1313
* marked `format` the default option in `DateTime` constraint
1414
* deprecated validating instances of `\DateTimeInterface` in `DateTimeValidator`, `DateValidator` and `TimeValidator`.
1515
* deprecated using the `Bic`, `Country`, `Currency`, `Language` and `Locale` constraints without `symfony/intl`

‎src/Symfony/Component/Validator/ValidatorBuilder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/ValidatorBuilder.php
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.