Skip to content

[VarExporter] Cannot unset hooked property #59153

Closed
@SherinBloemendaal

Description

@SherinBloemendaal

Symfony version(s) affected

7.2

Description

When creating a lazy proxy using the vendor/symfony/var-exporter/LazyProxyTrait.php from an object that contains a hooked property (PHP 8.4) an error is being thrown: Error: cannot unset hooked property <class::property>

The error is triggered on:
vendor/symfony/var-exporter/Internal/LazyObjectRegistry.php::73

How to reproduce

Create a zenstruck/foundry factory for an entity which contains a hooked property. Calling any method (for example ::find() or ::createOne()) will throw the error.

Possible Solution

No response

Additional Context

No response

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