andig
andig

Reputation: 13878

How to create composer package from non-master branch

I've forked a non-composer repo on GitHub and created a composer-enabled feature branch. I'd like to publish that branch on packagist. Packagist fails with

No composer.json was found in the master branch

which is true.

Can I tell Packagist to look at a non-master branch for package creation instead?

Upvotes: 4

Views: 1087

Answers (1)

Seldaek
Seldaek

Reputation: 42036

Composer/Packagist look for composer.json in the default branch as configured on github. If that default branch is develop for example that will work, but setting a default branch to composer sounds a bit weird. It'd probably be easiest to just merge it in master.

That said, the best would be to send a pull request and in the meantime (while waiting for a merge) use the repository via a VCS repo http://getcomposer.org/doc/05-repositories.md#vcs (this will still require you to merge it in the master branch in your repo) instead of polluting packagist with temporary forks.

Upvotes: 1

Related Questions