php - Symfony switch from 2.8-3.3 ClassNotFoundException use statement missing namespace? -


just decided upgrade symfony 2.8 3.3 being noted felt best start fresh symfony project , pull on parts of project , change key needed items changed on major version upgrade. have worked out of issues meaning may have more issues suspect. here current one:

c:\xampp\htdocs\fresh_api>php bin/console server:run php fatal error:  uncaught symfony\component\debug\exception\classnotfoundexception: attempted lo ad class "commandlistener" namespace "directive\multitenant\masterbundle\eventlistener". did forget "use" statement namespace? in c:\xampp\htdocs\fresh_api\var\cache\dev\a ppdevdebugprojectcontainer.php:580 stack trace: #0 c:\xampp\htdocs\fresh_api\vendor\symfony\symfony\src\symfony\component\dependencyinjection\contai ner.php(331): appdevdebugprojectcontainer->getappbundle_commandlistenerservice() #1 c:\xampp\htdocs\fresh_api\var\cache\dev\appdevdebugprojectcontainer.php(965): symfony\component\d ependencyinjection\container->get('app_bundle.comm...') #2 c:\xampp\htdocs\fresh_api\vendor\symfony\symfony\src\symfony\component\eventdispatcher\eventdispatcher.php(229): appdevdebugprojectcontainer->{closure}() #3 c:\xampp\htdocs\fresh_api\vendor\symfony\symfony\src\symfony\component\eventdispatcher\eventdispatcher.php(61):symfony\component\eventdispatcher\eventdispatcher->sortlisteners('console.command') #4 c:\x in c:\xampp\htdocs\fresh_api\var\cache\dev\appdevdebugprojectcontainer.php on line 580 

this of course after try running php bin/console server:run

i have tried deleting cache, deleting autoload file, deleting vendor file , reinstalling composer. have tried see if there dependencies missing. (i have missed here)

the file it's talking generated file not noticing that class exists.

here commandlistener

namespace directive\multitenant\masterbundle\eventlistener;  use directive\multitenant\masterbundle\connection\connectionwrapper; use directive\multitenant\masterbundle\entity\tenant; use directive\multitenant\masterbundle\repository\tenantrepository; use appbundle\tenantproviderinterface; use doctrine\dbal\connection; use doctrine\dbal\schema\abstractschemamanager; use exception; use symfony\component\console\command\command; use symfony\component\console\event\consolecommandevent; use symfony\component\console\input\inputoption; 

the appdevdebugprojectcontainer little large i'll wait see if there response see if it's needed i'm sure it's else causing not generate proper information needed.

thanks input have.

edit: link here noting it's same issue exact issue there resolved before this. here code section.

 "autoload" : {     "psr-4": {         "appbundle\\": "src/appbundle"     },     "classmap": [ "app/appkernel.php", "app/appcache.php" ] }, 

this fixed already. here link used try solve issue of course had no help.

php bin/console symfony commands give fatal error

and another

symfony 3.3 getting classnotfoundexception

all credit goes cerad answer sadly duplicated did not notice needed. autoloader needs know pulling classes , has setup new way symfony now. here example additional code make work.

"autoload" : {     "psr-4": {         "appbundle\\": "src/appbundle",         "bundlename\\": "src/bundlename"     },     "classmap": [ "app/appkernel.php", "app/appcache.php" ] }, 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -