0

SonataPageBundle使用作曲家安装时遇到麻烦。我正在使用本教程来了解如何安装 SonataPageBundle。

我安装了所有依赖项,但是当我输入这个“ php composer.phar require symfony-cmf/routing-bundle

Jordis-iMac:symfony jordikroon$ php composer.phar require sonata-project/page-bundle
Please provide a version constraint for the sonata-project/page-bundle requirement: dev-master
composer.json has been updated
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/page-bundle dev-master -> satisfiable by sonata-project/page-bundle[dev-master].
    - sonata-project/page-bundle dev-master requires symfony-cmf/routing-bundle 1.1.*@dev -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.

Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting composer.json to its original content.

我试图安装路由包,但它也给出了错误。

这是我的 composer.json 文件:

{
    "name": "symfony/framework-standard-edition",
    "license": "MIT",
    "type": "project",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.3.*",
        "doctrine/orm": ">=2.2.3,<2.4-dev",
        "doctrine/doctrine-bundle": "1.2.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.3.*",
        "symfony/swiftmailer-bundle": "2.3.*",
        "symfony/monolog-bundle": "2.3.*",
        "sensio/distribution-bundle": "2.3.*",
        "sensio/framework-extra-bundle": "2.3.*",
        "sensio/generator-bundle": "2.3.*",
        "incenteev/composer-parameter-handler": "~2.0",
        "friendsofsymfony/user-bundle": "*",
        "sonata-project/admin-bundle": "dev-master",
        "sonata-project/doctrine-orm-admin-bundle": "dev-master",
        "sonata-project/user-bundle": "dev-master",
        "sonata-project/cache-bundle": "dev-master",
        "sonata-project/seo-bundle": "dev-master",
        "sonata-project/notification-bundle": "dev-master",
        "videlalvaro/php-amqplib": "dev-master",
        "liip/monitor-bundle": "dev-master",
        "sonata-project/page-bundle": "*"
    },
    "scripts": {
        "post-install-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ],
        "post-update-cmd": [
            "Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
            "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
        ]
    },
    "config": {
        "bin-dir": "bin"
    },
    "minimum-stability": "stable",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web",
        "incenteev-parameters": {
            "file": "app/config/parameters.yml"
        },
        "branch-alias": {
            "dev-master": "2.3-dev"
        }
    }
}

我做错了什么?欢迎任何帮助。

4

2 回答 2

0

看起来您缺少 symfony-cmf/routing-bundle。

于 2013-07-02T01:39:29.930 回答
0

添加composer.json

require : {
....
"symfony-cmf/symfony-cmf": "1.1.*@dev"
....
}

或其他需要的包。

如果还有更多问题,检查Packagist中的依赖关系,寻找丢失的包

于 2014-02-19T23:42:43.520 回答