Skip to content

MIR1001

DeprecatedMethodCall

A method marked @deprecated is called on an instance or via a static call.

<?php
class Api {
/** @deprecated Use newMethod() instead */
public function oldMethod(): void {}
public function newMethod(): void {}
}
$api = new Api();
$api->oldMethod(); // deprecated call

Switch to the recommended replacement method.

<?php
$api = new Api();
$api->newMethod();