Skip to content

Dump wrapped object in WeakReference class #13609

Closed

Description

@mvorisek

Description

repro: https://3v4l.org/cuspD

This is a feature request to dump the inner weakly referenced object like as it would be wrapped by a regular class. Currently, the inner object is hidden in the dump making debugging harder.

Actual result:

WeakReference Object
(
)

Expected result:

WeakReference Object
(
    [object] => stdClass Object
        (
        )
)

If for some reasons this is wanted to limit the dump depth,

$weakRef->get() !== null ? get_class($weakRef->get()) : null

can be dumped.

Activity

  1. ndossche commented on Mar 6, 2024

    @ndossche
    Member

    It sounds useful to me, and I don't think this would need an RFC. I could give it a shot sometime later this week.

  2. added a commit that references this issue on Mar 7, 2024
  3. added 2 commits that reference this issue on Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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