mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Cannot findBy with a string on a DateTime field since 2.20.7 #7584
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 @lou-perret on GitHub (Jan 9, 2026).
Bug Report
Summary
Hello !
Since the 2.20.7 update, it looks like we cannot do a "findBy" on a Doctrine\DBAL\Types\Types\Types::TIME_IMMUTABLE (or DATE_MUTABLE) field with strings anymore
Replacing the strings with \DateTimeImmutable does the trick
Current behavior
Create an entity with
Use it like this
Expected behavior
I should get an array with every MyEntity with the date of 2025-02-04
@HeahDude commented on GitHub (Jan 9, 2026):
The culprit seems to be https://github.com/doctrine/orm/pull/11895/files#diff-3ca09663ec045c8f6549f5960c6cf11c38a839c46eb6efb2151c0c00498e3045.
@HeahDude commented on GitHub (Jan 9, 2026):
Possibly relates to https://github.com/doctrine/orm/issues/12245.