doctrine / DoctrinePHPCRBundle

This bundle integrates Doctrine PHPCR ODM and PHPCR backends into Symfony
http://phpcr.github.com
MIT License
156 stars 66 forks source link

Fixture load triggers fatal error #119

Closed awdng closed 10 years ago

awdng commented 10 years ago

Getting this error with the latest dev-master

php app/console doctrine:phpcr:fixtures:load
Careful, database will be purged. Do you want to continue Y/N ?Y
PHP Catchable fatal error:  Argument 2 passed to Doctrine\Bundle\PHPCRBundle\Initializer\GenericInitializer::__construct() must be of the type array, none given, called in /vagrant/repo/01_webserver/app/cache/dev/appDevDebugProjectContainer.php on line 923 and defined in /vagrant/repo/01_webserver/vendor/doctrine/phpcr-bundle/Doctrine/Bundle/PHPCRBundle/Initializer/GenericInitializer.php on line 63
PHP Stack trace:
PHP   1. {main}() /vagrant/repo/01_webserver/app/console:0
PHP   2. Symfony\Component\Console\Application->run() /vagrant/repo/01_webserver/app/console:27
PHP   3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() /vagrant/repo/01_webserver/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:121
PHP   4. Symfony\Component\Console\Application->doRun() /vagrant/repo/01_webserver/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:96
PHP   5. Symfony\Component\Console\Application->doRunCommand() /vagrant/repo/01_webserver/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:191
PHP   6. Symfony\Component\Console\Command\Command->run() /vagrant/repo/01_webserver/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:888
PHP   7. Doctrine\Bundle\PHPCRBundle\Command\LoadFixtureCommand->execute() /vagrant/repo/01_webserver/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:241
PHP   8. Symfony\Component\DependencyInjection\Container->get() /vagrant/repo/01_webserver/vendor/doctrine/phpcr-bundle/Doctrine/Bundle/PHPCRBundle/Command/LoadFixtureCommand.php:134
PHP   9. appDevDebugProjectContainer->getDoctrinePhpcr_InitializerManagerService() /vagrant/repo/01_webserver/app/bootstrap.php.cache:2033
PHP  10. Symfony\Component\DependencyInjection\Container->get() /vagrant/repo/01_webserver/app/cache/dev/appDevDebugProjectContainer.php:1728
PHP  11. appDevDebugProjectContainer->getCmfMenu_InitializerService() /vagrant/repo/01_webserver/app/bootstrap.php.cache:2033
PHP  12. Doctrine\Bundle\PHPCRBundle\Initializer\GenericInitializer->__construct() /vagrant/repo/01_webserver/app/cache/dev/appDevDebugProjectContainer.php:923
composer show --installed | grep phpcr
doctrine/phpcr-bundle                dev-master 63047af Symfony DoctrinePHPCRBundle
doctrine/phpcr-odm                   dev-master 1fea541 Object-Document-Mapper for PHPCR
phpcr/phpcr                          2.1.0              PHP Content Repository interfaces
phpcr/phpcr-utils                    1.1.0              PHP Content Repository implementation independant utilities
dbu commented 10 years ago

to get a stable experience, you should depend on the 1.0 version of the cmf bundles until 1.1 is released as stable. the issue you see is coming from https://github.com/symfony-cmf/MenuBundle/pull/171 and will be there for ContentBundle as well.

dbu commented 10 years ago

issue is adressed in https://github.com/symfony-cmf/SimpleCmsBundle/pull/99 https://github.com/symfony-cmf/ContentBundle/pull/100 https://github.com/symfony-cmf/MenuBundle/pull/172

Siao-pin commented 10 years ago

Can you write what dependencies I have to fix to make tutorial example work http://symfony.com/doc/master/cmf/cookbook/creating_a_cms/getting-started.html? Here is my composer.json "require" section:

    "php": ">=5.3.3",
    "symfony/symfony": "~2.4",
    "doctrine/doctrine-bundle": "~1.2",
    "twig/extensions": "~1.0",
    "symfony/assetic-bundle": "~2.3",
    "symfony/swiftmailer-bundle": "~2.3",
    "symfony/monolog-bundle": "~2.4",
    "sensio/distribution-bundle": "~2.3",
    "sensio/framework-extra-bundle": "~3.0",
    "sensio/generator-bundle": "~2.3",
    "incenteev/composer-parameter-handler": "~2.0",
    "doctrine/phpcr-bundle": "dev-master as 1.0.0",
    "doctrine/phpcr-odm": "dev-master as 1.0.0",
    "jackalope/jackalope-doctrine-dbal": "1.0.0",

    "symfony-cmf/routing-auto-bundle": "1.0.*@alpha",
    "symfony-cmf/menu-bundle": "1.0",
    "sonata-project/doctrine-phpcr-admin-bundle": "dev-master",
    "symfony-cmf/tree-browser-bundle": "@dev",
    "doctrine/data-fixtures": "1.0.0",

    "phpcr/phpcr-utils": "dev-master as 1.0.0"
dbu commented 10 years ago

you are mixing dev and 1.0 versions which will not work. either use the latest dev versions of phpcr-odm and the cmf, or use the 1.0 versions of everything to be stable. (the exception is RoutingBundle which is stable at 1.1 and dev at 1.2)