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 major version constant to interface #2583

Merged
merged 1 commit into from
May 23, 2020
Merged

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Feb 13, 2020

This will fix #2579

@GrahamCampbell
Copy link
Member

I think this should be added in the 6.x series too.

Copy link

@bshaffer bshaffer left a 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;

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?

Copy link
Member

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. 👍

Copy link
Member

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.

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.

Copy link
Member

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.

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.

Copy link
Member

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...

Copy link
Member Author

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

@gmponos gmponos added this to the 7.0.0 milestone May 20, 2020
@Nyholm
Copy link
Member Author

Nyholm commented May 23, 2020

Thank you for the reviews.

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.

Recommended way to determine Guzzle 7?
4 participants