matheusab / rector-html-output-formatter
HTML Output Formatter for the Rector PHP Library.
Installs: 3 953
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 2
Open Issues: 0
Requires
- php: ^7.2|^8.0
- rector/rector: >=0.19
Requires (Dev)
- phpunit/phpunit: ^10.5
README
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