Skip to content

Use more recent version of PHPStan and Rector#4

Closed
Brammm wants to merge 1 commit into
onOfficeGmbH:mainfrom
Brammm-forks:main
Closed

Use more recent version of PHPStan and Rector#4
Brammm wants to merge 1 commit into
onOfficeGmbH:mainfrom
Brammm-forks:main

Conversation

@Brammm

@Brammm Brammm commented Feb 11, 2026

Copy link
Copy Markdown

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).

@jayay

jayay commented Feb 12, 2026

Copy link
Copy Markdown
Collaborator

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?

@jdevinemt

Copy link
Copy Markdown
Contributor

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.

@Brammm

Brammm commented Feb 16, 2026

Copy link
Copy Markdown
Author

Closing for now, I understand the need to remain on low PHP 7 versions.

@Brammm Brammm closed this Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants