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

[DoctrineBridge] fixed default parameter value in UniqueEntityValidator #19227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

HeahDude
Copy link
Contributor

Q A
Branch? 3.1
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #19209
License MIT
Doc PR ~

@HeahDude
Copy link
Contributor Author

Confirmed by @nicolas-grekas that the remaining failure in Validator's suite for appveyor is unrelated.

@HeahDude
Copy link
Contributor Author

@nicolas-grekas Is that normal that tests pass in high depth in travis? Shouldn't the validator dependency in the doctrine bridge be updated?

@HeahDude
Copy link
Contributor Author

Ok I got it, tests are not running on 3.1, so maybe we should add a conflict?

@@ -127,6 +127,10 @@ public function validate($entity, Constraint $constraint)
$errorPath = null !== $constraint->errorPath ? $constraint->errorPath : $fields[0];
$invalidValue = isset($criteria[$errorPath]) ? $criteria[$errorPath] : $criteria[$fields[0]];

if (is_object($invalidValue) && !method_exists($invalidValue, '__toString')) {
$invalidValue = sprintf('Object of class "%s" identified by "%s"', get_class($entity), implode(', ', $class->getIdentifierValues($entity)));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use this in the default message by including the placeholder?

@fabpot
Copy link
Member

fabpot commented Jun 30, 2016

Thank you @HeahDude.

@fabpot fabpot merged commit 40c0c52 into symfony:3.1 Jun 30, 2016
fabpot added a commit that referenced this pull request Jun 30, 2016
…tityValidator (HeahDude)

This PR was merged into the 3.1 branch.

Discussion
----------

[DoctrineBridge] fixed default parameter value in UniqueEntityValidator

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19209
| License       | MIT
| Doc PR        | ~

Commits
-------

40c0c52 [DoctrineBridge] fixed default parameter value in UniqueEntityValidator
@HeahDude HeahDude deleted the fix/unique_entity-constraint-message_value branch June 30, 2016 08:13
@HeahDude
Copy link
Contributor Author

Tests may fail after #19240, do they?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.