[Doctrine] SearchFilter - Use abitrary index instead of value#5079
Conversation
0c4a2ed to
729aca1
Compare
|
Could you please add unit tests? |
fa45aac to
9ca1f93
Compare
Is that enough ? Not sure what I could add more 🤔 |
Yes, that's enough 🙂 You need to change the |
|
nice catch |
|
how was this in 2.6 ? I think that we could fix this on 3.0 instead, 2.7 should have only bc-layer related fixes. Unless this was wrongly introduced in 2.7 we may fix it here. |
9ca1f93 to
3b89b7e
Compare
I do think this was here since a long time, I'll change the branch to |
3b89b7e to
b4a9ba7
Compare
|
Thanks @Korbeil ! |
* fix: update yaml extractor test file coding standard (#5068) * fix(graphql): add clearer error message when TwigBundle is disabled but graphQL clients are enabled (#5064) * fix(metadata): add class key in payload argument resolver (#5067) * fix: add class key in payload argument resolver * add null if everything else goes wrong * fix: upgrade command remove ApiSubresource attribute (#5049) Fixes #5038 * fix(doctrine): use abitrary index instead of value (#5079) * fix: uri template should respect rfc 6570 (#5080) * fix: remove @internal annotation for Operations (#5089) See #5084 * fix(metadata): define a name on a single operation (#5090) fixes #5082 * fix(metadata): deprecate when user decorates in legacy mode (#5091) fixes #5078 * fix(graphql): use right nested operation (#5102) * Revert "fix(graphql): use right nested operation (#5102)" (#5111) This reverts commit 44337dd. * fix(graphql): always allow to query nested resources (#5112) * fix(graphql): always allow to query nested resources * review Co-authored-by: Alan Poulain <[email protected]> * chore: php-cs-fixer update * fix: only alias if exists for opcache preload Fixes api-platform/api-platform#2284 (#5110) Co-authored-by: Liviu Mirea <[email protected]> * chore: php-cs-fixer update (#5118) * chore: php-cs-fixer update * chore: php-cs-fixer update * fix(metadata): upgrade script keep operation name (#5109) origin: #5105 Co-authored-by: WilliamPeralta <[email protected]> * chore: v2.7.3 changelog * chore: v3.0.3 changelog Co-authored-by: helyakin <[email protected]> Co-authored-by: ArnoudThibaut <[email protected]> Co-authored-by: davy-beauzil <[email protected]> Co-authored-by: Baptiste Leduc <[email protected]> Co-authored-by: Xavier Laviron <[email protected]> Co-authored-by: Alan Poulain <[email protected]> Co-authored-by: Liviu Cristian Mirea-Ghiban <[email protected]> Co-authored-by: Liviu Mirea <[email protected]> Co-authored-by: WilliamPeralta <[email protected]>
* -create AdvancedSearchFilter * -fix dependencies * -fix dependencies * -fix dependencies * -fix dependencies * -fix dependencies * -fix dependencies * -rollback * -sync with api-platform/core#5079 * -fix ecs * -fix typo * -refactoring * -fix ecs * -refactoring * -fix phpstan * -refactoring * -fix ecs * -update composer.json * -update composer.json * -rename Stubs to Fixtures * -rename Stubs to Fixtures * -rename Stubs to Fixtures * -refactoring * -refactoring * -fix phpstan * -rollback changes * -fix deps
* -create AdvancedSearchFilter * -fix dependencies * -fix dependencies * -fix dependencies * -fix dependencies * -fix dependencies * -fix dependencies * -rollback * -sync with api-platform/core#5079 * -fix ecs * -fix typo * -refactoring * -fix ecs * -refactoring * -fix phpstan * -refactoring * -fix ecs * -update composer.json * -update composer.json * -rename Stubs to Fixtures * -rename Stubs to Fixtures * -rename Stubs to Fixtures * -refactoring * -refactoring * -fix phpstan * -rollback changes * -fix deps
* -create AdvancedSearchFilter * -fix dependencies * -fix dependencies * -fix dependencies * -fix dependencies * -fix dependencies * -fix dependencies * -rollback * -sync with api-platform/core#5079 * -fix ecs * -fix typo * -refactoring * -fix ecs * -refactoring * -fix phpstan * -refactoring * -fix ecs * -update composer.json * -update composer.json * -rename Stubs to Fixtures * -rename Stubs to Fixtures * -rename Stubs to Fixtures * -refactoring * -refactoring * -fix phpstan * -rollback changes * -fix deps
When using a search filter with multiple values that have the same lowercase identity, for example:
SearchFilter will lowercase the value and use it as index key, which makes it send only one parameter to Doctrine when it needs two of them.
I choosed to leave the arbitrary array index so we don't have this kind of issues anymore.