Configure it in your rector.php
, where the exportedFilePathPrefix
argument is the path to the exported report.
Example:
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->singleton(HtmlOutputFormatter::class, HtmlOutputFormatter::class);
$rectorConfig->tag(HtmlOutputFormatter::class, OutputFormatterInterface::class);
$rectorConfig->when(HtmlOutputFormatter::class)
->needs('$exportedFilePathPrefix')
->give(__DIR__ . '/rector-report');
After configuring it, you can generate it with Rector's process
command by setting --output-format=html
.
Example:
vendor/bin/rector process --dry-run --output-format=html