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

[Bug] Default *DataProvider priority is the same than custom Providers #950

Closed
Cethy opened this issue Jan 10, 2019 · 5 comments
Closed

Comments

@Cethy
Copy link

Cethy commented Jan 10, 2019

Since I updated to v2.3.5, the order of my project's DataProvider is messed up : the default CollectionDataProvider is tagged before my custom ones, so it is called instead.

As per the documentation, one will expect the custom DataProviders to be always called before the default ones. Additionally, this is really error-prone since it could be hard to catch.

Shouldn't the default DataProviders have a negative priority by default ?

@mmarynich
Copy link

@Cethy Read it, solution is here symfony/symfony#29836

@Cethy
Copy link
Author

Cethy commented Jan 11, 2019

@mmarynich Thx a lot for the read. :)

I'll keep explicit configuration for now then (positive priority for custom DataProvider).
But I still think API-Platform should be patch to not rely on the magic default sorting mechanism (opposed to explicit priority).

@mmarynich
Copy link

mmarynich commented Jan 11, 2019

@Cethy I completely agree with you.
@dunglas What do you think about this ?

@mmarynich
Copy link

I have done a PR
symfony/symfony#29853

@suyar
Copy link

suyar commented Sep 25, 2020

I think it should be fixed.

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

No branches or pull requests

4 participants