Composer でインストールされているすべてのパッケージのリストとバージョンを取得するにはどうすればよいでしょうか? 質問する

Composer でインストールされているすべてのパッケージのリストとバージョンを取得するにはどうすればよいでしょうか? 質問する

私はローカル マシンで Symfony 2.1 を使用してプロジェクトに取り組んでいます。サーバーにアップロードしましたが、Composer を使用してベンダー バンドルをインストールしようとすると、依存関係エラーが多数発生します。おそらく、Symfony の最新バージョンがリリースされたばかりで、私のcomposer.jsonファイルで正確なバージョン番号が指定されていないことが原因です。

ローカルマシン上のすべてのバージョン番号をすばやく表示する方法はありますか?

これが私の composer.json ファイルです (数日前までは正常に動作していました)。

{
    "name": "symfony/framework-standard-edition",
    "description": "The \"Symfony Standard Edition\" distribution",
    "autoload": {
        "psr-0": { "": "src/" }
    },
    "require": {
        "php": ">=5.3.3",
        "symfony/symfony": "2.1.*",
        "doctrine/orm": ">=2.2.3,<2.4-dev",
        "doctrine/doctrine-bundle": "1.0.*",
        "twig/extensions": "1.0.*",
        "symfony/assetic-bundle": "2.1.*",
        "symfony/swiftmailer-bundle": "2.1.*",
        "symfony/monolog-bundle": "2.1.*",
        "sensio/distribution-bundle": "2.1.*",
        "sensio/framework-extra-bundle": "2.1.*",
        "sensio/generator-bundle": "2.1.*",
        "jms/security-extra-bundle": "1.2.*",
        "jms/di-extra-bundle": "1.1.*",
        "sonata-project/admin-bundle": "*",
        "sonata-project/cache-bundle": "dev-master",
        "sonata-project/doctrine-orm-admin-bundle": "dev-master",
        "stof/doctrine-extensions-bundle": "1.1.x-dev",
        "sonata-project/user-bundle": "dev-master",
        "sonata-project/easy-extends-bundle": "dev-master",
        "friendsofsymfony/user-bundle": "2.0.x-dev",
        "friendsofsymfony/jsrouting-bundle": "*",
        "liip/imagine-bundle": "*",
        "simplethings/form-extra-bundle": "dev-master",
        "antimattr/google-bundle": "dev-master",
        "doctrine/doctrine-fixtures-bundle": "dev-master",
        "genemu/form-bundle": "2.1.*",
        "behat/behat":                  "2.4.*@stable",
        "behat/mink":                   "1.4.*@stable",
        "behat/symfony2-extension":     "*@stable",
        "behat/mink-extension":         "*@stable",
        "behat/mink-selenium2-driver":  "*@stable",
        "behat/mink-browserkit-driver":  "*",
        "liip/functional-test-bundle": "dev-master"
    },
    "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"
        ]
    },
    "minimum-stability": "dev",
    "extra": {
        "symfony-app-dir": "app",
        "symfony-web-dir": "web"
    },
    "config": {
        "bin-dir": "bin/"
    }
}

ベストアンサー1

実行できますcomposer show -i(の略--installed)。

最新バージョンでは を使用しますcomposer show

この-iオプションは非推奨になりました。

globalcomposer のインストールを使用することもできます:composer global show

おすすめ記事