gimler/symfony-rest-edition

InvalidArgumentException: The template should be a string or extend TemplateReference

elfilipe opened this issue · 5 comments

Hello
with 2.7 branch, after use "composer uptate" command I have this error:
"The template should be a string or extend TemplateReference"

I suspect this framework-extra-bundle update:

  • Removing sensio/framework-extra-bundle (v3.0.12)
  • Installing sensio/framework-extra-bundle (v3.0.14)

all works fine with framework-extra-bundle v3.0.12

stack:

InvalidArgumentException: The template should be a string or extend TemplateReference
    at n/a
        in C:\wamp\www\SymfonyRestEdition\vendor\friendsofsymfony\rest-bundle\FOS\RestBundle\View\View.php line 218

    at FOS\RestBundle\View\View->setTemplate(object(View))
        in C:\wamp\www\SymfonyRestEdition\vendor\friendsofsymfony\rest-bundle\FOS\RestBundle\EventListener\ViewResponseListener.php line 122

    at FOS\RestBundle\EventListener\ViewResponseListener->onKernelView(object(GetResponseForControllerResultEvent), 'kernel.view', object(TraceableEventDispatcher))
        in  line 

    at call_user_func(array(object(ViewResponseListener), 'onKernelView'), object(GetResponseForControllerResultEvent), 'kernel.view', object(TraceableEventDispatcher))
        in C:\wamp\www\SymfonyRestEdition\vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\Debug\WrappedListener.php line 61

    at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(GetResponseForControllerResultEvent), 'kernel.view', object(ContainerAwareEventDispatcher))
        in  line 

    at call_user_func(object(WrappedListener), object(GetResponseForControllerResultEvent), 'kernel.view', object(ContainerAwareEventDispatcher))
        in C:\wamp\www\SymfonyRestEdition\vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\EventDispatcher.php line 158

    at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener)), 'kernel.view', object(GetResponseForControllerResultEvent))
        in C:\wamp\www\SymfonyRestEdition\vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\EventDispatcher.php line 46

    at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.view', object(GetResponseForControllerResultEvent))
        in C:\wamp\www\SymfonyRestEdition\vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher.php line 124

    at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('kernel.view', object(GetResponseForControllerResultEvent))
        in C:\wamp\www\SymfonyRestEdition\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php line 144

    at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), '1')
        in C:\wamp\www\SymfonyRestEdition\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php line 62

    at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), '1', true)
        in C:\wamp\www\SymfonyRestEdition\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel.php line 69

    at Symfony\Component\HttpKernel\DependencyInjection\ContainerAwareHttpKernel->handle(object(Request), '1', true)
        in C:\wamp\www\SymfonyRestEdition\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php line 184

    at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
        in C:\wamp\www\SymfonyRestEdition\web\app_dev.php line 25

@elfilipe, are you find a way out?

no I still have the same problem...

hum...same isue !?!?

$> composer create-project gimler/symfony-rest-edition --stability=dev SymfonyRestEdition

works fine

but after a simple:

$> cd SymfonyRestEdition
$> composer update

I have:

CRITICAL - Uncaught PHP Exception InvalidArgumentException: "The template should be a string or extend TemplateReference" at C:\wamp\www\SymfonyRestEdition\vendor\friendsofsymfony\rest-bundle\FOS\RestBundle\View\View.php line 218

@elfilipe, this fork is upgraded by symfony 2.8 and does not have this promblem.