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

Do not accept empty condition list if unnecessary #162

Open
joorei opened this issue Jun 11, 2024 · 0 comments
Open

Do not accept empty condition list if unnecessary #162

joorei opened this issue Jun 11, 2024 · 0 comments
Labels
bc break Solving the issue will most likely break backward compatibility in some way. good first issue Good for newcomers quality improvement Enhancement of existing features
Milestone

Comments

@joorei
Copy link
Collaborator

joorei commented Jun 11, 2024

RepositoryInterface::assertMatchingEntity accepts an empty list of conditions, which implies the method could perform any logic on such input. But it will in fact always simply return without an exception.

This distinction is important to set its purpose apart from FilterableTypeInterface::assertMatchingEntity, which correctly accepts an empty list of conditions, as those are optional and the method may additionally apply internal conditions defined by the implementation (e.g. such inheriting from AbstractResourceType).

@joorei joorei added good first issue Good for newcomers bc break Solving the issue will most likely break backward compatibility in some way. labels Jun 11, 2024
@joorei joorei added this to the 1.0.0 milestone Jun 11, 2024
@joorei joorei added the quality improvement Enhancement of existing features label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bc break Solving the issue will most likely break backward compatibility in some way. good first issue Good for newcomers quality improvement Enhancement of existing features
Projects
None yet
Development

No branches or pull requests

1 participant