-
-
Notifications
You must be signed in to change notification settings - Fork 476
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
Support renaming packages #47
Comments
+1 |
Will this be available in the near future? |
Not unless someone does it, and even then I am not sure it's a good idea. You really should think twice before publishing, and in the worst case you can always delete the package and republish under a new name. Facilitating renames means people will think less, and the amount of renames/chaos will be higher than it should. |
I have renamed njh/easyrdf to easyrdf/easyrdf but I am keeping the sources on GitHub at njh/easyrdf. But I don't seem to be able to delete njh/easyrdf from packagist.org. |
@njh I deleted it for you. |
👍 |
Any news on this (with the mentionned manipulation, using Thanks. |
I've recently moved some of my larger projects out of my personal Github account and to a new Organization. I would also like to change the vendor name of those projects to that new organization name. What's the best way to handle that? I've already "moved" the repositories, rather than forking them, so that they have the same watchers and stargazers. I would also like the download history from Packagist kept, and of course for people using the old vendor names and versions to still be able to have their applications function. |
The problem is since we fixed the replace hijack issues doing clean renames is pretty much impossible. With @rdohms PR for #192 it will become possible to deprecate and nudge users to the new package, but that means the two packages must coexist, pointing to the same repo. This creates two problems:
|
Is there no way to have an "alias" in packagist? A simple lookup table, check it before looking for projects, if there is an alias then redirect. If this is done then there is no user pain that you're referring too. If a user doesn't make the change then the redirect will occur and they'll download the appropriate version. |
I also started project in my own account on GitHub and then moved to an organization account. Back then, when I started it I never thought that it will be as big (changing GitHub repo url worked for me). Now to I also need to change package name on Packagist. However what will happen if somebody is still accessing package with old name? Theoretically syntax proposed by @Seldaek in task description should already do the trick, since whoever will ask for old package name will be suggested to update their |
According to #225 the renaming is possible. Then I don't get what this task is all about. |
That's not the same as renaming, that's erasing and putting new ones up. Anyone who was pointed at the original package name is going to have to change it and all download counts are lost. |
👍 |
Now that it's possible to abandon packages, I'd recommend dropping this feature altogether. Since we changed the way replace works it's not really possible to do a soft-rename anymore. Deprecating and nudging people to the new name is the better way IMO. Although the best way is ultimately to stop renaming packages altogether. I'm closing already but if someone has good counter arguments it can obviously be reopened. /cc @naderman |
Abandon != Rename I like the idea of @AD7six
But far worse is that it doesn't work the way it has been proposed. It is a rare event, but it needs to be working when necessary. Currently one is "helpless" - as even the hard-delete button is not available :( |
@Seldaek A suggestion: After renaming a repository on GitHub, pull and pushes to the old location still work (by redirect) and going to the project page redirects me to the new location. I think this would be an ideal strategy for packagist as well. Don't list the package under the old name and redirect where the old name is used. It would be ideal if composer would issue a notice if the user is using a renamed (or abandoned) package. |
👍 , right now error returned by Composer is the same if the old package never existed. |
I'm also interested in doing this. I want to rename [user][package] to [organisation][package]. Could this be as simple as:
Obviously you'd lose the download count and technically have two packages, but presumably this would mean anyone who tried to run |
If all you want is move repos around on github, do it and then edit the repo URLs on packagist and all is well. You don't have to rename the packages in composer.json to do this. If you really want to rename them, then do the above, but then on top of that rename in composer.json, and re-submit the URL on packagist, and mark the old name one as "Abandoned" on packagist, and point to the new one. That's the smoothest transition possible for everyone. |
Thanks for the speedy response, makes sense :) |
So to be clear, renaming a package can only be done by resubmitting a github repo with a different name, and deprecating the old one? Only downside is losing stats and double listing? And for moving github repos, you can manually change the location? |
That is all correct yes. Moving repos just edit the package url on
packagist and you're done.
|
In case of resubmitting the package, the GitHub Service for packagist must be removed and readded, otherwise auto-update will not work for the newly submitted package. |
No way to delete abandoned package? |
@gsouf , you can delete abandoned package if it has small download count. Not sure about exact number maybe it's 40 downloads or less. |
It looks like having more than 1000 makes it not eligible to deletion! |
The OCD in me does not feel good about having double listing and abandoned package under vendor name. Allowing to rename a package and aliasing the old name to the new name in the same way as GitHub does with repositories would keep vendor namespaces clean. |
How to rename package nowadays? Is there some solution apart deleting and uploading a new one? |
Current solution/procedure:If you just want to update the github/repo URL
If you really really want to rename a package
|
The procedure for renaming packages should be as such:- Update your composer.json with"name": "new/name"
and"replace": {"old/name": "self.version"}
- Press a button on Packagist if you're maintainer, and it will rename if those two preconditions are met.EDIT: Current solution/procedure:
If you just want to update the github/repo URL
If you really really want to rename a package
The text was updated successfully, but these errors were encountered: