Did you ever install some packages through it? • How many? • Which ones? • MDB2, System_Daemon, XML_RPC, PHPUnit? • Installed on system, not project • Where's the list of required packages for current project? • Forget about it ...
Noooo, new thing to my “well-run” development flow – I don't want nothing new, I like my “bubble” • But then – Mother of God, I can't live without it • So, don't be too conservative, try and learn new things. It's the only way how to stay in touch.
-sS https://getcomposer.org/installer | php • Make simlink to /usr/local/bin/composer or wherever sudo ln -s ~/composer.phar /usr/local/bin/composer • Nothing complicated, composer command is now available • There's also installer for Windows – Next, Yes, Next, Next, Yes, Finish
– MAJOR version when you make incompatible API changes (BC breaks) – MINOR version when you add functionality in a backwards-compatible manner, and – PATCH version when you make backwards-compatible bug fixes. • For more information: http://semver.org
!=) – >=3.1.0, <3.2 • Match: 3.1.1, 3.1.20, 3.1.20.5 • Not match: 3.2, – >=1.3, <2 • Match: 1.4, 1.8.25, 1.9.2.16 • Not match: 2.0 • Use comma “,” to do AND • Use pipe “|” to do OR
https://packagist.org/ – Once you register, it will scan your projects (branches and tags) • Composer's repository types: – composer (default) – vcs – pear – package (vcs, zip, tar, ...)
autoloading classes • Is impossible to manage everything manually • Composer has “special” autoloader which require all other autloaders • Only one require in bootstrap file
--dev is the default behavior – Will install packages in require-dev section – Use --no-dev on production • Test installation before deployment – Next run will be loaded from cache • Set {“packagist”: false} in repositories section if you don't need any public packages • Secure your own package archiver with SSH • Read composer.json on popular PHP projects