2017-02-28 14:54
浏览 16


I use a twig template directory at $SFROOT/var/cache/$ENVIRONMENT/templates to store generated twig templates.

In the twig configuration, i added this directory so templates are found.

When clearing the cache, the directory is not created automatically

All console commands, including composer post-install cache-clear hooks, fail because twig requires that directory to exist, but after a cache clear it doesn't.

How to I ensure the directory gets created after the cache is cleared?

I'm looking for some sort of dependencyinjection to add a hook to post-cache-clear (google returned nothing) with a mkdir command, but am unable to find out how to achieve that

图片转代码服务由CSDN问答提供 功能建议

我在$ SFROOT / var / cache / $ ENVIRONMENT / templates中使用twig模板目录来存储生成的树枝模板。



所有控制台命令(包括编写器安装后缓存清除挂钩)都会失败,因为twig要求该目录存在,但在缓存清除之后它不会。 < p>如何确保在清除缓存后创建目录?

我正在寻找某种依赖注入,以便为缓存后清除添加一个钩子(谷歌没有返回任何内容) )使用mkdir命令,但无法找到如何实现

  • 写回答
  • 好问题 提建议
  • 追加酬金
  • 关注问题
  • 邀请回答

1条回答 默认 最新

相关推荐 更多相似问题