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
Managing PHP Dependencies with Composer
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Chris Taggart
April 01, 2015
Programming
48
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Managing PHP Dependencies with Composer
Intro to Composer for PHP, Ottawa PHP Meetup - April 1, 2015
Chris Taggart
April 01, 2015
Other Decks in Programming
See All in Programming
PumaからFalconに移行したRailsアプリケーションでの実践
falcon8823
0
170
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
210
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
270
R8 の設定見直しでアプリサイズ削減
andpad
0
220
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
220
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
150
APNsからLive Activityを開始する話
yumnumm
0
170
Next.js: The final boss of Web Performance
guaca
0
250
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
28
32k
Featured
See All Featured
A better future with KSS
kneath
240
18k
Deep Space Network (abreviated)
tonyrice
0
370
Discover your Explorer Soul
emna__ayadi
2
1.3k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
550
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
630
Embracing the Ebb and Flow
colly
88
5.2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.9k
Designing Powerful Visuals for Engaging Learning
tmiket
1
610
We Are The Robots
honzajavorek
0
400
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
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