Symfony2 Doctrine – Catchable Fatal Error: Object of class XYZ could not be converted to string in Doctrine\DBAL\Statement.php line 131
While developing a Symfony2 Web App you will face a lot of uncommon errors, due to your fault, but even if the error description is often effective, there are times where it’s not enough and even if you manage to get things working, it’s always a better pratice to understand why shit happens.
Today we’re talking about this error:
Catchable Fatal Error: Object of class Bundle\Entity\YourEntity could not be converted to string in \www\symfony\vendor\doctrine-dbal\lib\Doctrine\DBAL\Statement.php line 131
Every Symfony developer have seen it before, the solution is quite easy, you could easily find it on StackOverflow…