symfony-cmf / routing-auto-bundle

Adding automatic route generating on top of the symfony cmf routing
https://cmf.symfony.com
14 stars 29 forks source link

Doctrine ORM Support #223

Closed almacbe closed 5 years ago

almacbe commented 6 years ago
Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
License MIT

We create this PR to start to discuss ORM support with our solution that we use in all our projects during three years. Now, we think our solution it is enough mature and we can share and improve it.

There are things that we don't know how to improve or how to solve. For instance, we are coupled to knp doctrine behavior to support translations, we haven't implement tree behavior, how to organize classes for ORM and PHPCR, how to test them and more thing that maybe we can't see or we have missed them. Also, we have to think about how to solve the inherent issue with RoutingBundle\Model\Route.

Some ideas of how to test come from #184

Feel free to comment. We would really like to find a solution and merge.

almacbe commented 6 years ago

As you could see there were commits from 2015 :-P when we started this. I didn't rebase, I have done now.

almacbe commented 6 years ago

I am sorry but I don't understand you. Could you explain more the idea? Thanks!

dantleech commented 6 years ago

regarding the dependencies on the orm libraries and all that, i wonder if it would make sense to only do the refactoring to be more generic in this bundle, but have all of the actual orm support in its own package

I was thinking the same thing, so a routing-auto-orm-bundle ? And the work in this bundle would just be ensuring that it is flexible enough (adding / fixing extension points).

almacbe commented 6 years ago

some new ideas about this? @dbu @dantleech I am not sure what it is the idea behind your last comments.

dbu commented 6 years ago

we think it is better to create a separate routing-auto-orm-bundle and in this repository only refactor things so they are generic and reusable by the orm routing auto bundle, rather than adding all the orm code in here. then we can also model dependencies correctly in composer.json

almacbe commented 6 years ago

I see. Then, what are the next steps? or I'm not sure how to work in that way, some ideas?

dbu commented 6 years ago

the next steps would be to create a repository where you can put the orm auto routing code, and remove from this PR all orm things. make your repository use this branch to be able to test that things work. once it works fine, we can transfer the orm auto routing repository to the cmf organization and give you maintainer rights on it.

almacbe commented 6 years ago

ok! great! I understand. Thanks @dbu

dbu commented 6 years ago

awesome, looking forward to this! glad we finally get to support orm in auto routing. and happy if @dantleech can keep in the loop to advise, i think he knows the auto routing best of us.

almacbe commented 6 years ago

Hello @dbu @dantleech Finally, I have something to show you about this topic.

First, I have adapted this bundle to allow overwrite some stuff and allow ORM support. You can find the PR #226

On other hands, I have created this bundle wearemarketing/routing-auto-orm-bundle where live the code of the ORM support for routing auto bundle.

When you can, give me some feedback about them.

almacbe commented 5 years ago

We can follow the thread on this https://github.com/symfony-cmf/routing-auto-bundle/pull/226