【问题标题】:installing sonata page bundle安装奏鸣曲页面包
【发布时间】:2013-07-02 01:17:02
【问题描述】:

我在使用 composer 安装 SonataPageBundle 时遇到问题。 我正在使用这个tutorial 来了解如何安装 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"
        }
    }
}

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

【问题讨论】:

    标签: php oop symfony symfony-sonata


    【解决方案1】:

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

    【讨论】:

    • 我尝试安装路由包,但也报错。
    【解决方案2】:

    在composer.json中添加

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

    或其他需要的包。

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

    【讨论】:

      猜你喜欢
      • 2017-10-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-13
      • 2017-09-17
      • 2021-06-17
      • 2023-03-04
      • 2014-12-06
      相关资源
      最近更新 更多