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

fix: Fix the parameter name of the first and last methods #730

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

marien-probesys
Copy link
Contributor

This PR fixes the documentation of the Persistent*ObjectFactory first() and last() methods.

I discovered the issue when calling MyFactory::first(sortedField: 'field') with the error:

Error: Unknown named parameter $sortedField

Indeed, the parameter is now named sortBy.

Then I realized that the field needed to be renamed also in the MakeFactoryPHPDocMethod class.

Finally, I also fixed the parameter name in the *RepositoryDecorator::last() method to be more coherent (the name was correct in the first() method).

@nikophil
Copy link
Member

nikophil commented Dec 5, 2024

nice! thank you @marien-probesys

@nikophil nikophil merged commit 403d9e9 into zenstruck:2.x Dec 5, 2024
38 checks passed
@marien-probesys marien-probesys deleted the doc/fix-sort-by-doc branch December 5, 2024 10:54
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.

2 participants