Having own specific namespace to prevent conflicts #62
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, I'm proposing this to avoid namespace conflicts when having multiple libraries dealing with OAuth2 and both have - let's admit it - pretty silly general
OAuth2
namespace, which bears a high probability of conflicts with other libraries.Basically this pull request changes stuff like:
to
I know this is a BC break, so I'm not expecting this to be merged any time soon, but I figured even some day will be better than never. :)
The reason I had a conflict was this OAuth2 server library (https://github.com/bshaffer/oauth2-server-php), that - unfortunately - used the same generic
OAuth2
namespace and thus class name conflicts appeared. It's only becauseadoy/PHP-OAuth2
had fewer files I decided to namespace this OAuth2 client library and not the OAuth2 server lib. to resolve the problem, so please don't take this personally :DI know my solution could have remained being just a fork, but I figured that if it could help other people to prevent the same problem, then I might as well propose a PR.