-
Notifications
You must be signed in to change notification settings - Fork 59
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
[FEATURE] Add version in code #182
Comments
We can just use I would not add something to the source code. |
I am not super familiar with how this is done in PHP, so just trying to learn ;) That works for released versions, but what does this return, or I should probably ask, how does one use the code that is unreleased on main? |
composer uses then the current branch, or we can set branch aliases, so when you are on branch 2.x, please use 2.999.999 |
So the PHP way of doing it is like so: "repositories": [
{
"type": "package",
"package": {
"name": "opensearch-project/opensearch-php",
"version": "2.9999",
"source": {
"url": "https://github.com/opensearch-project/opensearch-php",
"type": "git",
"reference": "main"
}
}
}
],
"require": {
"opensearch-project/opensearch-php": "^2.0"
} Having to specify the version like you suggest puts the burden on the user to know what version is on |
Btw, if this is just not the way things are done in PHP we can close this. |
So we do have a version in code, https://github.com/opensearch-project/opensearch-php/blob/main/src/OpenSearch/Client.php#L55, and it's out of date. |
Is your feature request related to a problem?
Looking at the code of the library one can't tell which version it is. Only a release tag makes it a certain version. This makes it difficult to reliably know what version users are reporting bugs against. We also likely want to use the version in the future to add a
User-Agent
header.What solution would you like?
Do you have any additional context?
Examples of other libraries that do that: https://github.com/opensearch-project/opensearch-ruby/blob/6bafe83e7b7014c6a012399ec77a03b19d335993/lib/opensearch/version.rb#L28
The text was updated successfully, but these errors were encountered: