SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.
SlideShare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.
Successfully reported this slideshow.
Activate your 14 day free trial to unlock unlimited reading.
2.
● Your app depends on libraries
● Maintenance - keeping up to date
● Libraries depend on other libraries
● Could result in conflicting code - MESS
The Problems
Guzzle Twig PSR-3
Pimple
9.
Now Install
$ php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing symfony/console (v2.3.4)
Downloading: 100%
Writing lock file
Generating autoload files
$
10.
Where Did You Come From?
● Packagist - main repository
● You can make your own (Satis)
11.
Autoloading!
index.php
<?php
require 'vendor/autoload.php';
// You can use your dependencies
// without requiring them all the time
use
SymfonyComponentConsoleApplication;
12.
60 seconds Live Demo (!)
● Download Composer
● Create composer.json
● Run Composer install
● Write index.php
13.
● It’s very simple
● Magical dependencies (recursively)
● You can make your own packages!
● Composer autoloader rocks (PSR-0/4)
● Simplifies deployment!
● Get it here:
Summary
getcomposer.org