doctrine / orm

Doctrine Object Relational Mapper (ORM)
https://www.doctrine-project.org/projects/orm.html
MIT License
9.94k stars 2.52k forks source link

`SQLFilter` gives an unclear error when using non-`Stringable` parameters #11706

Open 7-zete-7 opened 2 weeks ago

7-zete-7 commented 2 weeks ago

Bug Report

Q A
Version ~3

Summary

In ORM 2, parameters were converted according to the DBAL types passed with the parameters. In ORM 3 (after https://github.com/doctrine/orm/pull/9727), parameters began to be explicitly converted to a string.

Current behavior

Error while explicitly converting to string.

Expected behavior

Converting specified parameters according to the passed types.

Reproducer: https://github.com/7-zete-7/doctrine-orm-reproducer-1

[critical] Uncaught PHP Exception Error: "Object of class Symfony\Component\Clock\DatePoint could not be converted to string" at SQLFilter.php line 109