Composer Require

Not many people seem to know this, but you don’t have to edit the composer.json file to update or add to your required packages.

$ php composer.phar require vendor/package1:dev-master
$ php composer.phar require --dev vendor/package2:~1.1.0

This first example adds a normal dependency, and the latter a dev dependency. It’ll run an update on that single package too, if it’s already in there.