Skip to content

Upgrade to ^2.0 causes doctrine id fields to suggest removing the type #675

@gnat42

Description

@gnat42

We upgraded from phpstan 1.X to 2.X and received many many more errors that 1.X reporting. One of the common ones is that it suggests removing the type from ID fields. For example an int field is designated as ?int $id.


Line CoreDomain/Settlement/Matter/Application.php


42 Property NS\CoreDomain\Settlement\Matter\Application::$id (int|null)
is never assigned int so it can be removed from the property type.
🪪 property.unusedType

How do we fix this? Is there something we need to change in the configuration between v1-v2?

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