Skip to content

Tag reference

@not-deprecated

The @not-deprecated tag marks an element as explicitly not deprecated, overriding a @deprecated tag it would otherwise inherit from a parent class or interface.

Grammar

"@not-deprecated" [ <Description> ]

Examples

A method that stays supported even though the interface it implements is deprecated.
/**
* @not-deprecated
*/
public function send(): void {}
With a description explaining why it is kept.
/**
* @not-deprecated Still the recommended entry point.
*/

Names by platform

standard
@not-deprecated

Parsing a @not-deprecated tag produces a NotDeprecatedTag instance. Being a pure marker, it adds nothing beyond the $name and optional $description every Tag already carries.

final class NotDeprecatedTag extends FlagTag {}