Skip to content

MIR1006

DeprecatedInterface

A class implements an interface that has been annotated with @deprecated. This interface is scheduled for removal and should not be implemented in new code.

<?php
/**
* @deprecated Use NewContract instead.
*/
interface OldContract {
public function process(): void;
}
class MyService implements OldContract { // implements deprecated interface
public function process(): void {}
}

Implement the replacement interface indicated in the @deprecated message.