8000 Doctrine & Symfony tight coupling · Issue #18665 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Doctrine & Symfony tight coupling #18665

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

Closed
devrck opened this issue Apr 28, 2016 · 5 comments
Closed

Doctrine & Symfony tight coupling #18665

devrck opened this issue Apr 28, 2016 · 5 comments

Comments

@devrck
Copy link
Contributor
devrck commented Apr 28, 2016

If you want to declare another AppKernel a more lightweight version that only uses Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), along with others of my own, you must include Symfony\Bundle\FrameworkBundle\FrameworkBundle() because annotation reader is declared in FrameworkBundle() but the classes for the annotation reader are from Doctrine, and that is strange because the Symfony Framework IMHO should have its own implementation(that implies duplicate code in a way, but its independent). My question is why did you make this decision? I don't see how Symfony will work without Doctrine, and IMHO its a very tight coupling.

@fabpot
Copy link
Member
fabpot commented Apr 28, 2016

Doctrine annotations is separate from Doctrine ORM. And DoctrineBundle is all about the Doctrine ORM. So, there is no coupling here. We are just using a library doing annotations parsing which happens to come from the Doctrine guys.

@devrck
Copy link
Contributor Author
devrck commented Apr 28, 2016

Ok the hole process come from the fact that i want to write a more lightweight version of AppKernel for the use in a console application along with RabbitMQBundle and to reduce the memory footprint of consumers. So I started to cut piece by piece bundles I don't need and when it comes to FrameworkBundle() I can't seem to remove it because of this issue with the annotation reader. Do you have any suggestions regarding my problem?

Also I understand what you said earlier and it was my mistake to draw some eager conclusions. But still you have to have Doctrine installed for the symfony app to work right?

@theofidry
Copy link
Contributor

@devckonem you might want to check #15748. Also if you want the minimal version I recommend you to start with the empty edition instead of the standard one, will make your life easier.

@javiereguiluz
Copy link
Member

@devckonem maybe you can checkout Symfony Microkernel too.

@stof
Copy link
Member
stof commented Apr 28, 2016

So I started to cut piece by piece bundles I don't need and when it comes to FrameworkBundle() I can't seem to remove it because of this issue with the annotation reader. Do you have any suggestions regarding my problem?

Well, DoctrineBundle depends on FrameworkBundle. So you cannot remove FrameworkBundle if you want to enable DoctrineBundle

@fabpot fabpot closed this as completed Apr 29, 2016
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

5 participants
0