The Rookie
The Rookie

Reputation: 307

Composer update results in "symfony/framework-bundle 2.0.7 requires symfony/translator 2.0.7 -> no matching package found."

The error message is:

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]

The composer version is d929a0813ae473272d151d9ebb2af7ebae451e48, with the following bundles installed:

Googling for the error message mainly returns results containing the error message, but no solution, or pointer in the right direction...

It could be a coincidence, but this message started showing up after running a composer self-update

[edit] My 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"
    ]
    }
}

Upvotes: 2

Views: 3789

Answers (1)

cheesemacfly
cheesemacfly

Reputation: 11762

It will work if you replace in your composer.json:

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

With (for example):

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

The 2 problems were:

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

That requires:

symfony/translator: 2.0.7

But this one doesn't exist anymore...
And then

"hwi/oauth-bundle": "*"

because it needs:

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

So your full composer.json will be:

{
    "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"
    ]
    }
}

I have split up with spaces the different requirements as follow:

  1. The standard Symfony 2.2
  2. The extra bundles in your project
  3. The ones that were causing the issue

Upvotes: 4

Related Questions