How to rename a PHP package in Packagist How to rename a PHP package in Packagist php php

How to rename a PHP package in Packagist


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 (copypasted 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
  • And no you can't keep your download stats