Cannot declare class Symfony\Component\Debug\ErrorHandler, because the name is already in use

PHP
I came here because I had same problem in Symfony2 framework.

I solved the problem by removing my \cache\dev folder and reestarting apache and refreshing again.
Source

Also in PHP: