staabm / phpstan-todo-by

Todo comments with expiration
https://staabm.github.io/2023/12/17/phpstan-todo-by-published.html
MIT License
173 stars 4 forks source link

Support less strict versioning schemes #21

Closed staabm closed 9 months ago

staabm commented 9 months ago

before this PR we would get a exception for git tags with version 1.10 and similar (without a 3rd number)

  Internal error: Internal error: Version string '1.10' is not valid and cannot be parsed while analysing file                                                                 
     /Users/staabm/workspace/redaxo/redaxo/src/addons/diff_detect/lib/RssDiff.php                                                                                                 

     Post the following stack trace to https://github.com/phpstan/phpstan/issues/new?template=Bug_report.yaml:                                                                    
     ## /Users/staabm/workspace/redaxo/redaxo/src/addons/rexstan/vendor/nikolaposa/version/src/Exception/InvalidVersionString.php(16)                                             
     #0 /Users/staabm/workspace/redaxo/redaxo/src/addons/rexstan/vendor/nikolaposa/version/src/Version.php(65): Version\Exception\InvalidVersionString::notParsable('1.10')       
     #1 /Users/staabm/workspace/redaxo/redaxo/src/addons/rexstan/vendor/staabm/phpstan-todo-by/src/ReferenceVersionFinder.php(22): Version\Version::fromString('1.10')