Open
Description
When exposing a library, you need to respect semantic versioning and avoid BC-break.
Let's say you have some code
class Foo
{
/** @deprecated */
protected $foo;
private $newFoo;
public getFoo():
{
return $this->foo ?? $this->newFoo;
}
}
An error is reported because $this->foo;
is used but changing this/removing it would be a BC break.
But the phpstan-deprecation-rules would still be useful to detect when I use a deprecated method from another library.
Is it possible to add an option in order to
- Turn off errors if the deprecated Method/Interface/Property/Class/... is from my project
- Keep the erros if the deprecated Method/Interface/Property/Class/... is coming from a vendor
?
Metadata
Assignees
Labels
No labels