-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/add cursor for long request #10
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
Open
JoMessina
wants to merge
25
commits into
v0.2
Choose a base branch
from
feature/add-cursor-for-long-request
base: v0.2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 13 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
59dc7e2
Add logical cursor for long query parameters
JoMessina e7db160
fix type phpstan, manage api return's cursor with the array of parame…
JoMessina cb0cc3e
remove IGNORE_ENV_TRUE parameter for cs-fixer
JoMessina 2b2443f
Ignore a rule from phpstan
JoMessina a3cae97
fix from cs fixer
JoMessina 49487d4
change phpstan config for level 5
JoMessina 1deb047
Change a method name
JoMessina 7739f08
Refactored the way filters are handled
gplanchat fa3110f
[rector] Rector fixes
actions-user 8557f04
refacto extractors, add withGroups and withFilters methods
JoMessina 76e3b15
manage page count, fix extractor to use api pagination
JoMessina 1bf121b
fix and add tests for extractors
JoMessina 6d22048
[rector] Rector fixes
actions-user 68b0dae
Refactored the way filters are handled
gplanchat b9ba56b
Fixed errors in the unit tests
gplanchat ef45ba6
Fix client api version to 2.4
JoMessina c67ad88
[rector] Rector fixes
actions-user b110c44
Changed the variadic methods to use array_push instead of foreach
gplanchat 3c3a255
Merge remote-tracking branch 'origin/feature/add-cursor-for-long-requ…
JoMessina 77b53da
Fix client api version to 2.4
JoMessina 1ebac38
fix annotations for phpstan, fix endpoints on tests
JoMessina bcd3480
[rector] Rector fixes
actions-user 9dd01d1
lock symfony serializer package, symfony 7 change an interface Denorm…
JoMessina 602af15
update api-client-magento to lock symfony/serializer
JoMessina 9e44dc2
valid phpstan 7, use rector and cs-fixer
JoMessina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
parameters: | ||
level: 5 | ||
treatPhpDocTypesAsCertain: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Kiboko\Component\Flow\Magento2\Filter; | ||
|
||
final class ArrayFilter implements FilterInterface, \IteratorAggregate | ||
{ | ||
public function __construct( | ||
public string $field, | ||
public string $conditionType, | ||
public array $value, | ||
private readonly int $threshold = 200 | ||
) {} | ||
|
||
/** | ||
* @return \Traversable<int, {field: string, value: string, conditionType: string}> | ||
*/ | ||
public function getIterator(): \Traversable | ||
{ | ||
$length = count($this->value); | ||
for ($offset = 0; $offset < $length; $offset += $this->threshold) { | ||
yield [ | ||
'field' => $this->field, | ||
'value' => implode(',', array_slice($this->value, $offset, $this->threshold, false)), | ||
'conditionType' => $this->conditionType, | ||
]; | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Kiboko\Component\Flow\Magento2\Filter; | ||
|
||
/** | ||
* @extends \Traversable<int, {field: string, value: string, conditionType: string}> | ||
*/ | ||
interface FilterInterface extends \Traversable | ||
{ | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Kiboko\Component\Flow\Magento2\Filter; | ||
|
||
final class ScalarFilter implements FilterInterface, \IteratorAggregate | ||
{ | ||
public function __construct( | ||
public string $field, | ||
public string $conditionType, | ||
public bool|int|float|string|\DateTimeInterface $value, | ||
) {} | ||
|
||
public function getIterator(): \Traversable | ||
{ | ||
yield [ | ||
'field' => $this->field, | ||
'value' => $this->value, | ||
'conditionType' => $this->conditionType, | ||
]; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.