Skip to content

Universal object crates improvements #12469

@petercv

Description

@petercv

Feature request

There are a few things I would wish universal object crates would support.

  1. Instead having to add them to the config file, mark a class as universal object crate in the class its docblock.
  2. Understand the return type of __get. You can have an explicit return type in the __get method. PHPStorm understands this for example, and has auto-completion when using this. PHPStan however seems to ignore the result type and assume the result is mixed. Funny enough for offsetGet of ArrayAccess it seems to be the other way around.

Did PHPStan help you today? Did it make you happy in any way?

Yes, wish PHPStorm would understand generics the way PHPStan does.

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