Use more recent version of PHPStan and Rector#4
Conversation
|
Hey! Thanks for the effort! Sadly, this breaks some refactoring rules. Also, the new version of PHPStan is too new to work with PHP 7 (which would be nice to support in this project). Maybe this part of the PR could be undone/separate? |
To be more accurate, the version of PHPStan used here is not compatible with PHP 7.2. It is compatible with PHP 7.4. I am curious as to why this project has a requirement of PHP 7.2, rather than 7.4. My understanding is, that the best practice for upgrading dependencies using semantic versioning is to update to the highest minor version before upgrading to the next major version. I think it would be a reasonable expectation for users to have to upgrade to 7.4, if they are currently on another PHP version, before using this tool to upgrade to the next major version. I know there may be practical and technical exceptions to this rule, but it seems that the upgrade path from the current required version of 7.2 to 7.4 should be relatively straightforward using existing static analysis tools like PHPStan and Rector. My guess is that 7.2 was used because that is the version onOffice was running on the project that sparked the need to develop this tool. Are you open to raising the required version of PHP to 7.4 for this project if someone were to create a PR to make that happen? This would allow the use of newer versions of PHPStan and Rector. The low requirements for these tools, especially Rector, can make it prohibitive to use this tool on projects already using these tools. |
|
Closing for now, I understand the need to remain on low PHP 7 versions. |
Noticed this package used an older version of Rector and PHPStan, this updates this to their latest versions (had to fix some namespaces but that was it).