phpstan / phpstan-deprecation-rules

PHPStan rules for detecting usage of deprecated classes, methods, properties, constants and traits.
MIT License
378 stars 18 forks source link

Deprecation of methods on vendor is not being shown #40

Closed lucassabreu closed 3 years ago

lucassabreu commented 3 years ago

The merge method on Doctrine\ORM\EntityManager is marked as deprecated directly on the code (link).

But no error/waring is being prompted by the extension.

If I create the stub below with the annotation than it works as expected.

<?php

namespace Doctrine\ORM;

class EntityManager
{
    /** @deprecated */
    public function merge(object $entity): void;
}

This extension will only read deprecations that I add on my code or in stubs? Or is this a bug on the extension?

It is not that clear on the README which is the right behavior

ondrejmirtes commented 3 years ago

Feel free to update phpstan-doctrine stub files and add @deprecated there :)

lucassabreu commented 3 years ago

i didn't realize it was the other extension doing it, will do that for sure, thanks @ondrejmirtes

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.