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
Composer Introduction - PHP Practice
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Vallabh Kansagara
January 12, 2016
Technology
0
24
Composer Introduction - PHP Practice
Composer library introduction with developer description with library code.
Vallabh Kansagara
January 12, 2016
Tweet
Share
Other Decks in Technology
See All in Technology
Exadata Fleet Update
oracle4engineer
PRO
0
1.1k
AIエージェントに必要なのはデータではなく文脈だった/ai-agent-context-graph-mybest
jonnojun
1
270
Claude Code for NOT Programming
kawaguti
PRO
1
120
Oracle AI Database移行・アップグレード勉強会 - RAT活用編
oracle4engineer
PRO
0
110
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.4k
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.7k
配列に見る bash と zsh の違い
kazzpapa3
3
180
20260208_第66回 コンピュータビジョン勉強会
keiichiito1978
0
220
[CV勉強会@関東 World Model 読み会] Orbis: Overcoming Challenges of Long-Horizon Prediction in Driving World Models (Mousakhan+, NeurIPS 2025)
abemii
0
160
22nd ACRi Webinar - 1Finity Tamura-san's slide
nao_sumikawa
0
110
登壇駆動学習のすすめ — CfPのネタの見つけ方と書くときに意識していること
bicstone
3
140
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.6k
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
54
Marketing to machines
jonoalderson
1
4.7k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
110
The Cult of Friendly URLs
andyhume
79
6.8k
Building Adaptive Systems
keathley
44
2.9k
How to Talk to Developers About Accessibility
jct
2
140
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
0
260
So, you think you're a good person
axbom
PRO
2
1.9k
Thoughts on Productivity
jonyablonski
74
5k
Crafting Experiences
bethany
1
57
Being A Developer After 40
akosma
91
590k
Transcript
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level PHP Practice Vallabh Kansagara Jr. Consultant KNOWARTH Technologies Pvt. Ltd.
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Your Presenter 2 Vallabh Kansagara (@VRKANSAGARA) http://www.vrkansagara.in
[email protected]
[email protected]
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. 3 Dependency Manager for PHP Topic
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Composer is a tool for dependency management in PHP. It allows you to declare the libraries and manage them for you. 4 Definitions: What is a “Composer”?
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why composer ? 5 ➢ Lightweight Tool. ➢ Widely used by Open Source Application. ➢ Effortless dependency manager for individual project. ➢ Developer just love this tools.
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 6 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git How to get composer? 1. curl -sS https://getcomposer.org/installer | php 2. php -r "readfile('https://getcomposer.org/installer');" | php
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 7 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git How run composer? Use php composer.phar from command line. php composer.phar
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 8 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git Prerequisites for composer . Composer.json file in working directory. Keyword Library name Library version
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 9 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git How to get library list ? Get package name from the https://packagist.org/
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 10 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git How to install dependency? To install project dependency. Just run php composer.phar install from project directory. After installation there are folder and files are bellow.
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 11 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git Composer files and folder overview. Library root directory Composer itself dependant library. Rest of dependant library list. Composer bootstrapping file. Composer library list file. Composer library lock file.
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 12 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git Composer in day to day usage. php composer.phar self-update OR php composer.phar selfupdate This command will update the composer composer.phar file.
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 13 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git Composer in day to day usage. php composer.phar init Initialisation of composer.
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 14 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git Composer in day to day usage. php composer.phar install Install all dependency listed in composer.json file. Also install dependant dependency of library.
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 15 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git Composer in day to day usage. php composer.phar remove Remove library from the composer list and library folder.
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 16 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git Composer in day to day usage. php composer.phar require Install library using composer command. No need to manually edit the composer.json file.
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 17 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git Composer in day to day usage. php composer.phar update This will update the library version as per composer.json file. This is handy place to update the library version and update as per required.
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 18 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git Composer in day to day usage. php composer.phar validate This will validate the composer.json file. This is really helpful command when you have many libraries in composer library.
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 19 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git Composer in day to day usage. php composer.phar dumpautoload / dump-autoload
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 20 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git Composer in day to day usage. Composer dump-autoload in details. { "autoload": { Keyword "classmap": [ Class path. "classes" Folder name of class path. ], "psr-4": { PHP Standard for autoloading. "App\\": "app/" Register namespace for folder. } },
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 21 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git Composer in day to day usage. php composer.phar clear-cache OR php composer.phar clearcache This will clears composer's internal package cache(s).
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level © 2015 KNOWARTH Technologies Pvt. Ltd. Why Docker? 22 ➢ Docker allows applications to be isolated into containers with instructions for exactly what they need to survive that can be easily ported from machine to machine. ➢ Virtual machines also allow the exact same thing, and numerous other tools like Chef and Puppet already exist to make rebuilding these configurations portable and reproducible. ➢ While Docker has a more simplified structure compared to both of these, the real area where it causes disruption is resource efficiency. ➢ Faster delivery of your applications a) WordPress b) Drupal c) Liferay ❖ Deploy and scale more easily a) Jenkins b) Bamboo c) Git Who are using composer library?
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level Questions?
SLIDE TITLE ▪ Click to edit Master text styles ▪
Second level ▪ Third level ▪ Fourth level ▪ Fifth level THANK YOU Email:
[email protected]