Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DoctrineDataCollector does not output objects in queries #20673

Copy link
Copy link
Closed
@garak

Description

@garak
Issue body actions

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]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.