Report invalid printf placeholder
Closes https://github.com/phpstan/phpstan/issues/1889 Closes https://github.com/phpstan/phpstan/issues/8547 (cc @staabm)
This pull request has been marked as ready for review.
Also maybe this belongs to bleeding edge only?
Also maybe this belongs to bleeding edge only?
I would have consider this kinda as a "bugfix".
Technically the sprintf('%') call should have been reported since there is was missing parameter https://3v4l.org/lAIAAs
I can put this behind bleeding edge, but that would mean adding an extra parameters to getPrintfPlaceholdersCount methods with something like getPrintfPlaceholdersCount($format, $reportInvalidPlaceholder). It's your call !