Description
The method sanitizeParam
in DoctrineDataCollector is currently returning the name of the class for objects. It would be nice if it would return a string representation of that object, e.g. replacing sprintf('Object(%s)', get_class($var))
with (string) $var
.
The following is my use case.
I'm using Ramsey Uuid ofr IDs in my entity. Two entities are in a OneToMany
relation and I try to build a query via QueryBuilder, passing the owning side Entity to the Repository of the opposite side and doing $queryBuilder->where('oppositeEntity.owningEntity = :owning')->setParameter('owning', $owning)
, where $owning
is an instance of Uuid.
What I expect in the profiler is a runnable query with the actual Uuid as string inside, so I can copy&paste it and run it inside my database. Instead, I'm getting 'Object(Ramsey\\Uuid\\Uuid)'
, that defeats the purpose of the query being runnable.
[Edit: I'm on Symfony 2.8.14 with Doctrine 2.5.5]