Shift with red gradient lettering

Convert PSR-0 to PSR-4 namespaces

The PSR-4 Shift upgrades PSR-0 namespaces to the PSR-4 namespace.

The PSR-0 was deprecated in 2014. PSR-4 is now recommended. Furthermore, PSR-0 perpetuates dated practices found in earlier versions of PHP. Unless you need to support PHP versions older than PHP 5.3, you should upgrade to PSR-4 to follow modern PHP practices and improve forward compatibility.

Screenshot of a pull request with automated changes from the PSR-4 Shift


A PHP codebase containing PSR-0 namespaces.

Automated Changes

The PSR-4 Shift upgrades any PSR-0 namespace to a PSR-4 namespace, including:

  • Migrating folder structure.
  • Upgrading any underscored class name references.
  • Configuring composer autoload settings.

Sign in with any of the following services to connect Shift with your Laravel project.

Don't use one of these services?

Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.