简体   繁体   中英

Conflicts with sonata admin bundle and LiipFunctionalTestBundle

when I try to install sonata admin and LiipFunctionalTestBundle, it gives me a validator problem,

FileLoaderLoadException: Catchable Fatal Error: Argument 1 passed to Sonata\\AdminBundle\\Admin\\Admin::setValidator() must implement interface Symfony\\Component\\Validator\\ValidatorInterface, instance of Liip\\FunctionalTestBundle\\Validator\\DataCollectingValidator given, called in /var/www/app.gyman/app/cache/dev/appDevDebugProjectContainer.php on line 713 and defined in /var/www/app.gyman/app/config/. (which is being imported from "/var/www/app.gyman/app/config/routing.yml").

and I found some propositions to install sonata dev master, when i do that,

"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"sonata-project/block-bundle": "dev-master",
"sonata-project/core-bundle": "dev-master",
"knplabs/knp-menu-bundle":"*"

It gives me this errors:

Problem 1
- Installation request for sonata-project/doctrine-orm-admin-bundle dev-master -> satisfiable by sonata-project/doctrine-orm-admin-bundle[dev-master].
- Can only install one of: sonata-project/core-bundle[dev-master, 2.x-dev].
- sonata-project/doctrine-orm-admin-bundle dev-master requires sonata-project/core-bundle ^2.3.1 -> satisfiable by sonata-project/core-bundle[2.x-dev].
- Installation request for sonata-project/core-bundle dev-master -> satisfiable by sonata-project/core-bundle[dev-master].

Solved with an older version of Liip Functional test bundle , my new composer is as following:

           "require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.8.*",
    "doctrine/orm": "~2.2,>=2.2.3",
    "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": "~3.0",
    "sensio/framework-extra-bundle": "~3.0"

    "sonata-project/core-bundle": "~2.2",
    "sonata-project/admin-bundle": "~2.2",
    "sonata-project/user-bundle": "~2.2",
    "sonata-project/doctrine-orm-admin-bundle": "~2.1",
    "sonata-project/easy-extends-bundle": "2.1.7"

},
"require-dev": {
    "liip/functional-test-bundle": "1.0.2",

The 3.0.0 version of SonataAdminBundle has been released 6 days ago . But it looks like there was a problem with SonataDoctrineORMAdminBundle that has been fixed two days ago , it is now available on Packagist .

It is now possible to use these versions of the Sonata packages:

{
    "require": {
        "sonata-project/core-bundle": "3.0.*",
        "sonata-project/admin-bundle": "3.0.*",
        "sonata-project/doctrine-orm-admin-bundle": "3.0.*"
    },
    "require-dev": {
        "liip/functional-test-bundle": "~1.6"
    }
}

And the installation works:

$ composer update --no-interaction --no-progress
[…]
Updating dependencies (including require-dev)
[…]
  - Installing sonata-project/core-bundle (3.0.0)
[…]
  - Installing sonata-project/doctrine-orm-admin-bundle (3.0.0)
[…]
  - Installing liip/functional-test-bundle (1.6.3)
[…]

There was some problems with the dependencies and it was impossible to install the Sonata bundles, see these comments from my previous answer I have deleted since:

I have tried many versions and still have the same problem than you, it looks like the Sonata bundles are broken… – AL May 3 at 18:06

Exactly, we must wait some days, hoping that can be solved with this versions – Nada May 3 at 20:34

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM