-
Notifications
You must be signed in to change notification settings - Fork 47
Bugfix/246 batch list desc #252
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
Conversation
src/Core/Batch.php
Outdated
| // todo checked that sorting is set as "order": {"ID": "ASC"} i.e. the developer understands that the data will arrive in this order | ||
| // todo checked that if there is a limit, then it is >1 | ||
| // todo checked that there is no ID field in the filter, since we will work with it | ||
| // Determine sort direction and ID key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add link to documentation with explanation for big cost for count operations
| /** | ||
| * Returns relative path to previous ID value | ||
| */ | ||
| protected function getReferenceFieldPath(string $prevCommandId, int $lastIndex, string $keyId, bool $isCrmItemsInBatch): string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add to criteria for get traversableList support for id pointers in previous batch results
| /** | ||
| * Extracts elements from batch request result | ||
| */ | ||
| protected function extractElementsFromBatchResult(ResponseData $responseData, bool $isCrmItemsInBatch): array { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add array shape type hints for result
| use PHPUnit\Framework\TestCase; | ||
| use Symfony\Component\Uid\Uuid; | ||
|
|
||
| #[CoversClass(Batch::class)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add test for
$result[request_id][response_field]
Feature
Updated in Core\Batch getTraversableList(), getTraversableListWithCount(); modified BatchOperationsInterface and unit-test NullBatch to be compatible with getTraversableListWithCount(). Added tests into tests/Integration/Core/BatchTraversableListTest.php
Additionally: