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

Decomposing Packages (Symfony Live Berlin 2015)

Decomposing Packages (Symfony Live Berlin 2015)

Using Composer and Packagist makes using 3rd-party code easier but relying on 3rd-party code can have drawbacks. Projects are abandoned. Maintainers become unresponsive. Fortunately, Composer provides tools to help make these situations a little easier to manage. Learn how to leverage Composer features like "replace" and tools like Satis to manage forks of 3rd-party packages. See pros and cons of various methods so that you can feel more confident in how you decide to move forward with decomposing other people's packages.

Beau Simensen

October 15, 2015
Tweet

More Decks by Beau Simensen

Other Decks in Programming

Transcript

  1. Consumer's composer.json { "require": { "their-vendor/their-package": "^1.0" }, "repositories": {

    "their-package": { "type": "vcs", "url": "https://github.com/me/their-package" } } }
  2. Consumer's composer.json { "require": { "their-vendor/their-package": "^1.0" }, "repositories": {

    "their-package": { "type": "vcs", "url": "file:///path/to/clone-of/their-package" } } }
  3. as

  4. Consumer's composer.json { "require": { "their-vendor/their-package": "dev-my-fix as 1.0.5" },

    "repositories": { "their-package": { "type": "vcs", "url": "file:///path/to/clone-of/their-package" } } }
  5. Consumer's composer.json { "require": { "their-vendor/their-package": "^1.0" }, "repositories": {

    "their-package": { "type": "path", "url": "../their-package" } } }
  6. Many Stack Middleware Have Pimple 1 at Their Core... {

    "name": "stack/session", "require": { "pimple/pimple": "^1.0" } }
  7. When you install a library, you are responsible for the

    code in that library. — https://igor.io/2013/09/24/dependency- responsibility.html