Skip to content

hfig/rector-html-output-formatter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Usage

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

Generated report screenshots

image image

About

OutputFormatter that exports an HTML file containing summary and diffs from Rector's process command.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%