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 #1376

Merged
merged 1 commit into from
Dec 12, 2024
Merged

Conversation

oliverklee
Copy link
Contributor

We'll allow assertInstanceOf checks in the tests again in a later change.

@oliverklee oliverklee added the dependencies Pull requests that update a dependency file label Dec 12, 2024
@oliverklee oliverklee added this to the 8.0.0 milestone Dec 12, 2024
@oliverklee oliverklee requested a review from JakeQZ December 12, 2024 10:35
@oliverklee oliverklee self-assigned this Dec 12, 2024
@coveralls
Copy link

coveralls commented Dec 12, 2024

Coverage Status

coverage: 97.062%. remained the same
when pulling 597ee7f on task/update-rector-phpstan
into 829cf37 on main.

@oliverklee oliverklee modified the milestones: 8.0.0, 9.0.0 Dec 12, 2024
@oliverklee oliverklee removed the request for review from JakeQZ December 12, 2024 11:19
@oliverklee oliverklee marked this pull request as draft December 12, 2024 11:19
@oliverklee
Copy link
Contributor Author

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

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.

It looks like we'd need have a minimum dev requirement of PHP 7.4 for this upgrade, whilst there would no such requirement for users of the package. Is such a configuration possible?

Comment on lines -10 to -12

# Allow instanceof checks, particularly in tests
checkAlwaysTrueCheckTypeFunctionCall: false
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree this check should not be disabled per se, and if possible the setting could be applied on a per directory basis: i.e. for tests which can by static analysis be proven to pass. Though I'd quite like the double confirmation.

@JakeQZ
Copy link
Contributor

JakeQZ commented Dec 12, 2024

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

It's just a dev requirement.

@oliverklee
Copy link
Contributor Author

It looks like we'd need have a minimum dev requirement of PHP 7.4 for this upgrade, whilst there would no such requirement for users of the package. Is such a configuration possible?

No, not as far as I know.

@oliverklee
Copy link
Contributor Author

We could allow both versions, though.

@JakeQZ
Copy link
Contributor

JakeQZ commented Dec 12, 2024

We could allow both versions, though.

Yes, I think that's the solution, with || versions in Composer.

We'll allow `assertInstanceOf` checks in the tests again in a
later change.
@oliverklee oliverklee force-pushed the task/update-rector-phpstan branch from 8c04331 to 597ee7f Compare December 12, 2024 11:53
@oliverklee oliverklee modified the milestones: 9.0.0, 8.0.0 Dec 12, 2024
@oliverklee oliverklee marked this pull request as ready for review December 12, 2024 11:53
@oliverklee oliverklee requested a review from JakeQZ December 12, 2024 11:55
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.

This works, I think.

Comment on lines 19 to +24
ignore:
- dependency-name: "phpstan/*"
- dependency-name: "phpunit/phpunit"
versions: [ ">= 10.0.0" ]
- dependency-name: "rawr/cross-data-providers"
- dependency-name: "rector/rector"
Copy link
Contributor

Choose a reason for hiding this comment

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

I presume that the GitHub action is unable to cope with OR depencies. This can be revisted later if and when it is able.

@JakeQZ JakeQZ merged commit e6c33d9 into main Dec 12, 2024
29 checks passed
@JakeQZ JakeQZ deleted the task/update-rector-phpstan branch December 12, 2024 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants