8000 Prepare for PHP 7.4: use ReflectionReference in VarCloner · Issue #31135 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Prepare for PHP 7.4: use ReflectionReference in VarCloner #31135
Closed
@nicolas-grekas

Description

@nicolas-grekas

In VarDumper's VarCloner, we use some black magic tricks to work with PHP references (called "hard references" in the code, i.e. $b = &$a).

In PHP 7.4, this will break with typed properties, because of the $cookie trick that is used to detect these references.

But PHP 7.4 has a solution: ReflectionReference

So, when PHP 7.4 is used, we can replace the current implementation by one based on ReflectionReference. That would make things both cleaner and compatible with typed-references.

While this might not be the most trivial part of the code to have a look at, the ETA of PHP 7.4 is early December. Anyone would like to give it a try?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0