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

Pagination of Project Members #281

Merged
merged 14 commits into from
Apr 26, 2018
Merged

Pagination of Project Members #281

merged 14 commits into from
Apr 26, 2018

Conversation

tobiasetter
Copy link
Contributor

GitLab API per default defines 20 items per_page for the returned result. Now if a project has more than 20 members we have an issue with increasing the number of items to max i.e. 100.

Therefore I complemented your code.

Many thanks!

@fbourigault
Copy link
Contributor

Thank you for your contribution. Could you use the OptionsResolver like in https://github.com/m4tthumphrey/php-gitlab-api/blob/master/lib/Gitlab/Api/Projects.php#L35?

However, you have to do a little more work to not break BC. You will have to accept $username_query to be a string or an array and if it's a string, use it like the current code + trigger a deprecation notice. If it's an array or a null value, treat it as the argument you have to pass to OptionsResolver::resolve.

@tobiasetter
Copy link
Contributor Author

I had to remove deprecated notice, because it was catched by build ci.

Maybe you know another way to implement this deprecation notice. Thanks

@fbourigault
Copy link
Contributor

fbourigault commented Jan 15, 2018

You have to write @trigger_error.

@tobiasetter
Copy link
Contributor Author

tobiasetter commented Mar 29, 2018

@fbourigault thanks for your help.

@m4tthumphrey what do you think about a merge?

@m1guelpf
Copy link
Member

@fbourigault This is a breaking change. Maybe find a way to make it backwards-compatible?

@tobiasetter
Copy link
Contributor Author

@fbourigault What are the next steps? Do you want to merge or do we have to find a way to make it backwards-compatible as @m1guelpf suggested?

@tobiasetter
Copy link
Contributor Author

tobiasetter commented Apr 26, 2018

@m1guelpf It already is backwards compatible. There is only a notice triggered that the string parameter is being deprecated.

@tobiasetter
Copy link
Contributor Author

now it would also close issue #259

pull requests #310 and #286 both are resolved by this pull request

@tobiasetter
Copy link
Contributor Author

@20uf I would be very happy if you could approve my new changes

@m1guelpf
Copy link
Member

@tobiasetter Can you fix the tests?

@tobiasetter
Copy link
Contributor Author

@m1guelpf what do you mean? all tests were successful

@m1guelpf
Copy link
Member

@tobiasetter Sorry, I meant merge conflicts

@tobiasetter
Copy link
Contributor Author

@m1guelpf Sure, no problem =)

@m1guelpf m1guelpf merged commit dc11c09 into GitLabPHP:master Apr 26, 2018
@m1guelpf
Copy link
Member

@tobiasetter Thank you for your contribution!

@tobiasetter
Copy link
Contributor Author

@m1guelpf how about creating a new release?

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.

4 participants