mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
Autowire problem ? #5947
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @public0 on GitHub (Apr 10, 2018).
Originally assigned to: @Ocramius on GitHub.
We decided to use work with YAML instead of Annotations and also not use autowire but instead register our services in services.yaml.
I made a custom query in a repo which i'm calling in a service which in turn is called in the controller.
Controller:
TagService
TagRepository
App\Entity\Tag
If my repo extends ServiceEntityRepository i get this where it says it can't find this service
The "App\Repository\TagRepository" entity repository implements "Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepositoryInterface", but its service could not be found. Make sure the service exists and is tagged with "doctrine.repository_service".
But if i extend EntityRepository instead of ServiceEntityRepository it works
@Nek- commented on GitHub (Apr 10, 2018):
Hello,
This problem is not related to Doctrine itself but to the DoctrineBundle of Symfony.
If you have questions, consider StackOverflow or the Slack chat of Symfony. Also please give more information next time because without your service definition and namespaces it's not possible to help you on a problem of service declaration :) .
Please close this issue as it is not related to Doctrine at all.
PS: You can enable syntax coloration of the code by using better the markdown. That would be great for your next messages.
@Ocramius commented on GitHub (Apr 10, 2018):
Closing as per @Nek-'s comment
@sewi-cpan commented on GitHub (Aug 16, 2019):
@Nek- An answer would have been great instead of linking to a chat. There's no answer on StackOverflow and no usable documentation. Could you edit and enhance your reply, please?
@Nek- commented on GitHub (Aug 22, 2019):
@sewi-cpan a problem relative to user code without user code or reproducer is not resolvable. Sorry. I mentioned it btw.
Please, be kind with OSS contributors. We do our best, for free.