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
Update branch alias for 1.6.x #1262
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @gmazzap,
Thanks for bringing this to our attention.
- The next unreleased branch is
1.6.x
. - I recommend using the approach you mentioned, explicitly requiring the branch name.
- I think we should remove the branch alias from the composer configuration
- remove maintenance burden
- redundant functionality as explicitly requiring the branch name
- document this somewhere
The branching model that we are currently using will maintain a SemVer-like [0-9]+.[0-9]+.x
branch.
Next Minor
{
"require-dev": {
"mockery/mockery": "1.6.x-dev"
},
}
Next Major
{
"require-dev": {
"mockery/mockery": "2.0.x-dev"
},
}
You can also install and test that branch by using this composer command.
composer require --dev mockery/mockery:1.6.x-dev
and composer require --dev mockery/mockery:2.0.x-dev
What do you think?
Hi @ghostwriter I'm sorry, but I don't understand. You have specific branches for specific minor releases.
However, you're telling Composer, via branch alias, that both your If there're two packages in the same installation, one requiring The correct branch alias should be: "branch-alias": {
"dev-master": "1.4.x-dev",
"1.5.x": "1.5.x-dev",
"1.6.x": "1.6.x-dev",
} That way, assuming minimum stability "dev", if a package requires I'm not going to require branch explictly. If I require With the current situation, I'll keep requiring |
No worries, I'll try to explain.
Correct. ✅
Correct! ✅ That's the bug.
Correct! ✅ (however, I think we should instead remove the
Correct! ✅ The If you want the changes tagged in the
Correct! ✅ That's the intended behavior. All development and tags are created in their respective major/minor versioned branches.
Correct! ✅ but unfortunately ⛔️ Bad practice, you should never use non-existing tags. The reason there is a separate branch for
Incorrect ❌ Explicitly requiring the So before/when/if we tag and release
Incorrect ❌ You can test compatibility with PHP 8.2 using: {
"require-dev": {
"mockery/mockery": "^1.5 || 1.6.x-dev"
},
} or {
"require-dev": {
"mockery/mockery": "1.6.x-dev"
},
} or {
"require-dev": {
"mockery/mockery": "1.6.x-dev as 1.6.0"
},
} And once {
"require-dev": {
"mockery/mockery": "^1.6"
},
} Let me know if I misunderstood anything or if this clears up some things or not. |
`composer.json`'s branch alias for 1.6.x points to 1.4.x-dev version. Signed-off-by: Nathanael Esayeas <nathanael.esayeas@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My previous comment is still valid, however, I have decided to proceed to merge this pull request.
Upon further reflection, I believe it would be more appropriate to remove the branch-alias
in the 2.0.x
version, considering the presence of other breaking changes.
- Increased maintenance overhead:
- Branch aliases require continuous monitoring and updating to ensure that the aliases point to the correct branches and are compatible with other dependencies.
- Adds an additional layer of complexity to dependency management.
- Requires proper documentation and communication to ensure developers understand the branch aliases used.
"require": {
"vendor/package": "dev-main#<commit-hash>"
},
"extra": {
"branch-alias": {
"dev-main": "1.0.x-dev"
}
}
This maintenance overhead can be time-consuming, especially when dealing with multiple projects and their respective branch aliases.
In our branching model, we now have a dedicated branch for each major and minor version of Mockery maintained (SemVer major.minor.x
)
This will allow developers to directly specify the branch name as a dependency in the composer.json file.
"require": {
"vendor/package": "dev-branch-name"
}
No need for extra configuration or understanding of branch-alias
.
This PR will target the master
branch so that developers with similar expectations will be satisfied.
Thank you, for your contribution.
P.S. I'm happy to continue the conversation going to see what others have to say on this subject.
PHP 8.2 CI check is expected to fail, unrelated to this PR. |
The
composer.json
's branch alias for 1.5.x points to 1.4.x-dev version.This is making requirements for the next unreleased 1.5.x impossible, unless explictly requiring the branch.