Skip to content

Frequently Encountered Errors

Ahmad Altaher Alfayad edited this page Jul 10, 2023 · 6 revisions

Frequently Encountered Errors

Changing Controller Code and Route Not Found

During your stint of development on UDOIT, you will inevitably have to either change some code relating to an existing controller or add a new controller for some specific purpose. Upon doing either of those things, you will inevitably run into an error where your changes are either not registered, the dependency which you have injected is not recognized, or the newly added controller itself is not accessible. The solution for this issue is to clear the cache that Symfony sets up when you run your instance of UDOIT. If you are using Docker to run UDOIT, then simply run your database image, cd into your UDOIT repository, and run the following command in your terminal:

docker-compose -f docker-compose.nginx.yml run php bin/console cache:clear

Using composer update and getting Fatal error: Declaration of Container[some string]\EntityManager_[some string]::refresh($entity) must be compatible...

Sometimes, your application will not run because a cache container might not be up to date with some newer packages that you have installed using composer. To fix this issue, simply go into the var/cache/prod folder and delete the container that is giving you trouble (an example name for a container is ContainerQBhi7Mt). Don't worry about deleting it as an updated container will sprout back out with the updated code.

Clone this wiki locally