1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Reflection\Deprecation;
4:
5: use PHPStan\BetterReflection\Reflection\ReflectionConstant;
6: use PHPStan\DependencyInjection\ExtensionInterface;
7:
8: /**
9: * This interface allows you to provide custom deprecation information
10: *
11: * To register it in the configuration file use the following tag:
12: *
13: * ```
14: * services:
15: * -
16: * class: App\PHPStan\MyProvider
17: * tags:
18: * - phpstan.constantDeprecationExtension
19: * ```
20: *
21: * @api
22: */
23: #[ExtensionInterface(tag: self::CONSTANT_EXTENSION_TAG)]
24: interface ConstantDeprecationExtension
25: {
26:
27: public const CONSTANT_EXTENSION_TAG = 'phpstan.constantDeprecationExtension';
28:
29: public function getConstantDeprecation(ReflectionConstant $reflection): ?Deprecation;
30:
31: }
32: