DEV Community

Dimitrios Desyllas
Dimitrios Desyllas

Posted on

How I can specify a branch of my library's repo generated by git-flow as composer requirement

I try to use a feature branch of my team's library to the composer.json. Each feature branch is named via git flow therefore they start with feature/.

So as I ask in https://stackoverflow.com/q/61932581/4706711 how I can specify the feature branch on my composer.json in order to test the library's functionality?

Top comments (2)

Collapse
 
brandinchiu profile image
Brandin Chiu

Have you explicitly set your minimum-stability to allow for dev dependencies?

You can also use composer to check out specific commits by hash instead of branch name, which is useful for development but should never make it to production.

The details of how to do that can be found here: getcomposer.org/doc/04-schema.md#p...

{
    "require": {
        "monolog/monolog": "dev-master#2eb0c0978d290a1c45346a1955188929cb4e5db7",
        "acme/foo": "1.0.x-dev#abc123"
    }
}
Collapse
 
bam92 profile image
Abel Lifaefi Mbula

Hi there,

Can't you just switch to that branch?