Tag reference
@deprecated
The @deprecated tag marks an element as no longer recommended for use. It
warns consumers that the element may be removed in a future release, and
optionally names the version starting from which it should be considered
deprecated and what to use in its place.
Grammar
"@deprecated" [ <Version> ] [ <Description> ]Examples
/** * @deprecated 2.0 Use Mailer::send() instead. */public function dispatch(Message $message): bool/** * @deprecated No longer needed now that transport is chosen * automatically. */public function withTransport(Transport $transport): staticNames by platform
- standard
@deprecated
Parsing a @deprecated tag produces a DeprecatedTag instance exposing
$version — the version since which the element is deprecated, or null
when none was given — alongside the inherited $description.
final class DeprecatedTag extends VersionedTag {}VersionedTag itself declares the $version property (and the
constructor that fills it in) — DeprecatedTag adds nothing of its own.
Defined by the PSR-19 draft PHPDoc Tags proposal and phpDocumentor’s tag reference.