I am currently working on a Laravel project and I have a bit of code where I want to throw an exception if the class of the given type cannot be found.
$className = $type . 'Field';
if (!class_exists($className))
{
// Throw exception
}
However my IDE (IntelliJ) is giving me auto-complete for 3 different classes belonging to different packages that all have the same name.
Prophecy\Exception\Doubler\ClassNotFoundException
Symfony\Component\Debug\Exception\ClassNotFoundException
PhpSpec\Exception\Fracture\ClassNotFoundException
What is the difference between these and which one should I use in this scenario and why?