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

Change namespace to "Ramsey" #48

Closed
ramsey opened this Issue Feb 27, 2015 · 20 comments

Comments

9 participants
@ramsey
Owner

ramsey commented Feb 27, 2015

I've received a fair amount of feedback from people about the "Rhumsaa" namespace. Apparently, it causes confusion and makes it difficult to find my packages. On more than one occasion, I've received reports that I have misspelled my namespace (the assumption is that the vendor name of the namespace should be "Ramsey" and I have misspelled it as "Rhumsaa").

In the 3.0 release, I am considering changing the package name to "ramsey/uuid" and the root namespace to "Ramsey."

I'm opening this up for comments to get feedback from those who are using this package. I want to make the upgrade transition as smooth as possible, and I'd like to hear whether this will significantly impact people using "rhumsaa/uuid."

@ramsey ramsey added this to the Version 3.0.0 milestone Feb 27, 2015

@xfoxawy

This comment has been minimized.

xfoxawy commented Feb 27, 2015

using generic namespace is usually even more confusing for beginner to mid level developers ..
try to make it easier pal 💃

@simensen

This comment has been minimized.

Contributor

simensen commented Feb 27, 2015

I don't believe that changing the package name on a major version bump will impact anybody currently using the old package name. There might be things to consider on the Packagist front, though? You probably won't want or need rhumsaa/uuid to pull updates from your repository. Not entirely sure how that will work. But from the perspective of a user, if I'm relying on rhumsaa/uuid I think everything will continue to work; they just won't receive new updates.

@fabre-thibaud

This comment has been minimized.

Contributor

fabre-thibaud commented Feb 27, 2015

I'm all for it. All I ever remember is that it starts with "rhum" (or is it rum ? one or two a's ?), but always end up looking it up on Packagist.

As for the BC break, well, it's a major bump, and honestly, I don't think it'll take anyone more than a global find/replace to fix it when upgrading a project. Pretty much every one of my projects with database entities uses Uuid, yet changing the namespace doesn't scare me the very least...

@weierophinney

This comment has been minimized.

weierophinney commented Feb 27, 2015

I like Rhumsaa as a vendor name for a few reasons.

  • it's unique, and easy to search for (both on google and in github, but also when grepping through code).
  • it gives you an easy possibility for moving the repo into an organization, because it's not identified with your username. (This latter is why I have used "Phly" as "my" namespace; I now have an organization separately, which allows me to add contributors and attribution.)
@kirkbushell

This comment has been minimized.

kirkbushell commented Feb 27, 2015

Every time I've found your library, it's because I searched for UUID, not your actual name. Those who are looking for UUID implementations (nothing specific), will do the same. I see it as a moot point, to be frank.

@marijn

This comment has been minimized.

Contributor

marijn commented Mar 1, 2015

I think it's not that much of an issue but if you think changing it will cause less support requests than by all means go for it. Do consider implications regarding Composer and please ensure that the old packages will be available under the known names and URLs. Nothing is as annoying as your builds suddenly failing because someone decided to rename their package or to move a package to a different URL.

@kirkbushell

This comment has been minimized.

kirkbushell commented Mar 1, 2015

Even that's a minor issue though - easy fix :)

@ramsey ramsey added the enhancement label Mar 21, 2015

@ramsey ramsey changed the title from RFC: Considering changing namespace to "Ramsey" to Change namespace to "Ramsey" Mar 21, 2015

@ramsey

This comment has been minimized.

Owner

ramsey commented Mar 21, 2015

I have decided to make this change. Thanks for the input and feedback.

@GrahamCampbell

This comment has been minimized.

Contributor

GrahamCampbell commented Mar 21, 2015

👍

@simensen

This comment has been minimized.

Contributor

simensen commented Apr 2, 2015

@ramsey When are you planning on making this change?

@ramsey

This comment has been minimized.

Owner

ramsey commented Apr 2, 2015

I'm hoping to get some time over the next week or so to make the change in the 3.0 branch. Soon after, I think I'll be ready to do a 3.0.0-alpha1 tag so that people can start testing it early with their stuff.

@simensen

This comment has been minimized.

Contributor

simensen commented Apr 2, 2015

@ramsey Sounds good! I'm not in a rush but wondered if new projects I spin up should be using the new package name. :) Looked like nothing had changed yet and I wanted to make sure I hadn't missed something!

@marcj

This comment has been minimized.

marcj commented Apr 20, 2015

To sustain backwards-compatibility, you could use http://php.net/manual/de/function.class-alias.php.

@ramsey

This comment has been minimized.

Owner

ramsey commented Apr 20, 2015

That's interesting. However, it might be best to do that in the 2.x series (2.9.0 maybe) as a way of deprecating Rhumsaa\Uuid and providing an upgrade path to Ramsey\Uuid. Then, in 3.0, remove the class alias.

Thoughts?

@fabre-thibaud

This comment has been minimized.

Contributor

fabre-thibaud commented Apr 20, 2015

Sounds decent. I'll throw my two cents by suggesting that you use class_alias to map to a subclass of Uuid that's able to trigger a deprecation warning. Otherwise, the change will most likely go unnoticed...

@simensen

This comment has been minimized.

Contributor

simensen commented Apr 20, 2015

I'd just as soon you pull the bandaid off and make the switch. New namespace? New package name? It is a new package. In theory people will be able to install both packages still so if they need to install the old one because of a package dep, Composer will just do that.

@ramsey

This comment has been minimized.

Owner

ramsey commented Apr 20, 2015

@aztech-dev I think what you're saying makes most sense to do in v3. It would not be easy to do in v2, without switching everything over to the new namespace. In order for it to work, I would use class_alias() to map Rhumsaa\Uuid to the subclass, which would look something like this:

class UuidDeprecated extends Uuid
{
    public static function uuid1()
    {
        trigger_error('This is deprecated. Use Ramsey\Uuid.', E_USER_DEPRECATED);
        return parent::uuid();
    }
}

While kind of cool and elegant, I'm not sure it's worth it, as @simensen has suggested.

@fabre-thibaud

This comment has been minimized.

Contributor

fabre-thibaud commented Apr 21, 2015

Yeah, I forgot about the new package when I suggested that. Don't know how Packagist will handle it though, considering the repo URL does not change.

@ramsey

This comment has been minimized.

Owner

ramsey commented Apr 21, 2015

I'm already aware of how Packagist will deal with this. For example, with rhumsaa/vnderror, I changed the package name to ramsey/vnderror. In Packagist, I submitted a new package with the same GitHub URL, and it picked up the new package name from composer.json. It asked me to confirm that I wanted to create a new package, and I said yes.

Then, I marked rhumsaa/vnderror as abandoned (see here) and told it to recommend ramsey/vnderror as the new package. This seems to have worked fine, and since they're the same URL, both packages keep getting updated in Packagist (an unintended but okay side-effect).

When people run composer require and they have the abandoned package in their requirements, they'll see a message that looks like this:

screen shot 2015-04-21 at 8 50 46 am

@ramsey

This comment has been minimized.

Owner

ramsey commented Apr 21, 2015

The only problem is the total download counts will be screwed up, but not a big deal.

@ramsey ramsey closed this in d67c349 Apr 25, 2015

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