Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer: Add branch alias for master #934

Merged
merged 1 commit into from
Mar 24, 2020
Merged

Composer: Add branch alias for master #934

merged 1 commit into from
Mar 24, 2020

Conversation

ocean90
Copy link
Contributor

@ocean90 ocean90 commented Mar 24, 2020

See https://getcomposer.org/doc/articles/aliases.md for info about aliases in composer. This makes it easier to install dev-master while another package wants a specific version.

See Monolog as an example.

@ocean90
Copy link
Contributor Author

ocean90 commented Mar 24, 2020

Example use case: This project uses 6.1.5. Now I want to test new fixes/features so I'm going to try composer global require slevomat/coding-standard:"dev-master". But this fails:

❯ composer global require slevomat/coding-standard:"dev-master"
Changed current directory to /Users/Dominik/.composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - wearerequired/coding-standards dev-master requires slevomat/coding-standard 6.1.5 -> satisfiable by slevomat/coding-standard[6.1.5] but these conflict with your requirements or minimum-stability.
    - wearerequired/coding-standards dev-master requires slevomat/coding-standard 6.1.5 -> satisfiable by slevomat/coding-standard[6.1.5] but these conflict with your requirements or minimum-stability.
    - wearerequired/coding-standards dev-master requires slevomat/coding-standard 6.1.5 -> satisfiable by slevomat/coding-standard[6.1.5] but these conflict with your requirements or minimum-stability.
    - Installation request for wearerequired/coding-standards dev-master -> satisfiable by wearerequired/coding-standards[dev-master].

@kukulich
Copy link
Contributor

composer global require slevomat/coding-standard:"dev-master as 6.1.99" should work I think.

@ocean90
Copy link
Contributor Author

ocean90 commented Mar 24, 2020

Yes, that works too. In my case I'd have to use "dev-master as 6.1.5" due to the strict version constrain.

@kukulich kukulich merged commit 583532c into slevomat:master Mar 24, 2020
@ocean90 ocean90 deleted the feature/branch-alias branch March 25, 2020 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants