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

Define the proper type for the SolariumAdapter #59

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

stof
Copy link
Contributor

@stof stof commented Dec 13, 2024

This adapter is always working with Solarium's DocumentInterface so it does not need to be generic.

This adapter is always working with Solarium's DocumentInterface so it
does not need to be generic.
* @param int<0, max> $offset
* @param int<0, max> $length
*
* @return iterable<array-key, T>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

instead of updating those phpdoc types (replacing T with DocumentInterface), I chose to remove it entirely. They are not necessary as phpstan will properly inherit this info from the AdapterInterface.

@stof
Copy link
Contributor Author

stof commented Dec 13, 2024

The current phpstan failure is unrelated to this PR (and is fixed in #58)

@mbabker mbabker merged commit 57b114f into BabDev:4.x Dec 13, 2024
62 of 63 checks passed
@mbabker
Copy link
Member

mbabker commented Dec 13, 2024

Thanks!

@stof stof deleted the solarium_types branch December 13, 2024 13:10
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