I don’t want to use twig but php templating so instead of this i should create an errorHandler as stated on docs, but my app.php does not have controllerResolver object, I just use default app.php that symfony installs for me so how can I add an exceptionmanager/errorEventListener to this to handle custom error pages? Please advice.
Once you have your own exception controller, then you can render your response however you like, including return $this->render('whatever_you_want.html.php');
EDIT: But if you really want to make your own exception event listener, then read Working with the kernel.exception Event, and also follow and read any links within that section.
You need to be careful to distinguish between Symfony the components and Symfony the framework. That page you just linked to is about the HttpKernel component. That’s why the sample code is instantiating its own copy of the HttpKernel.
If you’re using the framework and want to listen to the exception event, then read the link I posted above, and also follow and read any links within that section.
I know that’s no matter what ‘your_listener_name’ is, what what is the purpose of define a name: kernel.listener.your_listener_name
I think I don’t need to call this service container manually, so why should I define a custom name for this listener?
Whenever I do any changes I should clean cache, that’s very annoying in development environment. how to disable it? I commented:
//$loader = require_once DIR.‘/…/app/bootstrap.php.cache’;
But I get blank page instead. these are commented too:
//$kernel->loadClassCache();
//$kernel = new AppCache($kernel);
so how to disable caching in development as this is annoying?
[Symfony\Component\DependencyInjection\Exception\LogicException]
Container extension “doctrine” is not registered
What more I missed to do?
Also I have no idea what ‘read’ and what ‘host’=>‘from_user_config.db’ is, I copied/pasted from a third-party application and how to inject db credentials from a separate file into this services.php?
I googled the problem and found this
However mine is about ‘doctrine’, as cache delete via console fails, I deleted cache folder manually, and still have the problem what else should I do?