-
Initialise your composer
$ php composer.phar init
-
Require the package as normal - for this, we're demonstrating with esendex/sdk
$ php composer.phar require esendex/sdk:1.0.* ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) - Installing esendex/sdk (v1.0.7) Cloning 68ec1747466f73d88c7ae768751a03b4f3a28fce Writing lock file Generating autoload files
-
Edit your
composer.json
and add the repository source, and set the version of the sdk to matchdev-[branch] as 1.0.7
where 1.0.7 is the version you wish to target if this branch was merged to master{ "name": "esendex/php-sdk-test", "require": { "esendex/sdk": "dev-Add-Survey-API-integration as 1.0.7" }, "authors": [ { "name": "EsendexDev", "email": "[email protected]" } ], "repositories": [ { "type": "git", "url": "https://github.com/esendex/esendex-php-sdk" } ] }
-
Update the dependencies with composer
$ php composer.phar update Loading composer repositories with package information Updating dependencies (including require-dev) - Updating esendex/sdk (v1.0.7 => dev-new-feature 8c38f2d) Checking out 8c38f2dabaeefdf7044f85d569645680b38b9c2d Writing lock file Generating autoload files
Last active
February 3, 2016 08:42
-
-
Save Codesleuth/e59d6437b4a0046cdb26 to your computer and use it in GitHub Desktop.
Require dev branch in PHP with composer
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment