ConstAndTraitDeprecatedAttributeRector

Change @deprecated annotation to #[Deprecated] attribute for constants

-/**
- * @deprecated 1.0.0 Use SomeOtherConstant instead
- */
+#[\Deprecated(message: 'Use SomeOtherConstant instead', since: '1.0.0')]
 const SomeConstant = 'irrelevant';

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Php85\Rector\Const_\ConstAndTraitDeprecatedAttributeRector;

return RectorConfig::configure()
    ->withRules([
        ConstAndTraitDeprecatedAttributeRector::class,
    ]);
SETS:  PHP 8.5