Skip to content

TableErrorFormatter: Use two spaces instead of one #4031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: 2.1.x
Choose a base branch
from

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

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.

1 participant