• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

timber / timber / 43578828782
91%
master: 93%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/WyriHaximus/github-action-composer-php-versions-in-range-2.2.0
DEFAULT BRANCH: master
Ran 14 Nov 2026 09:10AM UTC
Jobs 1
Files 70
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 Nov 2026 09:04AM UTC coverage: 90.149% (+0.03%) from 90.118%
43578828782

push

travis-ci

web-flow
feat: Reuse one Twig environment across renders behind an opt-in filter (#3320)

* feat: reuse one Twig environment across renders behind an opt-in filter

Building a Twig\Environment for every compile costs about 0.2 ms per call
on top of the render itself. The new timber/twig/environment/shared filter
(default false) makes Loader::get_twig() memoize the environment for the
current blog. render_template() swaps the environment's loader for the
current Loader's one during a render and restores it afterwards, so
caller-relative template lookup and nested compiles behave as before.
clear_cache_twig() discards the shared environment.

Nothing changes when the filter is off.

* test: cover more shared Twig environment cases

A timber/twig callback registered after the first build is ignored until
clear_cache_twig() empties the slot and the next render rebuilds the
environment. On multisite, switch_to_blog() and restore_current_blog() each
rebuild on the next render. Block rendering through compile_twig_block()
reuses the shared environment with its own caller paths, addPath() calls
made in timber/loader/twig no longer reach compile() and the loader is
restored after a failed render. A constant extends parent follows each
caller on full renders but stays bound to the first block render, and use
traits stay bound to the template's first instantiation.

* docs(performance): document the shared Twig environment filter

20 of 20 new or added lines in 1 file covered. (100.0%)

4768 of 5289 relevant lines covered (90.15%)

70.57 hits per line

Jobs
ID Job ID Ran Files Coverage
1 43578828782.1 14 Nov 2026 09:10AM UTC 70
90.15
Travis Job
Source Files on build 43578828782
  • Tree
  • List 70
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #43578828782
  • b6169826 on github
  • Prev Build on 2.x (#42380223081)
  • Next Build on 2.x (#43823084970)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc