Skip to content

SearchFilter: fix regression in 2.6.3 - #4134

Merged
alanpoulain merged 5 commits into
api-platform:2.6from
soyuka:fix/4128
Mar 16, 2021
Merged

SearchFilter: fix regression in 2.6.3#4134
alanpoulain merged 5 commits into
api-platform:2.6from
soyuka:fix/4128

Conversation

@soyuka

@soyukasoyuka commented Mar 12, 2021

Copy link
Copy Markdown
Member
QA
Branch?2.6
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#4128#4135
LicenseMIT
Doc PRna

@soyuka
soyukaforce-pushed the fix/4128 branch 4 times, most recently from 5a30c27 to ef89083CompareMarch 13, 2021 09:22
@soyukasoyuka changed the title SearchFilter: allow on datesSearchFilter: fix regression in 2.6.3Mar 13, 2021
Comment threadsrc/Bridge/Doctrine/Orm/Filter/SearchFilter.php Outdated
Comment threadsrc/Bridge/Doctrine/Orm/Filter/SearchFilter.php Outdated
Comment threadCHANGELOG.md
@alanpoulain
alanpoulain merged commit e74bf8e into api-platform:2.6Mar 16, 2021
@alanpoulain

Copy link
Copy Markdown
Member

Thanks @soyuka.

@odoucet

Copy link
Copy Markdown
Contributor

I'll try to provide a new MR that fixes the original issue (search on UUID) and being compatible with dates.

@alanpoulain

Copy link
Copy Markdown
Member

@odoucet Not just with dates, it needs to be compatible with different kind of Doctrine types (enum, etc.).
I don't think there is a proper solution other than a whitelist (and we don't want to have it).
I think the only way is to have a custom specific search filter, only for the binary uuid type.
I'm not sure we would want it in the core but you can try 🙂

@masacc

Copy link
Copy Markdown

Hello @soyuka, this rollback creates a BC break : when searching for a string that is an integer, it causes this error with SQL Server :

SQLSTATE[22018]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Conversion failed when converting the varchar value '%' to data type int.

it works fine on 2.6.3

Sign up for freeto 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.

4 participants

@soyuka@alanpoulain@odoucet@masacc