Skip to content

ERROR produced when final class is intersected with an object type #12846

@calebdw

Description

@calebdw

Bug report

Hello!

Please see related: larastan/larastan#2256

Laravel has a BelongsToMany relation which adds a pivot property to the returned Models. Larastan encodes this by intersecting the model with object{pivot: Pivot}, however, ERROR is produced when using final models.

Thanks!

Code snippet that reproduces the problem

https://phpstan.org/r/b7ac1980-0a6d-4f65-86a7-a63ea1917fb7

Expected output

I would expect there to be no errors

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

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions