当前位置: 首页 > 知识库问答 >
问题:

Composer更新结果为"symfony/frame me-bundle 2.0.7需要symfony/转换器2.0.7->找不到匹配的包"。

夏侯英纵
2023-03-14

错误消息是:

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
    - symfony/framework-bundle 2.0.7 requires symfony/translator 2.0.7 -> no matching package found.
[snip]

编写器版本为d929a0813ae473272d151d9ebb2af7ebae451e48,安装了以下捆绑包:

    null

搜索错误消息主要返回包含错误消息的结果,但没有解决方案或指向正确方向的指针。。。

这可能是一个巧合,但这条信息在运行作曲家自我更新后开始显示

[编辑]我的composer.json

{
    "autoload": {
        "psr-0":         {
            "": "src/"
        }
    },
    "description": "The \"Symfony Standard Edition\" distribution",
    "extra": {
        "branch-alias":         {
            "dev-master": "2.2-dev"
        },
        "symfony-app-dir": "app",
        "symfony-web-dir": "web"
    },
    "minimum-stability": "alpha",
    "name": "symfony/framework-standard-edition",
    "repositories": [
        {
            "package":             {
                "dist":                 {
                    "type": "file",
                    "url": "http://code.jquery.com/jquery-1.9.1.js"
                },
                "name": "jquery/jquery",
                "version": "1.9.1"
            },
            "type": "package"
        }
    ],
    "require": {
        "antimattr/google-bundle": "dev-master",
        "braincrafted/bootstrap-bundle": "dev-master",
        "doctrine/data-fixtures": "dev-master",
        "doctrine/doctrine-bundle": "1.2.*",
        "doctrine/doctrine-fixtures-bundle": "dev-master",
        "doctrine/doctrine-migrations-bundle": "dev-master",
        "doctrine/migrations": "dev-master",
        "doctrine/orm": "~2.2,>=2.2.3",
        "friendsofsymfony/comment-bundle": "2.*@dev",
        "friendsofsymfony/rest-bundle": "0.*@dev",
        "friendsofsymfony/user-bundle": "*",
        "gedmo/doctrine-extensions": "master-dev",
        "hwi/oauth-bundle": "*",
        "jms/di-extra-bundle": "1.3.*",
        "jms/security-extra-bundle": "1.4.*",
        "jquery/jquery": "1.9.*",
        "leafo/lessphp": "dev-master",
        "ornicar/akismet-bundle": "dev-master",
        "php": ">=5.3.3",
        "sensio/distribution-bundle": "2.2.*",
        "sensio/framework-extra-bundle": "2.2.*",
        "sensio/generator-bundle": "2.2.*",
        "symfony/assetic-bundle": "2.1.*",
        "symfony/monolog-bundle": "2.2.*",
        "symfony/swiftmailer-bundle": "2.2.*",
        "symfony/framework-bundle": ">=2.0,<=2.2-dev",
        "symfony/symfony": "2.2.*",
        "twig/extensions": "1.0.*",
        "twitter/bootstrap": "2.3.*"
    },
    "scripts": {
        "post-install-cmd": [
"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": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
    ]
    }
}

共有1个答案

卓学智
2023-03-14

如果您在composer.json中替换以下内容,它将起作用:

"symfony/framework-bundle": ">=2.0,<=2.2-dev"
"hwi/oauth-bundle": "*"

与(例如):

"symfony/framework-bundle": "v2.2.0",
"hwi/oauth-bundle": "0.2.*@dev"

这两个问题是:

"symfony/framework-bundle": ">=2.0,<=2.2-dev"

这需要:

symfony/translator: 2.0.7
"hwi/oauth-bundle": "*"

因为它需要:

symfony/framework-bundle: >=2.0,<2.2-dev

因此,您的完整composer.json将是:

{
    "autoload": {
        "psr-0":         {
            "": "src/"
        }
    },
    "description": "The \"Symfony Standard Edition\" distribution",
    "extra": {
        "branch-alias":         {
            "dev-master": "2.2-dev"
        },
        "symfony-app-dir": "app",
        "symfony-web-dir": "web"
    },
    "minimum-stability": "alpha",
    "name": "symfony/framework-standard-edition",
    "repositories": [
        {
            "package":             {
                "dist":                 {
                    "type": "file",
                    "url": "http://code.jquery.com/jquery-1.9.1.js"
                },
                "name": "jquery/jquery",
                "version": "1.9.1"
            },
            "type": "package"
        }
    ],
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.2.*",
        "doctrine/orm": "~2.2,>=2.2.3",
        "doctrine/doctrine-bundle": "1.2.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.1.*",
        "symfony/swiftmailer-bundle": "2.2.*",
        "symfony/monolog-bundle": "2.2.*",
        "sensio/distribution-bundle": "2.2.*",
        "sensio/framework-extra-bundle": "2.2.*",
        "sensio/generator-bundle": "2.2.*",
        "jms/security-extra-bundle": "1.4.*",
        "jms/di-extra-bundle": "1.3.*",

        "antimattr/google-bundle": "dev-master",
        "braincrafted/bootstrap-bundle": "dev-master",
        "doctrine/data-fixtures": "dev-master",
        "doctrine/doctrine-fixtures-bundle": "dev-master",
        "doctrine/doctrine-migrations-bundle": "dev-master",
        "doctrine/migrations": "dev-master",
        "friendsofsymfony/comment-bundle": "2.*@dev",
        "friendsofsymfony/rest-bundle": "0.*@dev",
        "friendsofsymfony/user-bundle": "*",
        "gedmo/doctrine-extensions": "master-dev",
        "jquery/jquery": "1.9.*",
        "leafo/lessphp": "dev-master",
        "ornicar/akismet-bundle": "dev-master",
        "twitter/bootstrap": "2.3.*",

        "symfony/framework-bundle": "v2.2.0",
        "hwi/oauth-bundle": "0.2.*@dev"
    },
    "scripts": {
        "post-install-cmd": [
"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": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile"
    ]
    }
}

我用空格分割了不同的要求如下:

  1. 标准Symfony 2.2

 类似资料:
  • 我试图从Symfony 3.3升级一个项目。我得到了这个错误,当我运行作曲家更新,作曲家安装后删除composer.lock和作曲家要求。 PHP致命错误:第223行的phar://C:/Users/bbarhoum/Documents/ComposerSetup/bin/composer.phar/src/composer/dependencysolver/Solver.PHP中内存不足(分配了

  • 基本上我有一个问题-我们有一个基于PHP 5.4构建的Symfony网站,但我们的服务器运行PHP 5.3(是的-它很旧,有超过200个网站,所以我不想升级,以防它破坏旧网站!) 我们知道问题在于条令(速记数组语法)——可以手动更新文件并使用较旧的数组语法。 但我应该可以通过Composer来完成,但我不确定该使用哪个命令。 我知道可能会很简单。我想我应该先问一下,因为如果备份出错,我可能会节省恢

  • 我不敢相信其他人没有想到这一点,但我无法找到解决办法。 假设我有两种实体类型,A和B具有一对多的关系。A有一个B的集合。 对于Bs,A的表单有一个集合类型(CollectionType),对于B有一个自定义的条目类型(entry\u type),允许添加(allow\u add)和删除(allow\u delete)设置为真(true)。创建/填充/呈现表单时,Bs字段由其在集合中的索引标识。当表

  • 我想从学说查询得到数组。我有自我参照实体 应用程序\实体\AccessModom 在此存储库中 应用程序\实体\AccessModuleRepository 这种返回与子级和父级对象的匹配。但是当我想把这个查询作为数组

  • 由于依赖关系冲突,无法完成安装。 正在安装的软件:Android Development Tools 23.0.6.1720515(com.Android.ide.eclipse.ADT.feature.feature.group 23.0.6.1720515) 当前安装的软件:Google App Engine Tools for Android 3.5.1.v201312301719-rel-

  • 我只是想在PHP5.6的服务器上安装我的Symfony 3.2应用程序,而