从1.2 *升级到2.1。的sonata-project / doctrine-phpcr-admin-bundle错误

时间:2018-10-16 17:56:08

标签: php symfony

我将symfony从2.8升级到3.0.9。我在symfony 2.8中安装了sonata-project / doctrine-phpcr-admin-bundle 1.2,但是在将symfony升级到3.0时,我使用的是sonata-project / doctrine-phpcr-admin-bundle 2.0。*。

错误:

Fatal error: Uncaught exception 'Symfony\Component\Config\Definition\Exception\InvalidConfigurationException' with message 'Unrecognized options "Doctrine\ODM\PHPCR\Document\Generic, Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Directory, Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\File, Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Image, Symfony\Cmf\Bundle\MediaBundle\Doctrine\Phpcr\Media, Symfony\Cmf\Bundle\ContentBundle\Doctrine\Phpcr\StaticContent, Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\StringBlock, Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ReferenceBlock, Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ActionBlock, Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\SlideshowBlock, Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\ImagineBlock, Symfony\Cmf\Bundle\BlockBundle\Doctrine\Phpcr\RssBlock, Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route, Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\RedirectRoute" under "sonata_doctrine_phpcr_admin.document_tree"' in /var/symfony/vendor/symfony/symfony/sr in /var/symfony/vendor/symfony/symfony/src/Symfony/Component/Config/Definition/ArrayNode.php on line 317

Composer.json:

"minimum-stability": "dev",
"prefer-stable": true,
"require": {
    "php": ">=5.5.9",
    "symfony/symfony": "3.0.*",
    "sonata-project/admin-bundle": "^2.3||^3",
    "sonata-project/cache-bundle": "^2.3",
    "sonata-project/doctrine-orm-admin-bundle": "~3.1",
    "sonata-project/doctrine-phpcr-admin-bundle": "2.0"

Config_dev.yml示例:

sonata_doctrine_phpcr_admin:
document_tree_defaults: [locale]
document_tree:
    Doctrine\ODM\PHPCR\Document\Generic:
        valid_children:
            - all        
    Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route:
        valid_children:
            - Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route
            - Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\RedirectRoute
    Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\RedirectRoute:
        valid_children: []

routing.yml:

fos_js_routing:
    resource: @FOSJsRoutingBundle/Resources/config/routing/routing.xml

cmf_tree:
    resource: .
    type: 'cmf_tree'

请帮助

谢谢你, Disha

0 个答案:

没有答案