symfony-cmf/ChainRoutingBundle — Issue #6: Install problems
Author: marcoalbarelli
Created: 2012-01-01 19:05:07+00:00
State: open

Hi
I'm building a CMS for one of my clients and one of the requirements is a dynamic routing.
I was about to start creating my own routing service when I stumbled into yours which does exactly what I was about to develop.

I tried to install it, added a deps entry, added some configuration, but it seems that I'm missing some dependencies:

Deps entry (wild guess):

[ChainRoutingBundle]
git=https://github.com/symfony-cmf/ChainRoutingBundle.git
target=bundles/Symfony/Cmf/Bundle/ChainRoutingBundle

AppKernel entry
new Symfony\Cmf\Bundle\ChainRoutingBundle\SymfonyCmfChainRoutingBundle(),

No autoload entry since it's in under Symfony/ which is already there

Configuration pasted in the config.yml as per your README.md:.
symfony_cmf_chain_routing:
doctrine:
chain:
routers_by_id:
# enable the DoctrineRouter with high priority to allow overwriting configured routes with content
symfony_cmf_chain_routing.doctrine_router: 200
# enable the symfony default router with a lower priority
router.default: 100
# whether the chain router should replace the default router. defaults to true
# if you set this to false, you will need to do somthing else to trigger your router
# replace_symfony_router: true

I get then a ErrorException: Notice: Undefined index: doctrine in /home/marco/workspace_promobit/CMSPromobit/Symfony/vendor/bundles/Symfony/Cmf/Bundle/ChainRoutingBundle/DependencyInjection/SymfonyCmfChainRoutingExtension.php line 43

I then add a doctrine: field to the config
symfony_cmf_chain_routing:
doctrine:
chain:
routers_by_id:

And at this point I get a ParameterNotFoundException: The service "symfony_cmf_chain_routing.doctrine_router" has a dependency on a non-existent parameter "symfony_cmf_core.routing_basepath".

When I add the symfony_cmf_core entry in the config I of course get the InvalidArgumentException: There is no extension able to load the configuration for "symfony_cmf_core" ....

If possible I'd like to use your bundle directly, without dependencies: I'm too much ahead in the development of this custom CMS to steer and start using Cmf related stuff (hopefully we'll refactor during the year, but not now)

If it's not possible then thanks for your code, which I'll take as a starting point and adapt to my bundle

Either way thanks a lot :)
Marco