Skip to content
This repository has been archived by the owner on Mar 19, 2024. It is now read-only.

InvalidArgumentException: The template should be a string or extend TemplateReference #58

Open
lufiipe opened this issue Mar 4, 2016 · 5 comments

Comments

@lufiipe
Copy link

lufiipe commented Mar 4, 2016

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
@fr05t1k
Copy link

fr05t1k commented May 17, 2016

@elfilipe, are you find a way out?

@lufiipe
Copy link
Author

lufiipe commented May 19, 2016

no I still have the same problem...

@fr05t1k
Copy link

fr05t1k commented May 20, 2016

@elfilipe you might use this fork https://github.com/afranioce/symfony-rest-edition/

@lufiipe
Copy link
Author

lufiipe commented May 20, 2016

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

@fr05t1k
Copy link

fr05t1k commented May 23, 2016

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants