Skip to content
This repository was archived by the owner on Dec 28, 2023. It is now read-only.

allow changing the VERSION constant#25

Open
nickshek wants to merge 3 commits intophilipbrown:masterfrom
nickshek:master
Open

allow changing the VERSION constant#25
nickshek wants to merge 3 commits intophilipbrown:masterfrom
nickshek:master

Conversation

@nickshek
Copy link
Copy Markdown

This pull request allows to overwrite the default version in http requests by subclassing. This can be useful to when the developer using this composer package want to control the version number.

@philipbrown
Copy link
Copy Markdown
Owner

Why would you want to change the version number? The version number is supposed to track the version number of the package, and so IMO it would only get bumped when an update to the package is released.

I'm curious to hear what your use case is?

@nickshek
Copy link
Copy Markdown
Author

nickshek commented Jul 23, 2016

Suppose we want to develop a API like this:

http://mydomain.example/get_post.php?post_id=xxxx&api_version=xxxx&
api_key=xxxx&api_timestamp=xxxx&api_signature=xxxx

If we want to use this package for developing this api,there will be two problems:

  1. api_version must be presented
  2. API developers are not able to control the version number

@philipbrown
Copy link
Copy Markdown
Owner

Why would you want to change the version number? The version number is used to ensure that both client and server are using the same version of the package. So the version number would only change when the package was updated.

This version number has nothing to do with your API version number.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants