Skip to content

CLI Error Message Output Broken #9323

@FeBe95

Description

@FeBe95

Bug Report

Subject Details
Rector version v2.1.4
OS Windows 11

While updating our Rector configuration file, I accidentally specified an invalid PHP Set config that looked like this:

return RectorConfig::configure()
    ->withPhpSets(
        php82: true,
        php84: true,
    );

This produces an error, but the error message is not fully displayed:

Image

The full message is:

Pick only one version target in "withPhpSets()". All rules up to this version will be used.
To use your composer.json > PHP version, keep arguments empty.

throw new InvalidConfigurationException(\sprintf('Pick only one version target in "withPhpSets()". All rules up to this version will be used.%sTo use your composer.json PHP version, keep arguments empty.', \PHP_EOL));

Resizing the terminal window and re-running the command cuts the message at a different position:

Image

Minimal PHP Code Causing Issue

The demo does not work (obviously) because the code produces an error. Because of this error, no demo link is generated. Regardless, here's the demo page output:

Image

Expected Behaviour

  • The error message should be displayed correctly.
  • The red error message box should be rectangular.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions