2013-04-03 24 views
8

私は新しいSymfony 2.1プロジェクトを作成し、SVNリポジトリからダウンロードしたカスタムパッケージを追加しました。 は、今私はsymfonyの2.2プロジェクトをアップグレードするtryngんだけど、いつでも私は、コマンドを実行しようphp ~/bin/composer.phar update次のエラーメッセージが表示されます。php composer.pharの更新に失敗しました - パッケージ名のタイプミス

{ 
    "name": "symfony/framework-standard-edition", 
    "description": "The \"Symfony Standard Edition\" distribution", 
    "autoload": { 
     "psr-0": { "": "src/" } 
    }, 
    "repositories": [ 
     { 
      "type": "vcs", 
      "url": "svn+ssh://sources.de.ext/usr/local/svnroot/utils" 
     } 
    ], 
    "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.*", 
     "custom/utils": "*" 
    }, 
    "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" 
     ] 
    }, 
    "config": { 
     "bin-dir": "bin" 
    }, 
    "minimum-stability": "alpha", 
    "extra": { 
     "symfony-app-dir": "app", 
     "symfony-web-dir": "web", 
     "branch-alias": { 
      "dev-master": "2.2-dev" 
     } 
    } 
} 

カスタム:

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 
    - The requested package custom/utils could not be found in any version, there may be a typo in the package name. 

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. 

これはsymfony 2.2 composer.jsonですutilsのcomposer.json次があります。

{ 
    "name": "custom/utils", 
    "version": "1.0.0", 
    "description": "The Custom Libraries", 
    "autoload": { 
     "psr-0": { 
      "Blogo": "src/", 
      "WideImage": "lib/" 
     } 
    }, 
    "require": { 
     "symfony/console": "2.*", 
     "symfony/yaml": "2.*" 
    } 
} 

は、誰も私が間違っているでは何を理解するのに役立つ可能性があり

新しい2.2 Symfony?このエラーメッセージはSymfony 2.2のアップグレードのみで表示されるためです。

+0

'' custom/utils ":" * "'行を 'dev-master'に置き換えてみてください –

+0

ありがとう、私は' 'custom/utils ''を試しました:" 1.0.0 "'、 '要求されたパッケージcustom/utils 1.0.0が見つかりませんでした。 'というエラーメッセージが表示されました。 – freedev

+0

1.0.0は有効なバージョンではない可能性があります。ほとんどのバンドルは、私が知っている限り、 'dev-master'を使用しています(私はSymfonyにはかなり新しいです)。 –

答えて

8

composer update --verboseまたはcomposer show custom/utils --verboseを試してみてください。両方とも、SVNリポジトリの読み込みに関する出力を表示します。どのバージョンがロードされているかを示すはずです。

私の推測では、利用可能なバージョンはdev-trunkで、必要な場合は動作する可能性があります。 composer.jsonにはversion: 1.0.0を指定しないでください。コンポーザーはVCSのタグ/ブランチからバージョン情報を読み込むためです。

+0

あなたの提案に従うようにしましたので、バージョンを '' custom/utils ''' composer.json'に削除しました。何も変わっていません。 symfony 2.2 'composer.json'にバージョンとして' 'trunk ''を指定しようとしました。 問題1 - blogo/utils trunkへのインストール要求 - > blogo/utils dev-trunkで充足可能です。 - 削除要求。新しいエラーメッセージが表示されました。 blogo/utils == 9999999-dev' – freedev

+2

バージョンは 'dev-trunk'ではない' trunk'です。Composerはブランチ名の前に 'dev-'という接頭辞を付加して不安定なターゲット(時間の経過とともに変化しないタグ) 。 – Seldaek

関連する問題