php - 无法加载 "Symfony\Bridge\Twig\Form\TwigRenderer"运行时

标签 php symfony google-app-engine

我一直在克服各种困难,将现有的 Symfony3 Web 应用程序从本地 LAMP 主机迁移到 Goggle 的 App Engine 标准 PHP 环境。我从 appengine-symfony-starter-project 中得到了提示使用 Memcache 进行 session 、预缓存应用程序代码并连接到 Cloud SQL MySQL 数据库。核心部分工作正常。

我使用 TWIG 模板在 /login 添加了一个登录表单,其中的表单如下所示:

<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>

这在本地开发和测试环境中运行良好,但是当我将其推送到 GAE 时,我收到以下错误:

Unable to load the "Symfony\Bridge\Twig\Form\TwigRenderer" runtime.

我已经挖掘了几个小时了,但还没有发现这里出了什么问题。有人知道去哪里看吗?

提前致谢,

最佳答案

就我而言,“twig.strict_variables: true”到“twig.strict_variables: false”修复了一个问题。

关于php - 无法加载 "Symfony\Bridge\Twig\Form\TwigRenderer"运行时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47581604/

相关文章:

php - 每个关键字 10 条记录 SQL

php - 通过相关性(模糊,同义词)进行 mySQL 搜索

php - 在 Doctrine2 上设置无限超时

google-app-engine - 用于 Java 示例、教程和文档的 Google 应用引擎数据存储区 "low level api"?

java - 通过 AppEngine 访问 Books API 失败,错误代码为 400

java - 如何为实体的 ID/名称生成随机字符串而不是数字?

php - 如果表行的列属性之一为 true,则设置表行的样式

php - 无法在动态链接库中找到 MAMP 服务器

symfony - Silex + Twig : form_widget() not found, 即使安装了 Symfony Bridge

database - 如何使用 Symfony 2 和 Twig 显示保存在数据库中的 HTML 标签