Skip to content

[WIP] ORM based dynamic routing #122

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

Merged
merged 9 commits into from
Jul 31, 2013
Merged

[WIP] ORM based dynamic routing #122

merged 9 commits into from
Jul 31, 2013

Conversation

dbu
Copy link
Member

@dbu dbu commented Jul 19, 2013

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? TODO
Fixed tickets #95
License MIT
Doc PR TODO

@dbu
Copy link
Member Author

dbu commented Jul 19, 2013

@matteocaberlotto do you want to pick up from here again? i started porting over the code you did in #95

@matteocaberlotto
Copy link
Contributor

yes ofc, the old one has no more reason to exist. i will give a check to tests and other things soon, thx

@dbu
Copy link
Member Author

dbu commented Jul 19, 2013

thanks a lot. this PR is missing the entity class extending the one from
model too. i did not port all your code over yet.
please ask again here or in irc.freenode.net #symfony-cmf if anything is
not clear.

@matteocaberlotto
Copy link
Contributor

maybe there's no need to add the code to the bundle but only some documentation. i was going to check this too

*/
class RouteProvider extends DoctrineProvider implements RouteProviderInterface
{
protected function getCandidates($url)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this logic the same as with the ODM? Should we encapsulate it in a class?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, the phpcr is using id prefix all over the place here

@matteocaberlotto
Copy link
Contributor

hi, i dont know if it's possible/convenient atm but maybe this branch could be rebased and take advantage of last configuration addition to simplify the orm integration.

@dbu
Copy link
Member Author

dbu commented Jul 29, 2013

well, this is going to be close run if we make it into 1.0 :-) but lets try, would be really cool

i just rebased. i hope its halfways understandable how we intended the things to work?

@matteocaberlotto
Copy link
Contributor

u mean the doctrine provider part?

@dbu
Copy link
Member Author

dbu commented Jul 29, 2013

yes, the doctrine orm provider part. its not that much missing... do you have some time to have a look tomorrow?

@matteocaberlotto
Copy link
Contributor

yes, i just have an error getting the repository, then everything should be ok for a PR against this branch

@dbu
Copy link
Member Author

dbu commented Jul 29, 2013

great!
ping me on irc.freenode.org in #symfony-cmf tomorrow if you need help

@matteocaberlotto
Copy link
Contributor

thx

*
* @author [email protected]
*/
class RouteProvider extends DoctrineProvider implements RouteProviderInterface
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you forget a use statement for DoctrineProvider?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, there's some more missing which is going to be submitted in a pull request tonite, then code will be available for review

@dbu
Copy link
Member Author

dbu commented Jul 30, 2013

merged the contributions by @matteocaberlotto and did some cleanup. phpcr is still fine, but we lack tests for orm. @dantleech does the cmf testing component already provide something for orm testing? would it be hard to add something?
it would be really nice if we could merge this in. but we should have at least a basic test that loads this stuff and sees if things explode.

@matteocaberlotto did you not create the RedirectRoute on purpose? i think it would be nice to have it too.

@@ -55,7 +85,7 @@ private function buildBasePhpcrCompilerPass()
return new DoctrinePhpcrMappingsPass(
$driver,
array('Symfony\Component\Routing'),
array('cmf_routing.manager_name'),
array('cmf_routing.dynamic.persistence.phpcr.manager_name'),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i guess we need this fix even if we do not merge this PR

@dbu
Copy link
Member Author

dbu commented Jul 31, 2013

i would love to merge the PR in. ideally we can make orm provider work properly for 1.0, the worst case is that we ship some dead code.

@lsmith77
Copy link
Member

it would be very good indeed to ship this .. to make our message clearer in regards to persistence. in this spirit i am fine to include this in RC1 .. though if we do then we should commit to getting it running.

lsmith77 added a commit that referenced this pull request Jul 31, 2013
[WIP] ORM based dynamic routing
@lsmith77 lsmith77 merged commit df34732 into master Jul 31, 2013
@lsmith77 lsmith77 deleted the orm branch July 31, 2013 07:40
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

Successfully merging this pull request may close these issues.

5 participants