Upgrade to PSR-4 namespaces

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


A PHP codebase containing PSR-0 namespaces.

Why Upgrade to PSR-4?

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.

Namespace Upgrade

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.

Still have questions? Message @laravelshift on Twitter or email shift@laravelshift.com.