At last. This was a namespace problem. It is strange that PHP does not report that you are trying to catch an exception of type ( ReflectionException
) that does not exist in the current namespace.
Just adding \
to \ReflectionException
helped me, because now it is able to find what type of exception I'm really looking for.
Another solution would be to add:
use \ReflectionException;
immediately after the namespace declaration.
source share