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

chore: Use intersection types feature #565

Merged

Conversation

tienvx
Copy link
Contributor

@tienvx tienvx commented Apr 25, 2024

When running static code analysis on tests/, there will be a lot of errors like this:

Call to an undefined method PhpPact\SomeInterface|PHPUnit\Framework\MockObject\MockObject::expects().

This can be fixed by using intersection types instead of union types. This is a new feature from PHP 8.1 (lowest supported PHP version by Pact-PHP)

By doing this fix more than 110 errors (out of 218 errors) in #564

@tienvx tienvx requested a review from JP-Ellis April 25, 2024 05:02
@tienvx tienvx merged commit e46cba4 into pact-foundation:master Apr 25, 2024
26 checks passed
@tienvx tienvx deleted the use-intersection-types-feature branch April 25, 2024 05:07
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.

2 participants