Skip to content

Composer in project with branch alias sometimes refuses to install dependencies #8579

@ondrejmirtes

Description

@ondrejmirtes

My composer.json: https://github.com/phpstan/phpstan-src/blob/master/composer.json

When I run this command:

composer update

I get the following output:

    - phpstan/phpstan-strict-rules 0.12.0 requires phpstan/phpstan ^0.12 -> satisfiable by phpstan/phpstan[0.12.0, 0.12.1, 0.12.2, 0.12.3, 0.12.4, 0.12.5, 0.12.6, 0.12.7, 0.12.8, 0.12.9, 0.12.x-dev].
    - phpstan/phpstan-strict-rules 0.12.1 requires phpstan/phpstan ^0.12 -> satisfiable by phpstan/phpstan[0.12.0, 0.12.1, 0.12.2, 0.12.3, 0.12.4, 0.12.5, 0.12.6, 0.12.7, 0.12.8, 0.12.9, 0.12.x-dev].
    - phpstan/phpstan-strict-rules 0.12.2 requires phpstan/phpstan ^0.12.6 -> satisfiable by phpstan/phpstan[0.12.6, 0.12.7, 0.12.8, 0.12.9, 0.12.x-dev].
    - phpstan/phpstan-strict-rules 0.12.x-dev requires phpstan/phpstan ^0.12.6 -> satisfiable by phpstan/phpstan[0.12.6, 0.12.7, 0.12.8, 0.12.9, 0.12.x-dev].
    - don't install phpstan/phpstan 0.12.0|remove phpstan/phpstan-src dev-ad2293bf2871cfa2b005e9acbb5889322244cfbf
    - don't install phpstan/phpstan 0.12.1|remove phpstan/phpstan-src dev-ad2293bf2871cfa2b005e9acbb5889322244cfbf
    - don't install phpstan/phpstan 0.12.2|remove phpstan/phpstan-src dev-ad2293bf2871cfa2b005e9acbb5889322244cfbf
    - don't install phpstan/phpstan 0.12.3|remove phpstan/phpstan-src dev-ad2293bf2871cfa2b005e9acbb5889322244cfbf
    - don't install phpstan/phpstan 0.12.4|remove phpstan/phpstan-src dev-ad2293bf2871cfa2b005e9acbb5889322244cfbf
    - don't install phpstan/phpstan 0.12.5|remove phpstan/phpstan-src dev-ad2293bf2871cfa2b005e9acbb5889322244cfbf
    - don't install phpstan/phpstan 0.12.6|remove phpstan/phpstan-src dev-ad2293bf2871cfa2b005e9acbb5889322244cfbf
    - don't install phpstan/phpstan 0.12.7|remove phpstan/phpstan-src dev-ad2293bf2871cfa2b005e9acbb5889322244cfbf
    - don't install phpstan/phpstan 0.12.8|remove phpstan/phpstan-src dev-ad2293bf2871cfa2b005e9acbb5889322244cfbf
    - don't install phpstan/phpstan 0.12.9|remove phpstan/phpstan-src dev-ad2293bf2871cfa2b005e9acbb5889322244cfbf
    - don't install phpstan/phpstan 0.12.x-dev|remove phpstan/phpstan-src dev-ad2293bf2871cfa2b005e9acbb5889322244cfbf
    - Installation request for phpstan/phpstan-src dev-ad2293bf2871cfa2b005e9acbb5889322244cfbf -> satisfiable by phpstan/phpstan-src[dev-ad2293bf2871cfa2b005e9acbb5889322244cfbf].
    - Installation request for phpstan/phpstan-strict-rules ^0.12 -> satisfiable by phpstan/phpstan-strict-rules[0.12.0, 0.12.1, 0.12.2, 0.12.x-dev].

But only sometimes. It works when I'm checked out on master. It always works in Travis CI, no matter if it's on master or a pull request or a tag. But it fails in Travis CI when I push some other branch than master, and it always fails in GitHub actions. See:

I'm not sure what's different in these cases and I'd expect it to work in GitHub Actions and also on other branches than master.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions