如何在模板中找到未使用的变量?

发布于 2025-02-03 06:02:48 字数 189 浏览 3 评论 0原文

旧版代码正在准备大量数据,有时在渲染的树枝模板中不使用它。

有没有办法知道在渲染过程中没有使用什么?

很高兴看到或强制渲染所有其他数据,这是没有触摸的。

PS:我的想法只是摆脱没有用过的东西,可以找到并看到它们,而没有挖掘数百万的代码

ps2:twig用作单独的作曲家软件包,也没有连接交响曲或drupal

Legacy code, is preparing a lot of data, and sometimes it is not used in rendered TWIG template.

Is there a way to know, what wasn't use during rendering process?

Will be nice to see, or force to render all other data, that was not touched.

PS: my idea is just get rid of that not used things, and will be nice to find and see them, with not digging to millions lines of code

PS2: twig is used as separate composer package, and is not connected neither Symphony or Drupal

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文