Skip to content

Overrided deprecated method should not be deprecated #3378

@ossinkine

Description

@ossinkine

Bug report

Imagine we have two classes AbstractEvent and SpecificEvent extends AbstractEvent. AbstractEvent has getString method, SpecificEvent uses it. One day we decide this method shoud be placed in SpecificEvent but not in AbstractEvent and we create one more getString method in SpecificEvent and make AbstractEvent::getString deprecated. So we have the child class with the method and the parent class with the same deprecated method.

Code snippet that reproduces the problem

https://phpstan.org/r/4ff86893-71fd-46a6-8f53-ddef9a049d0d

Expected output

I think SpecificEvent::getString should not be deprecated.

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