Skip to content

MIR1008

DeprecatedConstant

A constant annotated with @deprecated is being referenced. Deprecated constants are scheduled for removal and should not be used in new code.

<?php
class Status {
/**
* @deprecated Use Status::ACTIVE instead.
*/
public const ENABLED = 1;
public const ACTIVE = 1;
}
echo Status::ENABLED; // deprecated constant

Use the replacement constant indicated in the @deprecated message.