I know that It seems a strange behaviour avoid exceptions in doctrine but I need to do that because I am working in a old project and someone in the past executed some migrations and then he decided remove it so right now is complicated to replicate production enviroment in local without crashes, and this is the reason why I need to executed some query (Remove foreign key and add againg to be sure that I have the same enviroment in local as in production.
It is possible to do that? Of course I tried with try/catch but is not working, I read doctrine documentation but there is not information about, so it seems that is not possible but maybe there are a approach to do that