Skip to content

Conversation

FeBe95
Copy link
Contributor

@FeBe95 FeBe95 commented May 27, 2025

Description

This PR reverts commit 59a003a which was part of #3821.

Why?

Before merging #3821, I was asked to replace the seemingly incorrect double spaces with a single space.

After upgrading to the latest version of PHPStan today, I noticed that the double spaces from before were used on purpose, because an emoji character may exceed the width of a single monospace character. Depending on the terminal engine in use, the following characters are either overlapped or shifted to the right.

Using two spaces instead of one makes sure that the output looks good in all terminals (see "After" examples).

Example 1: PhpStorm

The emoji overlaps the next character.

Before After

Example 2: Windows Terminal

The emoji pushes all following characters to the right.

Before After

@ondrejmirtes ondrejmirtes merged commit d04535d into phpstan:2.1.x May 30, 2025
420 of 421 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@FeBe95 FeBe95 deleted the fix-table-error-formatter-spaces branch June 19, 2025 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants