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 847a3e3

Browse filesBrowse files
committed
bug #14891 without this change allways the legacy code get called (dominikzogg)
This PR was submitted for the 2.8 branch but it was merged into the 2.6 branch instead (closes #14891). Discussion ---------- without this change allways the legacy code get called [Form] [Validator] prevent that always the legacy validator logic get called | Q | A | ------------- | --- | Bug fix? | [yes] | New feature? | [no] | BC breaks? | [no] | Deprecations? | [no] | Tests pass? | [yes] | Fixed tickets | [] | License | MIT | Doc PR | [] Commits ------- 96a30bf without this change allways the legacy code get called
2 parents 75d5d54 + 96a30bf commit 847a3e3
Copy full SHA for 847a3e3

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+5
-5
lines changed

‎src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Extension/Validator/ValidatorExtension.php
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ public function __construct($validator)
5959

6060
public function loadTypeGuesser()
6161
{
62-
// 2.4 API
63-
if ($this->validator instanceof LegacyValidatorInterface) {
64-
return new ValidatorTypeGuesser($this->validator->getMetadataFactory());
62+
// 2.5 API
63+
if ($this->validator instanceof ValidatorInterface) {
64+
return new ValidatorTypeGuesser($this->validator);
6565
}
6666

67-
// 2.5 API - ValidatorInterface extends MetadataFactoryInterface
68-
return new ValidatorTypeGuesser($this->validator);
67+
// 2.4 API
68+
return new ValidatorTypeGuesser($this->validator->getMetadataFactory());
6969
}
7070

7171
protected function loadTypeExtensions()

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.