This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

A bit more help with debugging

Discuss installing Symfony 2 here

A bit more help with debugging

by amiga_os » Mon Aug 18, 2014 9:24 pm

I'm trying to setup Symfony2 with FOSUserBundle and with SymfonyCMF. I still don't have a basic installation with those components working.

However, along the way, I've discovered something that may be useful to others. I kept getting the following very irritating error:
ParameterNotFoundException: You have requested a non-existent parameter "None of the managerParameters resulted in a valid name".

Which because of lack of information, I kept Googling and believed it to be a problem with FOSUserBundle. However, I made significant progress when I went into vendor/symfony/symfony/src/Symfony/Bridge/DependencyInjection/CompilerPass/RegisterMappingsPass.php and changed line 134 from
Code: Select all
        throw new ParameterNotFoundException('None of the managerParameters resulted in a valid name');

to
Code: Select all
        throw new ParameterNotFoundException('None of the managerParameters resulted in a valid name (' . $param . ')');

I don't know ANYTHING about the codebase, so don't know how secure this change is. I'm just trying to get Symfony2 setup locally, and I'll undo this change before I put my project online. However... by displaying what the parameter name is that's been throwing the error, it has been a LOT quicker for me to figure out what Bundle I hadn't set up correctly. With the change, for me the above error now looks like this:
ParameterNotFoundException: You have requested a non-existent parameter "None of the managerParameters resulted in a valid name (doctrine_phpcr.odm.default_document_manager)".
amiga_os
Junior Member
 
Posts: 1
Joined: Mon Aug 18, 2014 9:15 pm