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(hydra): remove dependency from ApiPlatform/Api dependency #6154

Merged

Conversation

aegypius
Copy link
Contributor

Q A
Branch? main
Tickets n/a
License MIT
Doc PR n/a

This PR purpose is to resolve issue with the splitted version.

ApiPlatform/Api is not exported in any components, the FilterLocatorTrait cannot be loaded.

This is a quick & dirty workaround that solves the 3.3.0-alpha.1 issue but I think we must find abetter way to solve and provide the filters.

We could describle a FilterRegistryInterface in ApiPlatform/Metadata and inject it in the variouscomponents that relies on this feature (Hydra, ParameterValidator) the symfony component could fill an implementation of this registry and inject it.

/**
* Gets a filter with a backward compatibility.
*/
private function getFilter(string $filterId): FilterInterface|null
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's fine to keep this here imo we don't need the trait

@soyuka soyuka marked this pull request as ready for review February 16, 2024 08:27
@soyuka soyuka merged commit c01e10f into api-platform:main Feb 16, 2024
70 of 72 checks passed
@aegypius aegypius deleted the break-dependency-from-legacy-namespace branch February 16, 2024 13:46
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.

None yet

2 participants