Skip to content

Instantly share code, notes, and snippets.

@mre
Created November 4, 2015 11:24
Show Gist options
  • Select an option

  • Save mre/cc2f3decd8c63598db91 to your computer and use it in GitHub Desktop.

Select an option

Save mre/cc2f3decd8c63598db91 to your computer and use it in GitHub Desktop.
Test development branch with composer
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/you/package.git"
}
],
"require": {
"you/package": "dev-bugfix/your-dev-branch as 1.5.x-dev"
}
}
@mre
Copy link
Copy Markdown
Author

mre commented Nov 4, 2015

I always forget how to test a development branch in an application. So I wrote down the modifications to my composer.json.
Please adjust the 1.5.x-dev to be the newest version of your package.
After that run composer update you/package to install the dev branch.

What could also work (untested):

composer config repositories.repo-name vcs https://github.com/you/package.git
composer require dev-bugfix/your-dev-branch as 1.5.x-dev
composer update you/package

@SteamWind
Copy link
Copy Markdown

If you forked a repository, point the original repository in require but use your branch name. If it trows an error, you can see the branch name in the list of the error.

Then use composer update originalteam/rep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment