I have an controller:
<?php
namespace Acme\HelloBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
//use Symfony\Component\HttpFoundation\Response;
class HelloController extends Controller
{
public function indexAction($name)
{
return new Response('<html><body>Hello '.$name.'!</body></html>');
}
}
When I run the driver returns the error
1/1 ClassNotFoundException: Attempted to load class "Response" from namespace "Acme\HelloBundle\Controller" in D:\symfony2\src\Acme\HelloBundle\Controller\HelloController.php line 14. Do you need to "use" it from another namespace? Perhaps you need to add a use statement for one of the following: Symfony\Component\BrowserKit\Response, Symfony\Component\HttpFoundation\Response, Doctrine\CouchDB\HTTP\Response.
As I can load the "use Symfony\Component\HttpFoundation\Response;" class for all my controllers without the need to be including it in each controller
Help please, nedd autoload of HttpFoundation\Response
Thanks