Skip to content

MIR1002

DeprecatedMethod

A method declaration is marked @deprecated. This is reported on the method itself to signal that it is a deprecated API entry point. Call-site violations are reported as DeprecatedMethodCall.

<?php
class Api {
/** @deprecated Use newMethod() instead */
public function oldMethod(): void {}
public function newMethod(): void {}
}

Remove the @deprecated annotation once all callers have migrated, or keep it to signal to users that the method should not be used.