0
我試圖安裝Symfony的CMF,但我發現了以下錯誤在創建數據庫:致命錯誤安裝Symfony的CMF
Fatal error: Class 'PHPCR\Util\Console\Command\MoveCommand' not found in /vendor/doctrine/phpcr-bundle/Doctrine/Bundle/PHPCRBundle/Command/NodeMoveCommand.php on line 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
誰能幫助嗎?