symfony - Class Not found in AppKernel.php -


i'm trying deploy symfony2 project. when run command

php app/console cache:clear --env=prod --no-debug 

i following error:

php fatal error: class 'acme\mainbundle\acmemainbundle' not found in /var/www/html/app/appkernal.php on line 24 

this in appkernal.php

public function registerbundles() {     $bundles = array(         ...         new acme\mainbundle\acmemainbundle(),     );     ... } 

it seems there's problem namespace?

if getting bundle not found error in symfony, in composer.json, modify psr-4 section under autoload section this.

"autoload": {     "psr-4": {         "": "src/"     }, }, 

by doing so, don't have explicitly add new bundle namespaces when create new bundle.


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -