Skip to content

fix unnecessary wrapping in TableErrorFormatter #4170

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

Merged
merged 1 commit into from
Jul 27, 2025

Conversation

schlndh
Copy link
Contributor

@schlndh schlndh commented Jul 27, 2025

Fixes phpstan/phpstan#13317

The change was submitted to symfony in symfony/symfony#61268.

This time I tested the changes with a large project that I have available (~15k PHPStan errors) in two terminal sizes (94 and 382). And I did found one more regressions (first one is with 2.1.18 and the second one is with this PR, don't mind the ✏️ - I'm using spaces for the editor link):

  87     Access to an undefined property object::$id.                                          
         🪪  property.notFound                                                                 
         💡  Learn more:                                                                       
            https://phpstan.org/blog/solving-phpstan-access-to-undefined-property              
         ✏️                  


  87     Access to an undefined property object::$id.                                         
         🪪  property.notFound                                                                
         💡  Learn more: https://phpstan.org/blog/solving-phpstan-access-to-undefined-propert  
         y                                                                                    
         ✏️     

As you can see the link is broken (i.e. when I click it it goes to the clipped URL) at this particular size (as well as any smaller size). Removing <fg=cyan> from it would fix the issue. Alternatively, it could be shortened. What do you think? I'm not particularly eager to continue fixing more symfony/console issues until the previous PRs are accepted. 😅

@ondrejmirtes ondrejmirtes merged commit 8ae740c into phpstan:2.1.x Jul 27, 2025
413 of 420 checks passed
@ondrejmirtes
Copy link
Member

Thank you.

Please continue sending fixes for bigs that currently affect PHPStan. And queue them as Symfony PRs. So that when we're able to update Symfony Console, we'll be able to remove all patches.

@schlndh schlndh deleted the fix-bug13317 branch July 27, 2025 15:09
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.

wrapping of hints and error types seems to be calculated with error message size (from phpstan 2.1.20)
2 participants