phpstan-src
phpstan-src copied to clipboard
More precise sprintf() format-arg based return type
extracted from https://github.com/phpstan/phpstan-src/pull/3168
closes https://github.com/phpstan/phpstan/issues/11248 closes https://github.com/phpstan/phpstan/issues/10493
the previous format-type based logic was too optimistic regarding types and false-positively created too precise types in some cases.
I think the remaining error is a bug: https://github.com/phpstan/phpstan/issues/11249
This pull request has been marked as ready for review.
sorry for all these commits to make it finally build on php 7.2 without errors.
Thank you!