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