I've got a major, huge issue with debugging. I'm using Admin Generator with Doctrine. It holds an object of sfDoctrineRoute under sf_route in attributeHolder in request. I don't know if this issue affects also other sfObjectRouter, because I'm using Doctrine. ;) What can I say is that this "sf_route" is really huuuge.
Now imagine an exception thrown by symfony. It goes to sfException::outputStackTrace which wants to display Request as an array. It converts attribute and parameter holders to array and sends to sfYaml::Dump. Yes, with this HUGE sf_route. Page can't display, php is out of memory or something, I don't know. I replaced sfYaml with var_dump and the page had about 44MB! It is becase there is this sfDoctrineRoute object. So, as I said, output stack doesn't display, there is nothing (blank page).
As a temporary solution I made this in sfDebug::flattenParameterHolder() in else on main if:
if(is_object($value))
{
$values[$key] = new ReflectionObject($value);
}
else
{
$values[$key] = $value;
}
It makes that now I can see output stack trace. It displays dump of request object with something like that:
attributeHolder:
sf_route: !!php/object:O:16:"ReflectionObject":1:{s:4:"name";s:15:"sfDoctrineRoute";}
what else could it do? It doesnt solve the problem for real, because now this attribute becomes ReflectionObject? object. ;) What about situations with array containing huge objects? It will crash again...
Maybe it is an issue with sfYaml? As I said sf_route holds huge sfDoctrineRoute object (~44MB of var_dump) and it does not know how to convert it to yaml format? ;d
I hope I explained it well. I've lost 1 hour to understand how it happens. ;d This issue makes working with admin generator really hard, because I don't really know what happens with the script and where is the error in my code.