Skip to content

How to handle support for mapping to stdClass #3

@djmattyg007

Description

@djmattyg007

PHPStan has configuration for something it calls "object crates". These are classes that are like stdClass, that just accept whatever you read and write to them by way of __get() and __set().

I'd lile to suggest that the best way to support mapping to stdClass would be a generic system such as this, where you configure a destination class as an object crate, and everything is just written as-is. This makes it easy to extend when integrating it into frameworks and other dynamic code.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions