How to rename a Packagist PHP composer package

This is not possible and nicely explain here below:

“As of now, you cannot update a package name, I believe for security reasons (if renaming was allowed, harmful code could be put as the old name, and then dependent projects that haven’t updated their composer.json would pull the harmful code). It has been discussed on Packagist’s GitHub page, and the process in place for this kind of operation is this one (copy/pasted from the above link) :

  • 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
  • You can’t keep your download stats”

Reference

Tags

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top