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 - Менеджер пакетов для PHP. Серебрянна...
Search
fwdays
November 14, 2011
Programming
2
1k
Composer - Менеджер пакетов для PHP. Серебрянная пуля?
fwdays
November 14, 2011
Tweet
Share
More Decks by fwdays
See All by fwdays
Symfony best practices и не только Олег Зинченко
fwdays
0
1.9k
Beyond Testing Михаил Боднарчук
fwdays
0
710
Yii2 - на пути от Alpha до GA. Взгляд с практической стороны Александр Бордун
fwdays
0
1.7k
Laravel 4: простота во всем. Евгений Косинский
fwdays
0
900
Маленькая библиотека для большой компании. Антон Шевчук
fwdays
0
3.7k
Phalcon. Что нового? Александр Торош
fwdays
0
1k
Выбираем поисковик умом головы. Андрей Аксенов
fwdays
0
1.3k
Past, Present, and Future: The Evolution of PHP Development. Nate Abele
fwdays
0
700
Функциональный тулчейн Nix
fwdays
1
420
Other Decks in Programming
See All in Programming
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.2k
.NET のための通信フレームワーク MagicOnion 入門 / Introduction to MagicOnion
mayuki
1
1.7k
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
Macとオーディオ再生 2024/11/02
yusukeito
0
370
subpath importsで始めるモック生活
10tera
0
310
Compose 1.7のTextFieldはPOBox Plusで日本語変換できない
tomoya0x00
0
190
Generative AI Use Cases JP (略称:GenU)奮闘記
hideg
1
300
CSC509 Lecture 11
javiergs
PRO
0
180
Realtime API 入門
riofujimon
0
150
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
120
Jakarta EE meets AI
ivargrimstad
0
600
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
230
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Embracing the Ebb and Flow
colly
84
4.5k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Faster Mobile Websites
deanohume
305
30k
Navigating Team Friction
lara
183
14k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
Speed Design
sergeychernyshev
25
620
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
Transcript
Composer — Package Management for PHP. Silver Bullet? Kirill chEbba
Chebunin Billix
[email protected]
http://github.com/chEbba @iamchEbba
Problem
Dependent Libraries
Dependent Libraries
Dependent Libraries
Many Separate Projects
Overview of Tools Python: easy_install, pip Ruby: gems
Java: maven, ivy C#(.NET): NuGet, NuPack PHP: PEAR/Pyrus
PEAR. Why NOT? #pyrus mypear = hack Channel1/Package1
!= Channel2/Package1 No “Source”, only “Dists” Special Package Type (+/-)
Composer. Silver Bullet?
Composer. Simple #wget http://getcomposer.org/composer.phar #vi /path/to/project/.composer.json #php
composer.phar install PEAR package on release?
Composer. File { "require": { "vendor/package1": "1.3.2", "vendor/package2": "1.*", "vendor/package3":
">=2.0.3" } }
Composer. Fundamentals Package Repository = Metadata Storage Separated
from Repository Unique Package Name = vendor/package Different Storage Types (Downloaders) “Source” & “Dist” Dependecy Resolver
Composer. Repository File "composer\/composer":{ "name":"composer\/composer", "description":"Package Manager", "maintainers":[], "versions":{ "master-dev":{
"require":{ "php":">=5.3.0", "symfony\/console":"2.0.5", "symfony\/finder":"2.0.5" } } } }
Composer. Repository PlatformRepository (php & extensions) ComposerRepository ($url/composer.json)
PearRepository (PEAR channel support) VcsRepository (github, git, svn, hg) LocalRepository?
Composer. Downloader "source":{ "type":"git", "url":"http:\/\/github.com\/composer\/composer.git", "reference":"e6c3929ea9f7d732ed3352dc06ed950af140ebf7", "shasum":"" }, "dist":{ "type":"zip",
"url":"<...>e6c3929ea9f7d732ed3352dc06ed950af140ebf7", "shasum":"e32a4bac17d56533393b856699491c4c02f3e1ab", "reference":"e6c3929ea9f7d732ed3352dc06ed950af140ebf7" }
Composer. Downloader ZipDownloader (dist) TarDownloader (dist: tar, tar.gz,
tar.bz2) PharDownloader (dist) PearDownloader (dist: uses tar) GitDownloader (source) HgDownloader (source)
Composer. Installer LibraryInstaller (vendor/*) "composer\/composer":{ "name":"composer\/composer", "description":"Package Manager", "type":"library"
}
Composer. Dependency Resolver OpenSUSE's Libzypp satsolver Requires
Conflicts Provides Replaces Recommends Suggests
Composer. Dependency Resolver "require":{ "php":">=5.3.0", "symfony\/console":"2.0.5", "symfony\/finder":"2.0.5" }
Composer. Autoload PSR-0 Autoloading (.composer/autoload.php) "versions":{ "master-dev":{ "autoload":{ "psr-0":{
"Composer":"src\/" } } } }
Questions? =)