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

fix: adjust signature of inherited method #1616

Conversation

romm
Copy link
Contributor

@romm romm commented Dec 16, 2021

Infection currently requires:
symfony/finder:^3.4.29 || ^4.1.19 || ^5.0 || ^6.0

In version ^5.0, the signature of the following parameter changed:
MultiplePcreFilterIterator::toRegex(string $str)

In version ^6.0, the return type of the method changed as well.

To ensure inheritance compatibility, the signature of the method
RealPathFilterIterator::toRegex is changed.

Infection currently requires:
`symfony/finder:^3.4.29 || ^4.1.19 || ^5.0 || ^6.0`

In version ^5.0, the signature of the following parameter changed:
`MultiplePcreFilterIterator::toRegex(string $str)`

In version ^6.0, the return type of the method changed as well.

To ensure inheritance compatibility, the signature of the method
`RealPathFilterIterator::toRegex` is changed.
@romm
Copy link
Contributor Author

romm commented Dec 16, 2021

To give more context, I encountered this issue in this pipeline: https://github.com/CuyZ/Valinor/runs/4540940879?check_suite_focus=true#step:11:20

@sanmai sanmai added the Bugfix label Dec 16, 2021
Copy link
Member

@sanmai sanmai left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@maks-rafalko maks-rafalko left a comment

Choose a reason for hiding this comment

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

It is unfortunate our tests do not catch this.

yes. This can be tested after implementing what @sidz has suggested

IMO we need to test Infection against all supported versions.

similar what we did in infection/phpspec-adapter#12

@maks-rafalko maks-rafalko merged commit 6844063 into infection:master Dec 16, 2021
@maks-rafalko
Copy link
Member

Thank you @romm

@maks-rafalko maks-rafalko added this to the next milestone Dec 16, 2021
@maks-rafalko
Copy link
Member

Released: https://github.com/infection/infection/releases/tag/0.25.5

@romm
Copy link
Contributor Author

romm commented Dec 16, 2021

That was fast! Thank you for this awesome tool. 😊

@romm romm deleted the fix/compatibility-filter-class-method-signature branch December 16, 2021 15:20
@maks-rafalko maks-rafalko modified the milestones: next, 0.26.0 Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants