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

Use count value of request #19

Merged
merged 4 commits into from
Nov 2, 2017
Merged

Use count value of request #19

merged 4 commits into from
Nov 2, 2017

Conversation

mmachatschek
Copy link
Contributor

This will resolve #18

@howad Should we add a exception if the number if items exceeds the count value?

@mmachatschek mmachatschek self-assigned this Oct 6, 2017
Copy link
Collaborator

@howard howard left a comment

Choose a reason for hiding this comment

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

  • Better clarity on added docs is possible.
  • Do you see a way to provoke the number of items and the count value to be different in a unit test?

@@ -63,10 +63,11 @@ protected function __construct($itemsPerPage)
* @param array $items Array of items to serialize. All of them are serialized, regardless of $start and $total.
* @param int $start Assuming that $items is a fragment of the total, this is the global index of the first item in
* $items.
* @param int $count The number of items processed per export step.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Given the peculiar meaning of this value we discussed, the documentation should mention that this is the number of expected items, and does not necessarily have to match the actual number in case of problems for individual items.

Copy link

Choose a reason for hiding this comment

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

Possible text: The number of items requested for this export step. Actual number of items can be smaller due to errors, and can not be greater than the requested count, because that would indicate that the requested count is ignored when generating items.

@@ -76,10 +77,11 @@ protected function __construct($itemsPerPage)
* @param array $items Array of items to serialize. All of them are serialized, regardless of $start and $total.
* @param int $start Assuming that $items is a fragment of the total, this is the global index of the first item in
* $items.
* @param int $count The number of items processed per export step.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Given the peculiar meaning of this value we discussed, the documentation should mention that this is the number of expected items, and does not necessarily have to match the actual number in case of problems for individual items.

Copy link

Choose a reason for hiding this comment

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

Possible text: The number of items requested for this export step. Actual number of items can be smaller due to errors, and can not be greater than the requested count, because that would indicate that the requested count is ignored when generating items.

@howard howard merged commit 01ff019 into develop Nov 2, 2017
@howard howard deleted the use_count_value_of_request branch November 2, 2017 15:52
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.

count attribute in XML should always reflect the count value from the export request
2 participants