Details
-
Bug
-
Resolution: Unresolved
-
Critical
-
1.11.1
-
None
-
PHP 5.6.03
Description
On a master (not happening on 1.11.0), when creating a bundle, I am confronted with the following error:
> Checking that the bundle is autoloaded FAILED > Enabling the bundle inside app/AppKernel.php updated ./app/AppKernel.php OK > Importing the bundle's routes from the app/config/routing.yml file updated ./app/config/routing.yml OK > Importing the bundle's services.yml from the app/config/config.yml file updated ./app/config/config.yml OK
but the bundle is correctly registered on AppKernel.php, routing.yml and config.yml.
There seems to be a problem with autoload configuration since afterwards, when I try to run any command such as:
php app/console cache:clear
I always get:
PHP Fatal error: Class 'EzSystems\MyBundle\EzSystemsMyBundle' not found in /var/www/html/ezpmaster/app/AppKernel.php on line 55
but the path matches correctly.
I solved the problem manually by editing my composer.json and altering:
"autoload": { "psr-4": { "AppBundle\\": "src/AppBundle/" }, "classmap": [ "app/AppKernel.php", "app/AppCache.php" ] },
to:
"autoload": { "psr-4": { "": "src/" }, "classmap": [ "app/AppKernel.php", "app/AppCache.php" ] },
and running:
composer dumpautoload
After this it all works correctly.
It seems to be quite recent since, as previously stated, this does not happen on a 11.1.0.