Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Managing PHP Dependencies with Composer
Search
Chris Taggart
April 01, 2015
Programming
0
47
Managing PHP Dependencies with Composer
Intro to Composer for PHP, Ottawa PHP Meetup - April 1, 2015
Chris Taggart
April 01, 2015
Tweet
Share
Other Decks in Programming
See All in Programming
AIエージェント、”どう作るか”で差は出るか? / AI Agents: Does the "How" Make a Difference?
rkaga
4
2k
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.2k
フロントエンド開発の勘所 -複数事業を経験して見えた判断軸の違い-
heimusu
7
2.8k
CSC307 Lecture 07
javiergs
PRO
0
550
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.2k
AI巻き込み型コードレビューのススメ
nealle
1
300
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
CSC307 Lecture 02
javiergs
PRO
1
780
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
230
Raku Raku Notion 20260128
hareyakayuruyaka
0
130
Patterns of Patterns
denyspoltorak
0
1.4k
MDN Web Docs に日本語翻訳でコントリビュート
ohmori_yusuke
0
650
Featured
See All Featured
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
190
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
430
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
66
sira's awesome portfolio website redesign presentation
elsirapls
0
150
How GitHub (no longer) Works
holman
316
140k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
270
Color Theory Basics | Prateek | Gurzu
gurzu
0
200
Building AI with AI
inesmontani
PRO
1
690
Optimising Largest Contentful Paint
csswizardry
37
3.6k
Transcript
Managing Dependencies with Composer Chris Taggart / @christaggart Ottawa PHP
Meetup / April 2015
None
Who has heard of composer?
Who is using it?
Managing Dependencies Sucks.
A lot.
But it doesn’t have to.
“Old way”
Go to the project’s site
Download a zip file or tarball
Unzip the file
Move it into some shared libraries folder
Scramble when a security fix is released
Repeat.
So much pain.
Enter Composer
None
Composer • Command-line utility with which you install packages. •
Very similar to “npm” or Bundler • Works on *nix, OS X, Windows, PHP 5.3.2+
Packagist
composer.json { "require": { "monolog/monolog": "~1.13" }, "authors": [ {
"name": "Chris Taggart", "email": "
[email protected]
" } ] }
$ composer install
None
composer.lock
Additional Goodies
Autoloading ./vendor/autoload.php require ‘vendor/autoload.php';
Easy to use third-party code <?php $log = new Monolog\Logger('AppLog');
$log->pushHandler(new Monolog\Handler \StreamHandler('app.log', Monolog \Logger::WARNING)); $log->addWarning('Foo');
Or your own code { "autoload": { "psr-4": {"Acme\\": “src/library/"}
} }
Get Composer `curl -sS https://getcomposer.org/installer | php` OR brew install
composer or Windows Installer
CAUTION LIVE DEMO
thephpleague.com
Questions?
Links • getcomposer.org • packagist.org • thephpleague.com