Shift with red gradient lettering

Does not comply with psr-4 autoloading

Class App\Path\SomeClass located in ./app/Path/Someclass.php does not comply with psr-4 autoloading standard. Skipping.

Explanation

The PSR-4 autoloading standard requires the fully qualified class name to match the filesystem path, and is case-sensitive. The namespace prefix is mapped by the psr-4 option in your composer.json.

Solution

There are several options which may resolve this issue. Choose a solution that achieves the desired class name and then update the path and configuration accordingly.

  • Ensure the components of the fully qualified class name matches the folders of the path.
  • Ensure the case of the class name and subnamespaces match the case of the filename and subfolders.
  • Ensure the registered psr-4 namespace prefix within your composer.json and root folder path map accordingly with the proper casing.

← Back to the knowledge base

Did this solve the error? Give us a shout out on Twitter. If not, email support for help.

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.