vimeo / psalm

A static analysis tool for finding errors in PHP applications
https://psalm.dev
MIT License
5.57k stars 660 forks source link

Emit a new issue when concatenation threshold is reached in BinaryOpAnalyzer #6379

Open ArtemGoutsoul opened 3 years ago

ArtemGoutsoul commented 3 years ago

The issue https://github.com/vimeo/psalm/issues/6297 is caused by concatenation threshold implemented here: https://github.com/vimeo/psalm/blob/19cc4cb4ee962a9872aa1e5c61ab41ef3c4348d5/src/Psalm/Internal/Analyzer/Statements/Expression/BinaryOpAnalyzer.php#L30

To make it easier to diagnose the problem, it would be good to emit a new issue, something like 100 concatenations threshold reached.

psalm-github-bot[bot] commented 3 years ago

Hey @ArtemGoutsoul, can you reproduce the issue on https://psalm.dev ?

ArtemGoutsoul commented 3 years ago

Same test case as for https://github.com/vimeo/psalm/issues/6297 can be used:

https://psalm.dev/r/e27b51a709

psalm-github-bot[bot] commented 3 years ago

I found these snippets:

https://psalm.dev/r/e27b51a709 ```php