Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: RepositoryAssertion::exist() $criteria should allow mixed#1007

Merged
nikophil merged 1 commit into
zenstruck:2.xfrom
nikophil:fix/exists-criteria-not-array
Oct 17, 2025
Merged

fix: RepositoryAssertion::exist() $criteria should allow mixed#1007
nikophil merged 1 commit into
zenstruck:2.xfrom
nikophil:fix/exists-criteria-not-array

Conversation

@nikophil
Copy link
Copy Markdown
Member

@nikophil nikophil commented Oct 16, 2025

fixes #1004

@Fabrn
Copy link
Copy Markdown

Fabrn commented Oct 16, 2025

Oh so you rather allow mixed instead of forcing array ? I guess it's perfectly fine however I would have thought that you would rather make $criteria an array for each method of the RepositoryAssertions class

@nikophil
Copy link
Copy Markdown
Member Author

nikophil commented Oct 16, 2025

I do think MyFactory::assert()->exists($id) is a valid use case

moreover, this PR reverts a previous PR where I introduced a BC break

@nikophil nikophil merged commit 3c6faff into zenstruck:2.x Oct 17, 2025
73 checks passed
@nikophil nikophil deleted the fix/exists-criteria-not-array branch October 17, 2025 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

RepositoryAssertions exists methods type declaration

2 participants