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: use stateOptions when retrieving a Parameter filter #6728

Conversation

vinceAmstoutz
Copy link

Q A
Branch? 3.4
Tickets Closes #6682
License MIT

As mentioned in #6682, QueryParamter on DTO with stateOptions doesn't work. This PR will solve this problem by applying stateOptions to the ParameterResourceMetadataCollectionFactory.

@vinceAmstoutz vinceAmstoutz marked this pull request as draft October 15, 2024 14:25
@vinceAmstoutz vinceAmstoutz force-pushed the fix-query-parameter-on-dto-with-state-options branch 2 times, most recently from a2c48a9 to 11cc1e5 Compare October 15, 2024 14:44
@vinceAmstoutz vinceAmstoutz force-pushed the fix-query-parameter-on-dto-with-state-options branch from 11cc1e5 to 0affd52 Compare October 15, 2024 18:56
Replaced state options logic in `ParameterResourceMetadataCollectionFactory` with a new method `getClassFromStateOptions`. This simplifies the code by centralizing the logic in the `Metadata` class and improves readability.
@vinceAmstoutz vinceAmstoutz force-pushed the fix-query-parameter-on-dto-with-state-options branch from 7f2128d to 55f4c94 Compare October 15, 2024 19:14
@vinceAmstoutz vinceAmstoutz force-pushed the fix-query-parameter-on-dto-with-state-options branch from 1fedd26 to 1fd61cb Compare October 15, 2024 19:22
@soyuka soyuka force-pushed the fix-query-parameter-on-dto-with-state-options branch from 20f4b70 to c605174 Compare October 16, 2024 07:42
@vinceAmstoutz vinceAmstoutz marked this pull request as ready for review October 16, 2024 07:51
@soyuka soyuka changed the title fix(QueryParameter): try to improve handling of stateOptions fix: try to improve handling of stateOptions Oct 16, 2024
@soyuka soyuka changed the title fix: try to improve handling of stateOptions fix: use stateOptions when retrieving a Parameter Doctrine filter Oct 16, 2024
@soyuka soyuka force-pushed the fix-query-parameter-on-dto-with-state-options branch from c605174 to fe4bce4 Compare October 16, 2024 08:16
@soyuka soyuka changed the title fix: use stateOptions when retrieving a Parameter Doctrine filter fix: use stateOptions when retrieving a Parameter filter Oct 16, 2024
@soyuka soyuka merged commit d34cd7b into api-platform:3.4 Oct 16, 2024
78 checks passed
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.

2 participants