Heres the discussion about this RFC: https://externals.io/message/112554 For me it seems that there is no specific reason. It seems that the RFC was just never finished and put to vote. And without a positive vote, the pull requests get not merged. Answer from Deleted User on reddit.com
🌐
PHP
wiki.php.net › rfc › deprecated_attribute
PHP RFC: #[\Deprecated] Attribute
For extensions that are part of php-src the attribute will replace the existing doc comment as part of this RFC. ... Supporting #[\Deprecated] on other targets of attributes that to not yet support deprecations for internally defined symbols, for example classes.
🌐
PHP
php.net › manual › en › class.deprecated.php
PHP: Deprecated - Manual
This attribute is used to mark functionality as deprecated.
🌐
PHP.Watch
php.watch › versions › 8.4 › Deprecated
`#[Deprecated]` attribute - PHP 8.4 • PHP.Watch
PHP 8.4 introduces a new PHP Attribute named #[Deprecated], that can attribute a PHP function, a class method, or a class constant as deprecated.
🌐
M
m.academy › lessons › deprecate-methods-using-attributes-php-84
Deprecate methods using attributes in PHP 8.4 - Developer Lesson
We can also pass along our custom message to this attribute with the message argument: <?php declare(strict_types=1); class FileUploader { #[Deprecated( message: "Method FileUploader::upload() is deprecated, use uploadFile() instead", )] public function upload( string $path, ): void // Upload implementation } public function uploadFile( string $path, ): void { // Improved upload implementation with validation } }
Published   April 8, 2025
🌐
Readthedocs
exakat.readthedocs.io › en › latest › Reference › Rules › Attributes › Deprecated.html
1.2.343. Deprecated Attribute — Exakat 1 documentation
The full description of the deprecation include #[Deprecated(reason: '', replacement: '')]. The reason parameter is a human readable reason for the change; the replacement parameter is a replacement suggestion. Only the attribute is used in this rule. <?php class x { #[Deprecated] function ...
🌐
PHPStan
phpstan.org › error-identifiers › attribute.deprecated
Error Identifier: attribute.deprecated
Replace the deprecated attribute with its recommended replacement: <?php declare(strict_types = 1); -#[OldAttribute] +#[NewAttribute] class Foo { } You can use the identifier attribute.deprecated to ignore this error using a comment: // @phpstan-ignore attribute.deprecated codeThatProducesTheError(); You can also use only the identifier key to ignore all errors of the same type in your configuration file in the ignoreErrors parameter: parameters: ignoreErrors: - identifier: attribute.deprecated ·
🌐
GitHub
github.com › s-damian › php-8-4-new-features › blob › main › deprecated-attribute.php
php-8-4-new-features/deprecated-attribute.php at main · s-damian/php-8-4-new-features
// Attribute "Deprecated" can target method. #[\Deprecated] public function calculate(): int · { return $this->total; } } · // With PHP 8.3 we will not see any warning. · // With PHP 8.4 we will see these warnings: · // PHP Deprecated: Method MathPhp::calculate() is deprecated in...
Author   s-damian
Find elsewhere
🌐
Lindevs
lindevs.com › use-deprecated-attribute-in-php-8-4
Use Deprecated Attribute in PHP 8.4 | Lindevs
December 6, 2024 - The #[Deprecated] attribute accepts two optional parameters: a message explaining the reason for the deprecation and a string specifying when the functionality was deprecated. ... <?php class NewsletterManager { #[Deprecated('use Newsletter...
🌐
Externals
externals.io › message › 112554
#[Deprecated] Attribute - Externals
Also, it would be very useful to add named parameters to the attribute, namely: "package" (the name of the package that declares the deprecation) and "version" (the version of that package that introduced the deprecation), next to the message. This is critical info when building reports of deprecations. You could do that now with a polyfill from userspace. If the annotation need not have an effect, then it's just any other userspace implementation. The difference is that PHP core has the ability to force standarization.
🌐
Phpdoc
manual.phpdoc.org › HTMLSmartyConverter › HandS › phpDocumentor › tutorial_tags.deprecated.pkg.html
@deprecated
The @deprecated tag is used to document the deprecation version or other information of any element that can be documented except for page (global variable, include, constant, function, define, class, variable, method). If present, phpDocumentor will display the optional version/info string ...
🌐
Eusonlito
eusonlito.github.io › php-changes-cheatsheet › deprecated.html
Deprecated Features in PHP 8.5, 8.4, 8.3, 8.2, 8.1, 8.0, 7.4, 7.3, 7.2, 7.1, 7.0, 5.6, 5.5, 5.4, 5.3
A dynamic properties deprecation warning can be addressed by: Declaring the property (preferred). Adding the #[\AllowDynamicProperties] attribute to the class (which also applies to all child classes).
🌐
DEV Community
dev.to › robertobutti › how-to-deprecate-php-code-without-breaking-your-users-4hae
How to deprecate PHP code without breaking your users - DEV Community
January 25, 2026 - If your project uses PHP 8.4 or later, you can simplify this using the native #[Deprecated] attribute:
🌐
PHP.Watch
php.watch › versions › 8.2 › dynamic-properties-deprecated
Dynamic Properties are deprecated - PHP 8.2 • PHP.Watch
PHP 8.2 introduces a new attribute in the global namespace named #[AllowDynamicProperties]. Classes declared with this attribute signals PHP to not emit any deprecation notices when setting dynamic properties on objects of that class.
🌐
GitHub
github.com › JetBrains › phpstorm-attributes › blob › master › src › Deprecated.php
phpstorm-attributes/src/Deprecated.php at master · JetBrains/phpstorm-attributes
* <li>%class%: If the attribute is provided for method "m", then for "$this->f()->m()", %class% will be "$this->f()"</li> ... * The following example shows how to wrap a function call in another call and swap arguments:<br /> * "#[Deprecated(replacement: "wrappedCall(%name%(%parameter1%, %parameter0%))")] f($a, $b){}<br /> * f(1,2) will be replaced with wrappedCall(f(2,1)) * @param string $since Element is deprecated starting with the provided PHP language level, applicable only for PhpStorm stubs entries
Author   JetBrains
🌐
Phpdoc
docs.phpdoc.org › guide › references › phpdoc › tags › deprecated.html
Deprecated
The @deprecated tag declares that the associated Structural Element(s) will be removed in a future version as it has become obsolete or its usage is otherwise not recommended, effective from the "Semantic Version" if provided.
🌐
PHP
pear.php.net › reference › PhpDocumentor-latest › phpDocumentor › tutorial_tags.deprecated.pkg.html
@deprecated - PEAR - PHP
The @deprecated tag is used to document the deprecation version or other information of any element that can be documented except for page (global variable, include, constant, function, define, class, variable, method). If present, phpDocumentor will display the optional version/info string ...