Giter VIP home page Giter VIP logo

Comments (31)

tuupola avatar tuupola commented on June 16, 2024 3

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.

from packagist.

nadar avatar nadar commented on June 16, 2024 2

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.

from packagist.

njh avatar njh commented on June 16, 2024

+1

from packagist.

smasty avatar smasty commented on June 16, 2024

Will this be available in the near future?

from packagist.

Seldaek avatar Seldaek commented on June 16, 2024

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.

from packagist.

njh avatar njh commented on June 16, 2024

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.

from packagist.

Seldaek avatar Seldaek commented on June 16, 2024

@njh I deleted it for you.

from packagist.

kl3ryk avatar kl3ryk commented on June 16, 2024

👍

from packagist.

AD7six avatar AD7six commented on June 16, 2024

👍 to enabling anything to rename a package. It should be a rare occurrence, why not simply add the package-name field to the/packages/author/package/edit? screen? Possibly with a restriction that you can only rename a repository n (1?) times, or once per <long time> ?

Also related: #378 #163

from packagist.

Taluu avatar Taluu commented on June 16, 2024

Any news on this (with the mentionned manipulation, using replace) ? I'd need to replace taluu/totem with wisembly/totem. For now, I created a new package, but feel free to delete it or do whatever you want.

Thanks.

from packagist.

tedivm avatar tedivm commented on June 16, 2024

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.

from packagist.

Seldaek avatar Seldaek commented on June 16, 2024

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:

  • the download count will be lost, but I don't really think that's a bad thing, there should be maintainer pain for causing all your users pain by renaming something.
  • the current github hook handler only updates one repo at a time, so we need to make it skip deprecated repos or handle multiple repos if many packages exist with the same repo url.

from packagist.

tedivm avatar tedivm commented on June 16, 2024

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.

from packagist.

aik099 avatar aik099 commented on June 16, 2024

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 composer.json.

from packagist.

aik099 avatar aik099 commented on June 16, 2024

According to #225 the renaming is possible. Then I don't get what this task is all about.

from packagist.

tedivm avatar tedivm commented on June 16, 2024

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.

from packagist.

dereuromark avatar dereuromark commented on June 16, 2024

👍
Currently it is quite the challenge.

from packagist.

Seldaek avatar Seldaek commented on June 16, 2024

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

from packagist.

dereuromark avatar dereuromark commented on June 16, 2024

Abandon != Rename
A rename with such a abandon/delete + create resets the statistics as you pointed out.
For me Abandon = Dead

I like the idea of @AD7six

why not simply add the package-name field to the/packages/author/package/edit? screen? Possibly with a restriction that you can only rename a repository n (1?) times, or once per ?

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 :(

from packagist.

jasny avatar jasny commented on June 16, 2024

@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.

from packagist.

aik099 avatar aik099 commented on June 16, 2024

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.

from packagist.

TRPB avatar TRPB commented on June 16, 2024

I'm also interested in doing this. I want to rename [user][package] to [organisation][package]. Could this be as simple as:

  1. Transfer the repo on github
  2. Create a repo with the old name
  3. Add a composer.json to the old repo name that just has "require": { "newPackageName": "*"}

Obviously you'd lose the download count and technically have two packages, but presumably this would mean anyone who tried to run composer install where the old package was being referenced would not even be aware it's been renamed?

from packagist.

Seldaek avatar Seldaek commented on June 16, 2024

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.

from packagist.

TRPB avatar TRPB commented on June 16, 2024

Thanks for the speedy response, makes sense :)

from packagist.

barryvdh avatar barryvdh commented on June 16, 2024

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?

from packagist.

Seldaek avatar Seldaek commented on June 16, 2024

from packagist.

gsouf avatar gsouf commented on June 16, 2024

No way to delete abandoned package?
In my case, had a WIP, and before publishing it with a stable I released the name was not good, it creates an useless abandoned package in the vendor name.

from packagist.

aik099 avatar aik099 commented on June 16, 2024

@gsouf , you can delete abandoned package if it has small download count. Not sure about exact number maybe it's 40 downloads or less.

from packagist.

gsouf avatar gsouf commented on June 16, 2024

It looks like having more than 1000 makes it not eligible to deletion!

from packagist.

TomasVotruba avatar TomasVotruba commented on June 16, 2024

How to rename package nowadays? Is there some solution apart deleting and uploading a new one?

from packagist.

Seldaek avatar Seldaek commented on June 16, 2024

Current solution/procedure:

If you just want to update the github/repo URL

  • Do the rename on github or wherever
  • Edit the package URL on packagist, no need to change the package name for this

If you really really want to rename a package

  • Update the name in composer.json on the master branch or whatever the default branch is
  • Resubmitting the package to packagist using the new name
  • Mark the old package as "Abandoned" on packagist, and use the new name in the form so that people get pointed to it when they install with the old name
  • And no you can't keep your download stats

from packagist.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.