Skip to content

[DoctrineBridge] support __toString as documented for UniqueEntityValidator #28252

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
merged 1 commit into from
Aug 24, 2018

Conversation

dmaicher
Copy link
Contributor

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #28245
License MIT
Doc PR -

This fixes #28245.

It brings back handling __toString as documented for invalid values.

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Aug 24, 2018
@@ -186,6 +186,10 @@ private function formatWithIdentifiers(ObjectManager $em, ClassMetadata $class,
return $this->formatValue($value, self::PRETTY_DATE);
}

if (method_exists($value, '__toString')) {
Copy link
Member

Choose a reason for hiding this comment

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

\method_exists (not sure why fabbot did not report it...)

@nicolas-grekas
Copy link
Member

Thank you @dmaicher.

@nicolas-grekas nicolas-grekas merged commit 2ac883a into symfony:3.4 Aug 24, 2018
nicolas-grekas added a commit that referenced this pull request Aug 24, 2018
…ueEntityValidator (dmaicher)

This PR was squashed before being merged into the 3.4 branch (closes #28252).

Discussion
----------

[DoctrineBridge] support __toString as documented for UniqueEntityValidator

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

This fixes #28245.

It brings back handling `__toString` as documented for invalid values.

Commits
-------

2ac883a [DoctrineBridge] support __toString as documented for UniqueEntityValidator
@dmaicher dmaicher deleted the issue-28245 branch August 24, 2018 09:50
This was referenced Aug 28, 2018
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.

4 participants