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

fix(Pagination): Fix UUID in range filter #4595

Closed
wants to merge 19 commits into from

Conversation

KDederichs
Copy link
Contributor

Q A
Branch? main (cause I used the new project structure)
Tickets api-platform/api-platform#2087
License MIT
Doc PR none

Turns out the things I was running into were a bug caused by the range filter expecting numbers.
Which doesn't work when you use UUIDs as PK :)

@KDederichs
Copy link
Contributor Author

Ok the behat 7.1 fails cause the test can't init the UUID v6 objects.
I'm not really familiar with behat, is there a way to skip a test if a class is missing?

@KDederichs
Copy link
Contributor Author

Or better why still test for 7.1?
It's long past EOL

@Chris53897
Copy link
Contributor

Or better why still test for 7.1? It's long past EOL

Symfony backwards compatibility promise.
Symfony 4.4 php 7.1

@KDederichs
Copy link
Contributor Author

Ok skipping the test it is then (took me a while to figure out how to do that in behat but I gave it a custom tag that can be removed when 7.1 is dropped

@KDederichs KDederichs changed the title Fix UUID in range fix(Pagination): Fix UUID in range filter Dec 22, 2021
@KDederichs
Copy link
Contributor Author

All green except deprecations 👍

@soyuka
Copy link
Member

soyuka commented Mar 11, 2022

This should be moved to its own filter.

@KDederichs
Copy link
Contributor Author

@soyuka should it though?
You can also have a range on a string imo. But if you want I can close this and make a new PR that introduces something like UuidRange or something and then also adds that to the docs.

@KDederichs
Copy link
Contributor Author

Closing in favour of #4689
@soyuka if you'd take a look at that one I'd be grateful :)

@KDederichs KDederichs closed this Mar 22, 2022
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