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

Adding branch alias to composer.json #44

Closed
wants to merge 2 commits into from

Conversation

onema
Copy link

@onema onema commented May 29, 2014

Adding branch alias to prevent version conflict when using latest master version. See Aliases for more information.

],
"extra": {
"branch-alias": {
"dev-master": "5.2.x-dev"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already outdated and should be raised up to 5.4.x-dev

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you I will update it.

@saturnism saturnism self-assigned this Jul 8, 2014
@saturnism
Copy link
Contributor

thanks - we'll look into this.

@saturnism
Copy link
Contributor

@onema btw - is this intended for ppl referring to dev-master version?

@onema
Copy link
Author

onema commented Jul 16, 2014

Sorry I never got back to you.

Yes. This is to prevent issues when you want to use the dev-master version. You would refer to it as 5.4.*@dev

Quoting the composer documentation:

When you are using a VCS repository, you will only get comparable versions for branches that look like versions, such as 2.0 or 2.0.x. For your master branch, you will get a dev-master version. For your bugfix branch, you will get a dev-bugfix version.

If your master branch is used to tag releases of the 1.0 development line, i.e. 1.0.1, 1.0.2, 1.0.3, etc., any package depending on it will probably require version 1.0.*.

If anyone wants to require the latest dev-master, they have a problem: Other packages may require 1.0.*, so requiring that dev version will lead to conflicts, since dev-master does not match the 1.0.* constraint.

See Aliases for more information.

Update branch alias version to 5.4.x-dev
@saturnism
Copy link
Contributor

@onema I'd prefer not to depending on dev-master and should probably choose a version to use.

@saturnism saturnism closed this Jul 22, 2014
@onema
Copy link
Author

onema commented Jul 23, 2014

@saturnism It is great that you don't want to depend on dev-master! But If you look at your packagist page, the main section will have you use dev-master.

screen shot 2014-07-23 at 10 55 06 am

To prevent this from happening you use a branch alias which will make your master branch semver friendly, take a look at the _google apiclient_ for example:

screen shot 2014-07-23 at 11 03 05 am

This is considered a best practice and you should consider adding it to the project.

Take a look at Beau Simens presentation on Composer and semantic versioning for more info.

Also see Composer Stability Flags

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

Successfully merging this pull request may close these issues.

None yet

3 participants