Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Composer - Менеджер пакетов для PHP. Серебрянна...

fwdays
November 14, 2011

Composer - Менеджер пакетов для PHP. Серебрянная пуля?

fwdays

November 14, 2011
Tweet

More Decks by fwdays

Other Decks in Programming

Transcript

  1. Overview of Tools  Python: easy_install, pip  Ruby: gems

     Java: maven, ivy  C#(.NET): NuGet, NuPack  PHP: PEAR/Pyrus
  2. PEAR. Why NOT?  #pyrus mypear = hack  Channel1/Package1

    != Channel2/Package1  No “Source”, only “Dists”  Special Package Type (+/-)
  3. Composer. Fundamentals  Package Repository = Metadata  Storage Separated

    from Repository  Unique Package Name = vendor/package  Different Storage Types (Downloaders)  “Source” & “Dist”  Dependecy Resolver
  4. Composer. Repository  PlatformRepository (php & extensions)  ComposerRepository ($url/composer.json)

     PearRepository (PEAR channel support)  VcsRepository (github, git, svn, hg)  LocalRepository?
  5. Composer. Downloader "source":{ "type":"git", "url":"http:\/\/github.com\/composer\/composer.git", "reference":"e6c3929ea9f7d732ed3352dc06ed950af140ebf7", "shasum":"" }, "dist":{ "type":"zip",

    "url":"<...>e6c3929ea9f7d732ed3352dc06ed950af140ebf7", "shasum":"e32a4bac17d56533393b856699491c4c02f3e1ab", "reference":"e6c3929ea9f7d732ed3352dc06ed950af140ebf7" }
  6. Composer. Downloader  ZipDownloader (dist)  TarDownloader (dist: tar, tar.gz,

    tar.bz2)  PharDownloader (dist)  PearDownloader (dist: uses tar)  GitDownloader (source)  HgDownloader (source)
  7. Composer. Dependency Resolver  OpenSUSE's Libzypp satsolver  Requires 

    Conflicts  Provides  Replaces  Recommends  Suggests