1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Diagnose;
4:
5: use PHPStan\Command\Output;
6: use PHPStan\DependencyInjection\ExtensionInterface;
7:
8: /**
9: * DiagnoseExtension can output any diagnostic information to stderr after analysis.
10: *
11: * PHPStan displays this information when running the "analyse" command with "-vvv" CLI option.
12: *
13: * To register it in the configuration file use the `phpstan.diagnoseExtension` service tag:
14: *
15: * ```
16: * services:
17: * -
18: * class: App\PHPStan\MyExtension
19: * tags:
20: * - phpstan.diagnoseExtension
21: * ```
22: *
23: * @api
24: */
25: #[ExtensionInterface(tag: self::EXTENSION_TAG)]
26: interface DiagnoseExtension
27: {
28:
29: public const EXTENSION_TAG = 'phpstan.diagnoseExtension';
30:
31: public function print(Output $output): void;
32:
33: }
34: