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

Remove string type declaration of parameter #1639

Merged
merged 1 commit into from Jan 8, 2022

Conversation

maks-rafalko
Copy link
Member

Fixes #1635

because:

  • Covariance allows a child's method to return a more specific type than the return type of its parent's method.
  • Contravariance allows a parameter type to be less specific in a child method, than that of its parent.

No test here, as I don't know how (and don't want) to mock parent class, but the proper test would be to test Infection with different supported Symfony versions, which is still not done

Fixes #1635

because:

* Covariance allows a child's method to return a more specific type than the return type of its parent's method.
* Contravariance allows a parameter type to be less specific in a child method, than that of its parent.
@maks-rafalko maks-rafalko changed the base branch from master to 0.25 January 8, 2022 12:48
@maks-rafalko maks-rafalko merged commit bded758 into 0.25 Jan 8, 2022
@maks-rafalko maks-rafalko deleted the bugfix/symfony-signature branch January 8, 2022 13:06
maks-rafalko added a commit that referenced this pull request Jan 8, 2022
Fixes #1635

because:

* Covariance allows a child's method to return a more specific type than the return type of its parent's method.
* Contravariance allows a parameter type to be less specific in a child method, than that of its parent.
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.

Incompatible declaration of RealPathFilterIterator::toRegex()
1 participant