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
Using & Extending Composer
Search
Till Klampaeckel
November 07, 2013
Technology
6
790
Using & Extending Composer
My talk from Symfony Live 2013 in Berlin.
Till Klampaeckel
November 07, 2013
Tweet
Share
More Decks by Till Klampaeckel
See All by Till Klampaeckel
Extending Composer
till
2
920
Jimdo Tech Talk: The evolution of deployment
till
0
100
Managing remote teams
till
4
230
EasyBib & Cloudant
till
1
600
Collecting Metrics
till
3
580
SUHOSIN - PHP's safety net
till
2
360
nano
till
1
360
Other Decks in Technology
See All in Technology
データプラットフォーム技術におけるメダリオンアーキテクチャという考え方/DataPlatformWithMedallionArchitecture
smdmts
5
660
急成長を支える基盤作り〜地道な改善からコツコツと〜 #cre_meetup
stefafafan
0
150
製造業からパッケージ製品まで、あらゆる領域をカバー!生成AIを利用したテストシナリオ生成 / 20250627 Suguru Ishii
shift_evolve
PRO
1
150
Delegating the chores of authenticating users to Keycloak
ahus1
0
130
5min GuardDuty Extended Threat Detection EKS
takakuni
0
160
How Community Opened Global Doors
hiroramos4
PRO
1
130
A2Aのクライアントを自作する
rynsuke
1
220
GitHub Copilot の概要
tomokusaba
1
140
Model Mondays S2E03: SLMs & Reasoning
nitya
0
220
強化されたAmazon Location Serviceによる新機能と開発者体験
dayjournal
3
230
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
26k
生成AIで小説を書くためにプロンプトの制約や原則について学ぶ / prompt-engineering-for-ai-fiction
nwiizo
4
2.9k
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
53k
Agile that works and the tools we love
rasmusluckow
329
21k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Unsuck your backbone
ammeep
671
58k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Become a Pro
speakerdeck
PRO
28
5.4k
How to Ace a Technical Interview
jacobian
277
23k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
490
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Transcript
www.easybib.com jobs@imagineeasy.com Using & Extending Composer Your daily life with
Composer
www.easybib.com jobs@imagineeasy.com Till I’m Till Klampäckel
www.easybib.com jobs@imagineeasy.com Till Good to meet you.
www.easybib.com jobs@imagineeasy.com Find me online @klimpong http://github.com/till http://till.klampaeckel.de/
www.easybib.com jobs@imagineeasy.com Till 15 years of experience
www.easybib.com jobs@imagineeasy.com ImagineEasy Solutions LLC An information literacy company.
www.easybib.com jobs@imagineeasy.com Information Literacy •avoid plagiarism •evaluate sources
www.easybib.com jobs@imagineeasy.com EasyBib.com EasyBib is an citation management platform. 40
million students use EasyBib every year. Over 1000 institutions subscribe, including 100 large US universities and 900 high schools and districts.
www.easybib.com jobs@imagineeasy.com ResearchReady.com ResearchReady teaches information literacy skills in a
core curriculum. Universities and districts subscribe to give their students a research skill boost. Launched in January 2013.
www.easybib.com jobs@imagineeasy.com Stack •PHP (5.3 & 5.4, on the way
to 5.5) •Nginx + Linux •AWS (OpsWorks, RDS, ElasticCache) •Solr, ElasticSearch •CouchDB / BigCouch •Travis-CI, PHPUnit, Behat •Vagrant, Chef, Virtualbox, Packer
www.easybib.com jobs@imagineeasy.com Commercial break Some rights reserved by claire.whitehouse http://www.flickr.com/photos/citysnidget/
SOUNDS GOOD? WE’RE HIRING! till+symfonylive@imagineeasy.com
www.easybib.com jobs@imagineeasy.com Composer We embrace it.
www.easybib.com jobs@imagineeasy.com Composer Dependency management
www.easybib.com jobs@imagineeasy.com Composer Dependency resolution
www.easybib.com jobs@imagineeasy.com Composer Semantic Versioning
www.easybib.com jobs@imagineeasy.com Composer Major.Minor.Bugfix 1.0.1
www.easybib.com jobs@imagineeasy.com Composer http://semver.org/
www.easybib.com jobs@imagineeasy.com Composer Your first package
www.easybib.com jobs@imagineeasy.com Composoring your code { “name”: “till/secret-sauce”, “license”: “MIT”
}
www.easybib.com jobs@imagineeasy.com Next step Publish code. —
www.easybib.com jobs@imagineeasy.com Packagist •register on packagist.org •submit your package •setup
the service-hook (Github)
www.easybib.com jobs@imagineeasy.com Ship it!
www.easybib.com jobs@imagineeasy.com Shipping it • `git tag -a 1.0.0 -m
“this is my rock-solid 1.0.0”` `git push --tags` • `svn cp trunk tags/1.0.0`
www.easybib.com jobs@imagineeasy.com Consuming { “name”: “fabpot/awesome”, “require”: { “till/secret-sauce”: “~1.0”
} }
www.easybib.com jobs@imagineeasy.com Consuming { “name”: “fabpot/awesome”, “repositories”: [ { “type”:”package”,
“package”: { “name”: “sensio/legacy-code”, “version”: “3.2.4”, “dist”: { “url”: “http://dev.local/secret.zip”, “type”: “zip” } } } ], “require”: { “sensio/legacy-code”: “3.2.4”, “till/secret-sauce”: “~1.0” } }
ACHTUNG, ACHTUNG.
www.easybib.com jobs@imagineeasy.com Repositories • Repositories are not inherited. • Put
open source code on packagist, or get satis.
www.easybib.com jobs@imagineeasy.com Consuming • There are a lot, lot more
options. • Check http://getcomposer.org/
www.easybib.com jobs@imagineeasy.com Installing cd awesome-application curl -sS http://getcomposer.org/installer |php ./composer.phar
install
www.easybib.com jobs@imagineeasy.com What else? • Update your dependencies. • Search
for dependencies. • Development dependencies. • Classmap and PSR-0 autoloaders. • “help”
Breath.
www.easybib.com jobs@imagineeasy.com One more thing Do you know composer’s global
command?
www.easybib.com jobs@imagineeasy.com Go PEAR! Go global! •$COMPOSER_HOME/composer.json •./composer.phar global install
www.easybib.com jobs@imagineeasy.com Satis Your own private packagist.org.
Because what could go wrong?
www.easybib.com jobs@imagineeasy.com Things that will go wrong • Github is
down. • Packagist is down. • Internet is slow. • Internet doesn’t work. • Tags get deleted. (cc fabpot :)
Own your availability!
www.easybib.com jobs@imagineeasy.com Captain Obvious Your proprietary code is private.
www.easybib.com jobs@imagineeasy.com Setup ./composer.phar \ create-project \ composer/satis \ --stability=dev
\ --prefer-dist
www.easybib.com jobs@imagineeasy.com satis.json { "name": "Till's satis", "homepage": "http://satis.local", "require-all":
true, "repositories": [ {"packagist": false}, { "type":"vcs", "url":"http://github.com/fabpot/symfony" } ] }
www.easybib.com jobs@imagineeasy.com Build ./bin/satis build ./satis.json public php -S 0.0.0.0:80
-t public
www.easybib.com jobs@imagineeasy.com Build
www.easybib.com jobs@imagineeasy.com Go back { “name”: “fabpot/awesome”, “repositories”: [ {
“type”:”composer”, “url”: “http://satis.local” } ], “require”: { “sensio/legacy-code”: “3.2.4”, “till/secret-sauce”: “~1.0” } }
www.easybib.com jobs@imagineeasy.com Next steps • fork code — e.g. to
a local backup server • generate your own downloads • configure Amazon S3 as a backend
www.easybib.com jobs@imagineeasy.com Next steps http://www.flickr.com/photos/mightymightymatze/
Want even more?
www.easybib.com jobs@imagineeasy.com Extending Composer Or, bending Composer to your will.
www.easybib.com jobs@imagineeasy.com Plugins
www.easybib.com jobs@imagineeasy.com Composer installer
www.easybib.com jobs@imagineeasy.com Composer installer Install jQuery, bootstrap, etc.! https://github.com/RobLoach/component-installer
www.easybib.com jobs@imagineeasy.com Composer installer • aura • ezPublish • flow/typo3
• fuel • magento • wordpress • yii
www.easybib.com jobs@imagineeasy.com Event-Plugins
www.easybib.com jobs@imagineeasy.com Plugin Events COMMAND https://github.com/easybiblabs/composer-newrelic
www.easybib.com jobs@imagineeasy.com Plugin Events PRE_FILE_DOWNLOAD https://github.com/naderman/composer-aws
We’re almost done!
Lessons learned.
www.easybib.com jobs@imagineeasy.com Deploying with Composer is hard
www.easybib.com jobs@imagineeasy.com Github is down more often than you think
www.easybib.com jobs@imagineeasy.com Github is not down as often as you
think :)
www.easybib.com jobs@imagineeasy.com API limits suck
www.easybib.com jobs@imagineeasy.com Composer wants your RAM
www.easybib.com jobs@imagineeasy.com ~/.composer/config.json
www.easybib.com jobs@imagineeasy.com Always “composer validate”
www.easybib.com jobs@imagineeasy.com Always check in the “composer.phar”
www.easybib.com jobs@imagineeasy.com Versioning is hard
www.easybib.com jobs@imagineeasy.com Dependency resolution
www.easybib.com jobs@imagineeasy.com “composer update” broke my app
www.easybib.com jobs@imagineeasy.com #1 contender for merge conflicts: The composer.lock
www.easybib.com jobs@imagineeasy.com Thanks! Questions?