Skip to content

Validator incompatibility with ProxyManager #35544

Closed
@alekitto

Description

@alekitto

Symfony version(s) affected: 5.0.4

Description
When trying to validate a value holder proxy generated with ocramius/proxy-manager, all the public properties will be unset at construction.
This results in ReflectionProperty::isInitialized() returning false as clearly documented here.
PR #35532 introduced check on isInitialized returning null instead of firing an __get call.

Possible Solution
Check if __get method exists before blindly returning null, as per rfc "reads from uninitialized properties will generate a TypeError unless __get() is defined".

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