0

i'm following the tutorial Creating a Basic CMS but after configurate the CMF RoutingBundle like it's shown in Enable the Dynamic Router i got the following error when i try to load the fixture data

PHP Catchable fatal error:  Argument 2 passed to Doctrine\Bundle\PHPCRBundle\Initializer\GenericInitializer::__construct() must be of the type array, none given

here is my config.yml

cmf_routing:
    chain:
        routers_by_id:
            cmf_routing.dynamic_router: 20
            router.default: 100
    dynamic:
        enabled: true
        persistence:
            phpcr:                
                route_basepath: /cms/routes   
metalvarez
  • 606
  • 1
  • 8
  • 14

1 Answers1

2

you seem to have gotten a version mixup. you need either the 1.1.* family of phpcr-odm and phpcr-bundle with the routing-bundle 1.2.* or phpcr at 1.0.* and routing at 1.1.*

did you do any composer tricks or are the dependencies allowing this incompatible combination?

dbu
  • 1,497
  • 9
  • 8
  • Thanks for the answer david, and yes i think dependencies are allowing this to happen, here my [composer.json](https://gist.github.com/metalvarez/9977658) – metalvarez Apr 04 '14 at 16:01
  • 1
    "doctrine/phpcr-odm": "dev-master as 1.0.0" and the lines below is what ends you up in the mix. you tell composer to pretend that the current master of phpcr-odm (which is 1.1) would be 1.0.0, hence it will not complain about the conflict although there is one. for the "as" thing in composer you need to be really sure what you are doing. – dbu Apr 05 '14 at 09:14