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

Managing your code with Composer and Satis

Mihai Nica
January 14, 2016

Managing your code with Composer and Satis

A brief introduction into self hosted package repositories for Composer using Satis at Symfony Bucharest Meetup

Mihai Nica

January 14, 2016

Transcript

9 slides
  1. Composer • Easy management for 3rd party code • Dependencies

    and requirements • Handles autoloading • Other goodies
  2. Satis • static repository generator • used to host your

    private packages • can do caching, but it’s a lot of manual work involved • has support for lots of package types (vcs, archives)
  3. { "name": “My repository", "homepage": "http://packages.localhost", "repositories": [ { "type":

    "vcs", "url": “https://github.com/redecs/php-test-package" } ], "require-all": true }
  4. Composer + Satis • reference to the custom repository •

    bypass packagist (if you have caching enabled) • credentials to access the code
  5. { "name": "redecs/composer-test", "description": "Test composer project", "repositories": [ {"type":

    "composer", "url": "http://localhost:8000/repo/private/"} ], "require": { "symfony/console": "^2.8", "redecs/php-test-package": "1.0" }, "authors": [ {"name": "Mihai Nica”, "email": "[email protected]"} ] }
  6. Creating your own packages • Write code • composer init

    for the package • manage the code with your favorite VCS:
 git add . && git commit -m “first release” && git tag - a 1.0 && git push --tags

More Decks by Mihai Nica

Other Decks in Programming