简体   繁体   中英

Issues installing sonata bundle

i am beginning with sonata bundle, i need to install but I can't : Whether I follow the official tutorial , I try to access localhost or type php app/console sonata:easy-extends:generate SonataUserBundle --dest=src it tell me :

[InvalidArgumentException] Bundle "ApplicationSonataUserBundle" does not exist or it is not enabled.

Or I follow this (fr) , when I try to update composer, it displays :

Loading composer repositories with package information
Updating dependencies (including require-dev)
 Your requirements could not be resolved to an installable set of packages.
 Problem 1
    - Installation request for sonata-project/doctrine-extensions dev-master -> satisfiable by sonata-project/doctrine-extensions[dev-master].
    - sonata-project/media-bundle dev-master requires sonata-project/doctrine-extensions 1.* -> satisfiable by sonata-project/doctrine-extensions[1.0.0, 1.0.1].
    - Can only install one of: sonata-project/doctrine-extensions[dev-master, 1.0.0].
    - Can only install one of: sonata-project/doctrine-extensions[dev-master, 1.0.1].
    - Installation request for sonata-project/media-bundle dev-master -> satisfiable by sonata-project/media-bundle[dev-master].

Here is my composer.json for the 2nd issue :

{
"name" : "symfony/framework-standard-edition",
"description" : "The \"Symfony Standard Edition\" distribution",
"type" : "project",
"license" : [
    "MIT"
],
"require" : {
    "sonata-project/admin-bundle" : "dev-master",
    "symfony/swiftmailer-bundle" : "2.3.*",
    "sonata-project/cache-bundle" : "dev-master",
    "doctrine/orm" : ">=2.2.3,<2.4-dev",
    "doctrine/data-fixtures" : "@dev",
    "sonata-project/notification-bundle" : "dev-master",
    "twig/extensions" : "1.0.*",
    "sonata-project/doctrine-extensions" : "dev-master",
    "php" : ">=5.3.3",
    "sonata-project/jquery-bundle" : "dev-master",
    "knplabs/gaufrette" : "dev-master",
    "symfony/monolog-bundle" : "2.3.*",
    "sensio/distribution-bundle" : "2.3.*",
    "leafo/lessphp" : "dev-master",
    "symfony/symfony" : "2.3.*",
    "sonata-project/easy-extends-bundle" : "dev-master",
    "sonata-project/doctrine-orm-admin-bundle" : "dev-master",
    "sonata-project/media-bundle" : "dev-master",
    "symfony/assetic-bundle" : "2.3.*",
    "incenteev/composer-parameter-handler" : "~2.0",
    "sonata-project/exporter" : "dev-master",
    "simplethings/entity-audit-bundle" : "dev-master",
    "sensio/generator-bundle" : "2.3.*",
    "sonata-project/block-bundle" : "dev-master",
    "doctrine/doctrine-bundle" : "1.2.*"
},
"autoload" : {
    "psr-0" : {
        "" : "src/"
    }
},
"minimum-stability" : "stable",
"config" : {
    "bin-dir" : "bin"
},
"extra" : {
    "branch-alias" : {
        "dev-master" : "2.3-dev"
    },
    "symfony-web-dir" : "web",
    "symfony-app-dir" : "app",
    "incenteev-parameters" : {
        "file" : "app/config/parameters.yml"
    }
}
}

Please, i am blocked ! Those bundle should save time, but it would be faster to write them !

For the ApplicationSonataUserBundle issue :

  • you should enable this bundle in your AppKernel :

    new Application\\Sonata\\UserBundle()

For the composer update issue, you are trying to install versions of bundles that don't work together. You can find in http://packagist.org the requirements of each Bundle you want to download.

Here is an example of composer.json file that i am using, it may help:

"require": {
    "php": ">=5.3.3",
    "symfony/symfony": "2.3.*",
    "symfony/assetic-bundle": "2.3.*",
    "symfony/swiftmailer-bundle": "2.3.*",
    "symfony/monolog-bundle": "2.3.*",
    "doctrine/orm": ">=2.2.3,<2.4-dev",
    "doctrine/doctrine-bundle": "1.2.*",
    "doctrine/doctrine-fixtures-bundle": "dev-master",
    "twig/extensions": "1.0.*",
    "sensio/distribution-bundle": "2.3.*",
    "sensio/framework-extra-bundle": "2.3.*",
    "sensio/generator-bundle": "2.3.*",
    "incenteev/composer-parameter-handler": "~2.0",
    "sonata-project/core-bundle": "dev-master",
    "sonata-project/admin-bundle": "dev-master",
    "sonata-project/doctrine-orm-admin-bundle": "dev-master",
    "sonata-project/easy-extends-bundle": "~2.1",
    "sonata-project/user-bundle": "dev-master",
    "fr3d/ldap-bundle": "2.0.*@dev"

},

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