如何获取所有已安装的软件包以及版本在composer中的列表? [英] How to get list of all installed packages along with version in composer?

查看:363
本文介绍了如何获取所有已安装的软件包以及版本在composer中的列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用Symfony 2.1在我的本地机器上的项目。我已经将其上传到我的服务器,但是当我尝试使用Composer安装供应商捆绑包,我得到了很多依赖性错误。据推测,这是与正在发布的最新版本的Symfony有关,而我的 composer.json 文件没有指定确切的版本号。

I have been working on a project using Symfony 2.1 on my local machine. I have uploaded it to my server but when I try and install the vendor bundles using Composer, I'm getting a lot of dependency errors. Presumably this is something to do with the latest version of Symfony just being released and my composer.json file not specifying exact version numbers.

有什么方法可以快速显示我的本地机器上的一切的版本号?

Is there any way I can quickly display the version numbers of everything on my local machine?

这里是我的composer.json文件几天前):

Here is my composer.json file (which worked fine until a few days ago):

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


推荐答案

您可以运行 composer show -i

在最新版本中只需使用 composer show

In the latest version just use composer show.

-i 选项已弃用。

您还可以使用composer的全局安装: composer global show

You can also use the global instalation of composer: composer global show

这篇关于如何获取所有已安装的软件包以及版本在composer中的列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆