skip to Main Content

I’ve been working through various hurtles toward migrating an existing Symfony3 web app from a local LAMP host up to Goggle’s App Engine Standard PHP Environment. I’ve taken hints from the appengine-symfony-starter-project to use Memcache for sessions, pre-cache the application code, and connect to a Cloud SQL MySQL database. In have the core pieces working fine.

I added a login form at /login using a TWIG template with a form in it that goes like so:

<form class="form" action="{{ path('security_login') }}" method="post">
  <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
  <div class="form-group">
    <input class="form-control" id="email" type="text" name="_email" placeholder="Email" value="{{ last_username }}"/>
  </div>
  <div class="form-group">
    <input class="form-control" id="password" type="password" name="_password" placeholder="Password"/>
  </div>
  <div class="form-group">
    <input type="checkbox" id="remember_me" name="_remember_me" checked>
    <label for "remember_me">Remember Me</label>
  </div>
  <div class="form-group">
    <button class="btn btn-round btn-b">Login</button>
  </div>
  <div class="form-group"><a href="{{ path('security_reset') }}">Forgot Password?</a></div>
</form>

This works fine in the local DEV and TEST environments but when I push this up to GAE, I’m getting the error below:

Unable to load the "SymfonyBridgeTwigFormTwigRenderer" runtime.

I’ve been digging for a couple hours now and haven’t found a hit as to what’s wrong here. Anyone have any ideas where to look?

Thanks in advance,

2

Answers


  1. In my case “twig.strict_variables: true” to “twig.strict_variables: false” fixed an issue.

    Login or Signup to reply.
  2. We encountered the same error this morning at work, in a Silex app.

    This helped us: https://github.com/silexphp/Silex/pull/1571

    It worked for us to change in our composer.json the version of symfony/form from ~2.8|^3.0 to ~2.8|3.3 as it appears TwigRenderer is deprecated in 3.4.

    Hope this helps.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search