Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get list of all installed packages along with version in composer?

Tags:

composer-php

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?

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/"     } } 
like image 234
Dan Avatar asked Mar 03 '13 12:03

Dan


People also ask

How do you check the version of a package installed?

To check the installed version of all npm packages in your project, you can use the npm list command. Note: The npm list command doesn't only show the installed version of packages, but also their dependencies (version). For globally installed packages, you can use the npm list -g command.

Where does composer install global packages?

This will install PHPUnit and all its dependencies into the ~/. composer/vendor/ directory and, most importantly, the phpunit CLI tools are installed into ~/. composer/vendor/bin/.

How do I update all packages in composer?

To update your packagesNavigate to the root of your git repo, where your composer. json file is. Run composer update (on your local machine) to update the required packages and re-generate a composer. lock file.


1 Answers

You can run composer show -i (short for --installed).

In the latest version just use composer show.

The -i options has been deprecated.

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

like image 141
Seldaek Avatar answered Sep 29 '22 02:09

Seldaek



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!