mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Stringable objects are treated like "mapped" in 2.8.0 #6582
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @garak on GitHub (Dec 4, 2020).
After upgrading to 2.8.0, I'm getting a lot of exceptions when I use stringable objects.
For example, using something like:
is working in doctrine/orm 2.7, while in 2.8 raises an exception:
@beberlei commented on GitHub (Dec 4, 2020):
@garak does
$anObjectConvertableToSTringimplement traversable? This 2.8 PR https://github.com/doctrine/orm/pull/8162 is changing related code you are talking about.@garak commented on GitHub (Dec 4, 2020):
No: it's just an object with a
__toString()method.@stof commented on GitHub (Dec 4, 2020):
Looks like the catch on
418587bc25/lib/Doctrine/ORM/AbstractQuery.php (L450-L454)does not work properly anymore@alex-dev commented on GitHub (Dec 4, 2020):
Doctrine\ORM\Mapping\MappingException as ORMMappingException is caught, Doctrine\Persistence\Mapping\MappingException is thrown in 2.8.