How to remove globally a package from Composer?

To remove a globally installed package run: composer global remove phpunit/phpunit global command lets you to run many commands like install, require or update as if you were running them from the COMPOSER_HOME directory. Read the related documentation here: http://getcomposer.org/doc/03-cli.md#global COMPOSER_HOME depends on your system (on Linux it’s ~/.composer), see http://getcomposer.org/doc/03-cli.md#composer-home for more details.

How to correctly require a specific commit in Composer so that it would be available for dependent packages?

You’ll have to explicitly require the Gaufrette library at that hash, with a dev flag, in both your library and your application. Something like this should work in the application composer.json: { “name”: “bar/bar-app”, “repositories”: [ { “type”: “vcs”, “url”: “ssh://git.example.com/foo-lib” } ], “require-dev”: { “foo/foo-lib”: “dev-master”, “knplabs/gaufrette”: “dev-master#2633721877cae79ad461f3ca06f3f77fb4fce02e” } } From the documentation: If … Read more

Use PHP composer to clone git repo

That package in fact is available through packagist. You don’t need a custom repository definition in this case. Just make sure you add a require (which is always needed) with a matching version constraint. In general, if a package is available on packagist, do not add a VCS repo. It will just slow things down. … Read more