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

[Repository] Impossible to use a repository that implements ServiceEntityRepositoryInterface #855

Open
Nek- opened this issue Feb 23, 2024 · 0 comments

Comments

@Nek-
Copy link

Nek- commented Feb 23, 2024

Sylius version affected: all

Description
It is possible to use a repository that inherits from ServiceEntityRepository but not a repository that "just" implements ServiceEntityRepositoryInterface. Besides it's useful when you already extends from some other base repository.

Steps to reproduce

  1. Create a repository that implements ServiceEntityRepositoryInterface
  2. Use it in the resource bundle config

Possible Solution

Check against the interface instead of the class.

if (is_a($repositoryClass, ServiceEntityRepository::class, true)) {

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

1 participant