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
QAフローを最適化し、品質水準を満たしながらリリースまでの期間を最短化する #RSGT2026
shibayu36
2
4.4k
Rust 製のコードエディタ “Zed” を使ってみた
nearme_tech
PRO
0
180
Oxlint JS plugins
kazupon
1
950
Data-Centric Kaggle
isax1015
2
770
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
730
CSC307 Lecture 01
javiergs
PRO
0
690
なぜSQLはAIぽく見えるのか/why does SQL look AI like
florets1
0
460
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
450
Fragmented Architectures
denyspoltorak
0
160
HTTPプロトコル正しく理解していますか? 〜かわいい猫と共に学ぼう。ฅ^•ω•^ฅ ニャ〜
hekuchan
2
690
AIによる高速開発をどう制御するか? ガードレール設置で開発速度と品質を両立させたチームの事例
tonkotsuboy_com
7
2.3k
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.5k
Featured
See All Featured
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
The browser strikes back
jonoalderson
0
370
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
710
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
Building the Perfect Custom Keyboard
takai
2
680
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.8k
How to Ace a Technical Interview
jacobian
281
24k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
WCS-LA-2024
lcolladotor
0
450
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
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