1

我已经使用作曲家设置了 symfony。

我在我的 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",
    "sonata-project/admin-bundle": "dev-master",
    "sonata-project/doctrine-orm-admin-bundle": "dev-master",
    "sonata-project/intl-bundle": "dev-master",
    "sonata-project/user-bundle": "dev-master"
},
"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"
    }
}
}

当我运行 composer.phar update 时,我收到以下消息:

使用包信息加载作曲家存储库更新依赖项(包括 require-dev)您的需求无法解析为可安装的包集。

问题 1 - sonata-project/intl-bundle dev-master 的安装请求 -> 可由 sonata-project/intl-bundle [dev-master] 满足。- sonata-project/intl-bundle dev-master 需要 ext-intl * -> 您的系统中缺少请求的 PHP 扩展 intl。问题 2 - sonata-project/intl-bundle dev-master 需要 ext-intl * -> 您的系统中缺少请求的 PHP 扩展 intl。- symfony/framework-standard-edition 2.3.x-dev 需要 sonata-project/intl-bundle dev-master -> 可以满足 sonata-project/intl-bundle[dev-master]。- symfony/framework-standard-edition 2.3.x-dev 的安装请求 -> symfony/framework-standard-edition[2.3.x-dev] 可以满足。

所以不知道更好,我想我可能需要运行 composr.phar install 这给了我这个:

使用包信息加载作曲家存储库 从锁定文件安装依赖项(包括 require-dev) 警告:锁定文件不是最新的 composer.json 中的最新更改。您可能会得到过时的依赖项。运行 update 来更新它们。您的要求无法解决为一组可安装的软件包。

问题 1 - symfony/framework-standard-edition 2.3.x-dev 的安装请求 -> symfony/framework-standard-edition[2.3.x-dev] 可以满足。- symfony/framework-standard-edition 2.3.x-dev 需要 sonata-project/admin-bundle dev-master -> 找不到匹配的包。

潜在原因: - 包名称中的拼写错误 - 根据您的最低稳定性设置,该包在足够稳定的版本中不可用,请参阅https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/讨论更多细节。

阅读http://getcomposer.org/doc/articles/troubleshooting.md了解更多常见问题。

我已按照 sonata-project.org 的说明进行操作,但没有取得任何进展。

我犯了某种非常明显的错误吗?

4

1 回答 1

4

这是使用 symfony 2.3 设置奏鸣曲管理员的有效 composer.json。*

"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",
    "twig/twig": "1.*",
    "knplabs/knp-menu-bundle" : "1.1.*",
    "sonata-project/block-bundle" : "dev-master",
    "sonata-project/exporter" : "1.1.0",
    "sonata-project/jquery-bundle" : "1.8.*",
    "sonata-project/cache-bundle" : "dev-master",
    "sonata-project/intl-bundle" : "dev-master",
    "sonata-project/admin-bundle" : "dev-master",
    "sonata-project/doctrine-orm-admin-bundle" : "dev-master",
},

必须安装INTL扩展: http: //php.net/manual/en/intl.setup.php

于 2013-06-23T10:24:08.513 回答