In an Symfony2 controller I'm processing some images that belong to a product. When the images are added to a product the images are cropped with Imagick. This is done in the Entity of that product with the following code:
$image = new \Imagick( $imageUrl );
This works fine in the controller. But now I'm moving the code to the Symfony Command so it can be run from the command line. Only I'm getting the error that Imagick is not loaded.
[Symfony\Component\Debug\Exception\ClassNotFoundException]
Attempted to load class "Imagick" from the global namespace.
Did you forget a "use" statement?
I though because of using the / in front it was used from the global namespace. Or is the global namespace not know in the command section of Symfony?