-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 major version constant to interface #2583
Conversation
I think this should be added in the 6.x series too. |
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.
If we added it to 6.x series, it would still only be available for SOME 6.x packages, making it mostly useless...
/** | ||
* The Guzzle major version. | ||
*/ | ||
const MAJOR_VERSION = 7; |
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.
Consider renaming this to simply VERSION
so it's compatible with the previous version constant?
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.
That option probably makes the most sense. 👍
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.
The only issue is in Guzzle 6 this had type string
.
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.
Ahh, good point. Do you think it'd be better to use a string? I think it's OK to leave as an int.
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.
I think that we have to make it a string of we rename it. Otherwise code with strict types enabled will break.
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.
Seems like it's not a very useful change at this point, and either the version constant should remain unchanged from guzzle 6, or it should be removed. I still am in favor of a VERSION
file in the repo, but that seems like a longshot.
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.
IMHO I am in favor of changing it to a string in order to be easier to be used to version_compare
function of PHP.. but I have mixed feelings if about the naming.. not sure what's the best approach. Changing name will clear indicate that it changed format.. but it will not ease migration...
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.
This name is consistent with Symfony's Kernel.
I dont want to use VERSION
because people might believe it is the same as in 6.x
Thank you for the reviews. |
This will fix #2579