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

Cannot autowire service for repository #1956

Open
lektura0bandyta opened this issue Nov 10, 2024 · 0 comments
Open

Cannot autowire service for repository #1956

lektura0bandyta opened this issue Nov 10, 2024 · 0 comments

Comments

@lektura0bandyta
Copy link

lektura0bandyta commented Nov 10, 2024

Hi,

I've created UserRepository and correctly declared repository class in fos_elastica.yaml as it is in https://github.com/FriendsOfSymfony/FOSElasticaBundle/blob/master/doc/cookbook/custom-repositories.md but symfony cannot autowire service.

I'm getting error like this:

Cannot autowire service "App\ElasticRepository\UserRepository": argument "$finder" of method 
"FOS\ElasticaBundle\Repository::__construct()" references interface 
"FOS\ElasticaBundle\Finder\PaginatedFinderInterface" but no such service exists. 
You should maybe alias this interface to one of these existing services: "fos_elastica.finder.user", "fos_elastica.finder.city".

Does any one know why it won't works?

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