Ok folks, time to get up to speed with the latest developments in composer. Composer is trying hard to get out of alpha version. Let’s help spread the word to summon support and contribute. Here is the run down of new/updated features you may want to have under your arsenal belt:
[logo made by @wizardcat, btw i met this guy in Warsaw :)]
Suppose we were to start with a composer.json something like this:
Notice the new type `project`, and also the first couple of requires. Let’s validate it:
It even offers us the right suggestion. Now suppose we have network problems, and we want to report it or reproduce the problem. No worries, diagnose command to the rescue:
Suppose you get concerned by a rumor some of your bundles have GPL or such forbidding licenses, then just list them with `composer licenses | grep ‘GPL’` or even fail a test if this is different than empty :):
Try running `composer install` now with a mac with updated brew formulas on icu. Currently we are on 52.1 so we will need to downgrade the 53.1 to 52.1 to be able to install the dependencies of our composer.json above or we get this:
Now because you contribute a lot you need to have a way to see if some of your dependencies have been modified and you need to launch a couple of PRs to your peeps. No worries, got you covered with `status` command:
One more time you gotta run the test suite on your project, then use `run-script` (warning: currently only event named commands are allowed):
Then imagine you are under pressure and composer did not work because of a low timeout number. You can display the merged configuration with the `config` command:
Then run the `config` with `–global key value` to up your network setting for composer to work:
Inside your `~/.composer/config.json` will look like this:
Finally, you are just tired of copying or typing your `composer.json` by hand. You then will like the `init` command to do like a boss:
You forgot what you were doing and wanted to see what it was installed?
Encouragements in all good, totally undeserving it and enjoying grace,
your friend @cordoval