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

Add name space #52

Closed
ghost opened this issue Jun 11, 2015 · 10 comments
Closed

Add name space #52

ghost opened this issue Jun 11, 2015 · 10 comments

Comments

@ghost
Copy link

ghost commented Jun 11, 2015

When using a library such as this in a larger framework its very nice to have a properly namespaced file. Could I suggest that you namespace under your Git name:
namespace Firebase;
would be adequate and would insure that there would be no confusion between this library and anything using it that might out of necessity share its name.

@tuupola
Copy link

tuupola commented Jun 11, 2015

It can happen with only major version number bump. Changing current namespace would break bc.

@robertdimarco
Copy link

I'm not opposed to this, but as @tuupola it would require a major version bump. I'd be happy to look at a PR if anyone else feels strongly about this.

@jrjohnson
Copy link

👍 for namespacing. The exceptions in particular would be clearer if they were not at the root.

@Dashron
Copy link

Dashron commented Jul 1, 2015

Any opinions on what the namespace should be? I need to namespace this because I've run into a conflict with another library. I'll have a PR together today.

@ghost
Copy link
Author

ghost commented Jul 1, 2015

I think traditional namespacing these days on things that are pulled through composer is {githubuser}/{packagename} so it makes sense to use firebase/PHP_JWT

The package needs a version bump and namespacing, essential to keep moving forward.

@tuupola
Copy link

tuupola commented Jul 1, 2015

Composer package name is not the same as PHP namespace. For me namespace Firebase would make sense. Classname could be as it is.

namespace Firebase;
class JWT { ... }

This way you only need to add the following line and to make your old code work.

use Firebase\JWT;

@Dashron
Copy link

Dashron commented Jul 1, 2015

With the addition of all of the exceptions we need two tiers. \Firebase\Exceptions would conflict with any other firebase php libraries.

I'm going to restructure the folders to match their other php library, https://github.com/firebase/firebase-token-generator-php

@robertvrabel
Copy link

@Dashron Is a new version going to be released so we can reference it when pulling it in via composer? I noticed the current v2.2.0 doesn't have this in it.

I'm currently referencing dev-master just to use this package, but would like to lock it to a version soon.

@robertdimarco
Copy link

@robertvrabel I'll cut a release today.

@robertdimarco
Copy link

Shipped as v3.0.0. Thanks everyone! 🎉

SelviA pushed a commit to SelviA/php-jwt that referenced this issue Mar 7, 2023
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

No branches or pull requests

5 participants