Slide 1

Slide 1 text

Symfony Bucharest meetup Managing your code with Composer and Satis

Slide 2

Slide 2 text

Composer • Easy management for 3rd party code • Dependencies and requirements • Handles autoloading • Other goodies

Slide 3

Slide 3 text

{ "name": "redecs/composer-test", "description": "Test composer project", "require": { "symfony/console": "^2.8" }, "authors": [ { "name": "Mihai Nica", "email": "mihai@wisesystems.co" }] }

Slide 4

Slide 4 text

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)

Slide 5

Slide 5 text

{ "name": “My repository", "homepage": "http://packages.localhost", "repositories": [ { "type": "vcs", "url": “https://github.com/redecs/php-test-package" } ], "require-all": true }

Slide 6

Slide 6 text

Composer + Satis • reference to the custom repository • bypass packagist (if you have caching enabled) • credentials to access the code

Slide 7

Slide 7 text

{ "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": "mihai@wisesystems.co"} ] }

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

• mihai@wisesystems.co • https://twiter.com/redecs • https://facebook.com/redecs
 
 
 
 Mihai Nica ?> Thank you!