Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Composer: Modern PHP Package Management
Search
Justin Yost
April 08, 2016
Programming
76
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Composer: Modern PHP Package Management
Justin Yost
April 08, 2016
More Decks by Justin Yost
See All by Justin Yost
Laravel 6, 7 and Other Goodies
justinyost
2
130
PHP and Databases
justinyost
2
68
Ansible: What Is It and What Is It Good For?
justinyost
0
87
Generators: All About the Yield
justinyost
0
11
Laravel 6: What's New and What's Changed
justinyost
0
240
Middleware: Between the Framework and the Browser
justinyost
2
120
Caching and You and You and You and You...
justinyost
0
98
Git: The Pain and the Gain
justinyost
0
210
Generators: All About the Yield
justinyost
0
310
Other Decks in Programming
See All in Programming
Heart of Swift Concurrency
koher
0
890
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
320
アクセシビリティから考える情報設計
high_g_engineer
0
380
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
250
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
5
3.3k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
160
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
220
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
4
2.3k
XHTMLが残したもの
yosuke_furukawa
PRO
2
810
AGENTS.md Is Not Enough:Build Skills, Don't Download Them
lx_t
0
120
一人だけ、Kiroが静止する日
hideg
0
110
モジュールの視点からSwiftを読み解く #iosdc
s_shimotori
0
180
Featured
See All Featured
Docker and Python
trallard
47
4.2k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
120
120k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
840
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
280
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
700
Visualization
eitanlees
152
17k
Un-Boring Meetings
codingconduct
0
420
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
570
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
370
How GitHub (no longer) Works
holman
316
150k
The SEO Collaboration Effect
kristinabergwall1
1
570
Transcript
Composer: Modern PHP Package Management Justin Yost Web Developer at
Loadsys
What is Composer? —Composer is a modern PHP Dependency Management
Tool
What is Dependency Management? —Install Stuff —Everyone else installs same
version of stuff
Why Do I Care? —Multiple teammates —Install multiple versions on
your machine —Easily stay up to date —Build new projects with Awesome Framework
Requirements —PHP 5.3.2+
Install Mac: php composer-setup.php --install-dir=bin --filename=composer mv composer.phar /usr/local/bin/composer Windows:
look in the docs
What Now? —Now, we can install packages pretty easily
Example
composer require rych/random
require __DIR__ . '/vendor/autoload.php'; $random = new Rych\Random\Random(); $randomInt =
$random->getRandomInteger(1, 100); echo $randomInt . "\r\n";
Where should you use Composer —Everywhere you have a dependency
as part of your PHP projects —Everywhere you have a shared PHP project
What all can Composer do? —It doesn't have to be
PHP —Loadsys has a suite of shell scripts managed via Composer —github.com/loadsys/CakePHP-Shell-Scripts
What all can Composer do? —It doesn't have to be
public facing —Composer will hook into private repositories
What all can Composer do? —The project doesn't even have
to use Composer itself —Composer will install Git/SVN/Mercurial/PEAR backed projects by itself
What all can Composer do? —Install Dependencies for Dev Only
—composer require --dev {vendor/package} —composer install --dev/--no-dev
What all can Composer do? —PHP Version/Extension Requirements "require": {
"php": ">=5.6.0", "ext-openssl": "*" }
What all can Composer do? —SubDependencies —Example chain: symfony/symfony ->
doctrine/common -> doctrine/inflector -> php >=5.3.2
What all can Composer do? —SubDependencies in DevMode —Only installs
top level dev dependencies —Example chain: symfony/symfony -> cache/integration- tests -> psr/cache -> php: >=5.3.0
What all can Composer do? —Lock to Major/Minor/Patch Releases vendor/package:
3.* vendor/package: 3.0.* vendor/package: ~1.2 vendor/package: ~1.2.3 vendor/package: ^1.2.3 vendor/package: ^0.3
What all can Composer do? —Suggest other packages "suggest": {
"vendor/package": "Allow you to do other awesome thing.", },
What all can Composer do? —List Meta Information for Package
"homepage", "license", "authors", "support", "keywords", "description",
What all can Composer do? —Replace other packages "replace": {
"vendor/package": "self.version" }
What all can Composer do? —Conflicts "conflict": { "vendor/package": "1.2.3"
}
What all can Composer do? —Install SubTypes "type": "library", "type":
"project", "type": "metapackage",
What all can Composer do? —Install Custom Types —https://github.com/composer/installers "type":
"wordpress-plugin", "require": { "composer/installers": "~1.0" }
What all can Composer do? —Install Specific Branches "require": {
"vendor/package": "dev-bugfixes" }
Example
Composer Create Project composer create-project —create-project is pretty unique to
Composer —Clones a package, installs dependencies and run scripts for setup, etc
Example
Packagist —Packagist is a repository of Composer Packages for the
PHP Community —Packagist is open source and you can add your own packages
Publish your own stuff on Packagist —Code
ToranProxy —Internal version of Packagist —Provides dupes of public packages
—Provides hosting for internal only packages
Upgrade Your Development Process —Composer will make your projects easier
to manage —Composer will make dependencies less of a hassle —Composer will make deployments simpler and easier
Composer Workflow —composer require —composer install —composer update —composer remove
Final Thoughts —Composer is PHP's way of handling dependency management
—Composer is pretty easy to get started with —Publish your stuff with Composer/Packagist
Thanks/Questions? —twitter.com/justinyost —github.com/justinyost —justinyost.com —lynda.com/justinyost