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

timber / timber / 44071838194
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 17 Nov 2026 11:18AM 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

17 Nov 2026 11:12AM UTC coverage: 90.355% (+0.03%) from 90.328%
44071838194

push

travis-ci

web-flow
fix: Keep post changes between loops and fix loop events (#3296)

* fix: keep realized posts and fire loop hooks for keyed post collections

PostsIterator built a new Timber\Post on every loop and never stored it, so a second loop or $posts[0] lost changes made in the first loop, and the post class filter ran again. The loop boundaries assumed list keys (0 and count - 1), so an ID-keyed collection such as Post::children() fired neither loop_start nor loop_end and left the post global on the last child.

Store the realized post at its key, fire loop_start in rewind() when the collection has posts, and fire loop_end when next() moves past the last post.

* fix: track the loop in PostsIterator instead of relying on rewind

Firing loop_start in rewind() missed a traversal that starts at current() or after seek(0), and a next() past the end fired loop_end again. current() past the end also stored null under a null key, which appended an entry and made the iterator valid again.

A flag now marks a running loop: the first current() on a post fires loop_start, and the next() that moves past the last post fires loop_end once. current() returns null past the end without changing the collection.

* fix: start a new loop when a PostsIterator restarts

After a loop ended early, rewind() or seek(0) on the same iterator did not fire loop_start again, because the loop flag stayed set. Both now reset the flag, so the restarted pass fires loop_start like it did before.

* docs: simplify the post reuse comment in PostsIterator

* fix: keep PostsIterator subclasses without return types loading

The new rewind() and seek() overrides declared a native void return type. A subclass that overrides either method without a return type, which ArrayIterator allows with #[ReturnTypeWillChange], then failed with a fatal error. Use the same #[ReturnTypeWillChange] and @return void pattern as current().

* fix(posts): keep post IDs in a collection after a loop

PostsIterator now only... (continued)

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

4806 of 5319 relevant lines covered (90.36%)

72.4 hits per line

Jobs
ID Job ID Ran Files Coverage
1 44071838194.1 17 Nov 2026 11:18AM UTC 70
90.36
Travis Job
Source Files on build 44071838194
  • Tree
  • List 70
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #44071838194
  • 8ab496d5 on github
  • Prev Build on 2.x (#43921886859)
  • Next Build on 2.x (#44295304060)
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