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 TKey template keyword in `ElementCollection generics #14271

Merged
merged 1 commit into from
Feb 3, 2024

Conversation

nfourtythree
Copy link
Contributor

Description

Currently, we are specifying two generics keywords, however we are never needing to specify the first one (TKey) anywhere in the code.

Removing it simplifies anything trying to extend or implement the ElementCollection class as you do not need to specify both values.

When using @extends or @var tags they can take multiple arguments, separated by comma - in the same order the types are defined in the class

This change means we can go from ElementCollection<array-key, Address> to simply ElementCollection<Address> as we are now only specifying one @template keyword.

@nfourtythree nfourtythree self-assigned this Feb 2, 2024
Copy link
Contributor

@timkelty timkelty left a comment

Choose a reason for hiding this comment

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

I was there!

@brandonkelly brandonkelly merged commit 0ad3fdd into 5.0 Feb 3, 2024
6 checks passed
@brandonkelly brandonkelly deleted the bugfix/query-collection-generics branch February 3, 2024 02:24
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.

3 participants