安装Symfony CMF时出现致命错误

时间:2013-05-05 18:39:38

标签: php symfony symfony-cmf

我正在尝试安装Symfony CMF但是在创建数据库时出现以下错误:

  

致命错误:找不到类'PHPCR \ Util \ Console \ Command \ MoveCommand'   在   /vendor/doctrine/phpcr-bundle/Doctrine/Bundle/PHPCRBundle/Command/NodeMoveCommand.php   在第34行

我的composer.json如下:

"require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.2.*",
        "doctrine/orm": "2.3.*",
        "doctrine/doctrine-bundle": "1.2.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.1.*",
        "symfony/swiftmailer-bundle": "2.2.*",
        "symfony/monolog-bundle": "2.2.*",
        "sensio/distribution-bundle": "2.2.*",
        "sensio/framework-extra-bundle": "2.2.*",
        "sensio/generator-bundle": "2.2.*",
        "jms/security-extra-bundle": "1.4.*",
        "jms/di-extra-bundle": "1.3.*",
        "friendsofsymfony/user-bundle": "*",
        "sonata-project/user-bundle": "dev-master",
        "sonata-project/admin-bundle": "2.2.*@dev",
        "sonata-project/easy-extends-bundle" : "dev-master",
        "sonata-project/intl-bundle": "dev-master",
        "sonata-project/doctrine-orm-admin-bundle": "2.2.*@dev",
        "sonata-project/cache-bundle": "dev-master",
        "knplabs/knp-menu-bundle": "1.1.x-dev",
        "sonata-project/block-bundle": "2.2.*@dev",


        "jackalope/jackalope-doctrine-dbal": "dev-master",
        "doctrine/phpcr-bundle": "1.0.*@dev",
        "doctrine/phpcr-odm": "1.0.*@dev"


    },

AppKernel:

    // App bundles
    new Application\Sonata\UserBundle\ApplicationSonataUserBundle(),

    // Vendor bundles
    new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
    new Symfony\Bundle\SecurityBundle\SecurityBundle(),
    new Symfony\Bundle\TwigBundle\TwigBundle(),
    new Symfony\Bundle\MonologBundle\MonologBundle(),
    new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
    new Symfony\Bundle\AsseticBundle\AsseticBundle(),
    new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),

    new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
    new JMS\AopBundle\JMSAopBundle(),
    new JMS\DiExtraBundle\JMSDiExtraBundle($this),
    new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),



    new FOS\UserBundle\FOSUserBundle(),
    new Sonata\jQueryBundle\SonatajQueryBundle(),
    new Sonata\AdminBundle\SonataAdminBundle(),
    new Sonata\BlockBundle\SonataBlockBundle(),
    new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),
    new Knp\Bundle\MenuBundle\KnpMenuBundle(),
    new Sonata\UserBundle\SonataUserBundle('FOSUserBundle'),
    new Sonata\EasyExtendsBundle\SonataEasyExtendsBundle(),

    new Doctrine\Bundle\PHPCRBundle\DoctrinePHPCRBundle(),

我在autoload.php

中设置了以下行
AnnotationRegistry::registerFile(__DIR__.'/../vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Mapping/Annotations/DoctrineAnnotations.php');

最后我的config.yml相关部分:

doctrine_phpcr:
    session:
        backend:
            type: doctrinedbal
            connection: doctrine.dbal.default_connection
        workspace: default
        username: admin
        password: admin
    odm:
        auto_mapping: true  

有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

你可以试试这个 symfony cmf fix

symfony-cmf开始时遇到了很多麻烦。

但是我发现了一个使用linux和windows的工作。 你可以使用除sqlite之外的其他东西。 祝你好运。