Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
explicitly enable cmf_routing for phpcr
Browse files Browse the repository at this point in the history
  • Loading branch information
lsmith77 committed Jul 31, 2013
1 parent 35251db commit 5f4e199
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
4 changes: 1 addition & 3 deletions Resources/config/doctrine/AutoRoute.phpcr.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/phpcr/doctrine-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<document
name="Symfony\Cmf\Bundle\RoutingAutoBundle\Document\AutoRoute"
referenceable="true"/>
<document name="Symfony\Cmf\Bundle\RoutingAutoBundle\Document\AutoRoute" referenceable="true"/>

This comment has been minimized.

Copy link
@dbu

dbu Jul 31, 2013

Member

the referenceable=true can go away, that was to work around phpcr-odm not inheriting class level attributes, fixed now


</doctrine-mapping>

18 changes: 18 additions & 0 deletions Tests/Resources/app/config/routingautoroute.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
cmf_routing:
chain:
routers_by_id:
cmf_routing.dynamic_router: 20
router.default: 100
dynamic:
enabled: true
controllers_by_type:
demo_alias: test.controller:aliasAction
controllers_by_class:
Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\RedirectRoute: cmf_routing.redirect_controller:redirectAction
templates_by_class:
Symfony\Cmf\Component\Testing\Document\Content: TestBundle:Content:index.html.twig
persistence:
phpcr:
enabled: true
route_basepath: /test/routing

This comment has been minimized.

Copy link
@dbu

dbu Jul 31, 2013

Member

i think the tests have a file per bundle, so this should go into routing.yml

and the only parts you really need are

cmf_routing:
    dynamic:
        enabled: true
        persistence:
            phpcr:
                enabled: true

though i am not sure if the dynamic router automatically goes into the chain when it is enabled. that could be some wtf if its not. if it is not, i guess the tests currently never resolve a route, but that could change at some point.

This comment has been minimized.

Copy link
@lsmith77

lsmith77 Jul 31, 2013

Author Member

we are not consistent about this .. i dont know what the philosophy was .. or if its just accidental how it turned out

/cc @dantleech

This comment has been minimized.

Copy link
@dbu

dbu Jul 31, 2013

Member

well honestly i don't care too much about code style for such details in testing. but we should see what configuration we can remove without anything breaking. once the config is there, nobody will ever delete it anymore, and its suggesting we would test things that we actually do not test.

cmf_routing_auto:

auto_route_mapping:
Expand Down

0 comments on commit 5f4e199

Please sign in to comment.