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

Make Selectable template covariant #330

Merged
merged 1 commit into from Sep 27, 2022

Conversation

greg0ire
Copy link
Member

With this, we express that one cannot use matching() to alter the templated type of a Selectable, which means that it is OK to pass a Selectable of a type to a method that accepts a Selectable of a parent type.

The drawback is that it is no longer possible to use methods defined in Collection on an object that is returned by matching().

With this, we express that one cannot use matching() to alter the
templated type of a Selectable, which means that it is OK to pass a
Selectable of a type to a method that accepts a Selectable of a parent
type.

The drawback is that it is no longer possible to use methods defined in
Collection on an object that is returned by matching().
@greg0ire greg0ire marked this pull request as ready for review September 24, 2022 17:31
@greg0ire greg0ire added this to the 2.0.0 milestone Sep 27, 2022
@greg0ire greg0ire merged commit f8cfcdd into doctrine:2.0.x Sep 27, 2022
@greg0ire greg0ire deleted the covariant-selectable branch September 27, 2022 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants