close

[Solved] BaseController.php does not comply with psr-4 autoloading standard. Skipping

Hello Guys, How are you all? Hope You all Are Fine. Today When I run composer autoload suddenly I face following error in my terminal BaseController.php does not comply with psr-4 autoloading standard. Skipping in laravel. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How BaseController.php does not comply with psr-4 autoloading standard. Skipping Error Occurs ?

When I run composer autoload suddenly I face following error in my terminal.

Generating optimized autoload files
Class App\Controllers\BaseController located in E:Xampp/htdocs/Wondra/app\controllers\BaseController.php does not comply with psr-4 autoloading standard. Skipping.
Class App\Controllers\UserControllers located in 
E:Xampp/htdocs/Wondra/app\controllers\UserControllers.php does not comply with psr-4 autoloading standard. Skipping.
Class App\RoutingDispatcher located in E:Xampp/htdocs/Wondra/app\routing\RoutingDispatcher.php does not comply with psr-4 autoloading standard. Skipping.
Generated optimized autoload files containing 508 classes

How To Solve BaseController.php does not comply with psr-4 autoloading standard. Skipping Error ?

  1. How To Solve BaseController.php does not comply with psr-4 autoloading standard. Skipping Error?

    To Solve BaseController.php does not comply with psr-4 autoloading standard. Skipping Error Here nothing about to worry but PSR-4 standard requires file and folders to be case sensitive and the corresponding classes and namespaces to be in PascalCase. Here as per error Log For BaseController class, the file should be located in the following namespace: app/Controllers/BaseController.php so that You should take care of namespace whenever you are using it.

  2. BaseController.php does not comply with psr-4 autoloading standard. Skipping

    To Solve BaseController.php does not comply with psr-4 autoloading standard. Skipping Error Here nothing about to worry but PSR-4 standard requires file and folders to be case sensitive and the corresponding classes and namespaces to be in PascalCase. Here as per error Log For BaseController class, the file should be located in the following namespace: app/Controllers/BaseController.php so that You should take care of namespace whenever you are using it.

Solution 1: take care of namespace

Here nothing about to worry but PSR-4 standard requires file and folders to be case sensitive and the corresponding classes and namespaces to be in PascalCase.

Here as per error Log For BaseController class, the file should be located in the following namespace:

app/Controllers/BaseController.php

so that You should take care of namespace whenever you are using it.

Solution 2: Check your composer version

Composer version can be generate this error sometimes. Check your composer version using

composer -V

Install another version using

composer self-update 1.6.3

and delete the vendor folder from your project.

And use the following commands:

composer install
composer update
composer dump-autoload

Hope it will work.

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Please Rate Our Solution to Motivate Us For Give Our Best

1 thought on “[Solved] BaseController.php does not comply with psr-4 autoloading standard. Skipping”

Leave a Comment