Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Upgrade to PHPStan 2.x and Rector 2.x #777

Merged
merged 1 commit into from
Dec 12, 2024

Conversation

oliverklee
Copy link
Contributor

@oliverklee oliverklee commented Dec 12, 2024

No description provided.

@oliverklee oliverklee added dependencies Pull requests that update a dependency file cleanup labels Dec 12, 2024
@oliverklee oliverklee requested a review from JakeQZ December 12, 2024 10:35
@oliverklee oliverklee self-assigned this Dec 12, 2024
github-actions[bot]

This comment was marked as off-topic.

@coveralls
Copy link

coveralls commented Dec 12, 2024

Coverage Status

coverage: 38.583%. remained the same
when pulling 3580e45 on task/update-rector-phpstan
into 36de90d on main.

@oliverklee oliverklee removed the request for review from JakeQZ December 12, 2024 11:18
@oliverklee oliverklee marked this pull request as draft December 12, 2024 11:18
@oliverklee
Copy link
Contributor Author

For this change, we'll need to drop support for PHP < 7.4 first.

@JakeQZ
Copy link
Contributor

JakeQZ commented Dec 12, 2024

For this change, we'll need to drop support for PHP < 7.4 first.

PHP 7.4 just becomes a dev requirement, not a minimum requirement for the package. Ideally we can find a way of running the versions of the tools compatible with the version contraints. Oh, Composer. It's what it's there for.

Copy link
Contributor

@JakeQZ JakeQZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An OR-list for the versions in composer.json would solve the dependency hell issue. It's what it's there for. There's no reason to drop support for PHP<7.4.

composer.json Outdated
Comment on lines 32 to 33
"phpstan/phpstan": "2.0.3",
"phpstan/phpstan-phpunit": "2.0.1",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need an OR-list of versions, e.g. "phpstan/phpstan": ".12.0 || 2.0.3". That way we can have the new version installed when the PHP environment allows, whilst also continuing to support older PHP versions.

Also add some more return type declarations as added by the new
Rector version.
@oliverklee oliverklee force-pushed the task/update-rector-phpstan branch from d10a5ca to 3580e45 Compare December 12, 2024 12:06
@oliverklee oliverklee marked this pull request as ready for review December 12, 2024 12:07
@oliverklee oliverklee requested a review from JakeQZ December 12, 2024 12:07
Copy link
Contributor

@JakeQZ JakeQZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WFM. We can deal with the PHPStan-reported issues at a later stage.

Comment on lines +21 to +22
- dependency-name: "phpunit/phpunit"
versions: [ ">= 9.0.0" ]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we probably don't want the bot to try a major update of PHPUnit, which would be incompatible.

@JakeQZ JakeQZ merged commit 72899b5 into main Dec 12, 2024
22 checks passed
@JakeQZ JakeQZ deleted the task/update-rector-phpstan branch December 12, 2024 12:33
@JakeQZ
Copy link
Contributor

JakeQZ commented Dec 12, 2024

I removed the non-applicable commit message that was separately done with #778.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants