symfony Attempted to call an undefined method named ... of class ... -- Ошибка

Attempted to call an undefined method named "render" of class "AppBundle\Controller\LuckyController"

или

Attempted to call method “getDoctrine” on class "../...Controller"

или

Attempted to call method “getParameter” on class "../...Controller"

Решение

Не забывайте унаследовать свой контроллер от стандартного:

namespace AppBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\Controller; // этот класс контроллера с render()

class LuckyController extends Controller
{