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

SearchFilter: fix regression in 2.6.3 #4134

Merged
merged 5 commits into from
Mar 16, 2021
Merged

Conversation

soyuka
Copy link
Member

@soyuka soyuka commented Mar 12, 2021

Q A
Branch? 2.6
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #4128 #4135
License MIT
Doc PR na

@soyuka soyuka force-pushed the fix/4128 branch 4 times, most recently from 5a30c27 to ef89083 Compare March 13, 2021 09:22
@soyuka soyuka changed the title SearchFilter: allow on dates SearchFilter: fix regression in 2.6.3 Mar 13, 2021
@alanpoulain alanpoulain merged commit e74bf8e into api-platform:2.6 Mar 16, 2021
@alanpoulain
Copy link
Member

Thanks @soyuka.

@odoucet
Copy link
Contributor

odoucet commented May 6, 2021

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

@alanpoulain
Copy link
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

masacc commented Jun 10, 2021

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 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.

4 participants