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

timber / timber / 45574631491
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 25 Nov 2026 08:21AM UTC
Jobs 1
Files 73
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

25 Nov 2026 08:14AM UTC coverage: 90.552% (+0.2%) from 90.355%
45574631491

push

travis-ci

web-flow
fix: support Twig's use_yield option (#3252)

* fix(twig): preserve echo capture in template rendering for twig v4

Twig 4 rewrote Template::render() to use a yield/concat model instead of
ob_start()/ob_get_clean(), so PHP functions called from a template that
echo directly (wp_head, wp_footer, _e, bloginfo, ...) now bypass the
returned string and leak to stdout.

Wrap Loader::render_twig_template() and Timber::compile_string() with an
output buffer around $template->display() so any side-effect echoes are
captured into the returned output, matching Twig 3 behavior. This is
also a no-op shim on Twig 3 since its native render() already wraps
display() the same way.

Restores 10 failing tests against twig/twig 4.0.0-alpha1 without any
user-facing API change.

* test(twig): add return type to RuntimeLoaderInterface::load impl

Twig 4 added return types to all extension interface methods, including
RuntimeLoaderInterface::load(): ?object. The test runtime loader needs
to match the new signature to satisfy LSP under twig/twig 4.0.0-alpha1.

* test(twig): rewrite loop var assertions for LoopContext

Twig 4 made the `loop` variable a `Twig\Runtime\LoopContext` instance
with all-private state exposed through accessors. `loop|json_encode`
now serialises to `{}`, breaking the test's "dump the loop object"
strategy.

Build the JSON hash explicitly from `loop.index`, `loop.revindex0`,
`loop.length`, `loop.first`, and `loop.last` instead. The downstream
parsing and assertions are unchanged.

* fix(twig): capture echoed output when rendering a single block

TwigBlockLoader still called renderBlock() and render(), so output echoed by functions called inside a block leaked to stdout on Twig 4 instead of being returned.

Render blocks through displayBlock() under an output buffer, and fall back to the parent loader for full templates. Make Helper::ob_function() discard its buffer when the callable throws, and reuse it in Loader and Timber::compile_string() instead of ... (continued)

76 of 78 new or added lines in 7 files covered. (97.44%)

38 existing lines in 2 files now uncovered.

4888 of 5398 relevant lines covered (90.55%)

77.99 hits per line

Uncovered Changes

Lines Coverage ∆ File
2
88.24
src/Twig/NodeVisitor/OutputBufferNodeVisitor.php

Coverage Regressions

Lines Coverage ∆ File
37
87.05
0.43% src/Timber.php
1
94.4
-0.24% src/Post.php
Jobs
ID Job ID Ran Files Coverage
1 45574631491.1 25 Nov 2026 08:21AM UTC 73
90.55
Travis Job
Source Files on build 45574631491
  • Tree
  • List 73
  • Changed 6
  • Source Changed 4
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #45574631491
  • 25decd5d on github
  • Prev Build on 2.x (#44692655137)
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