Skip to content

Fix docs parsing of CommonMark children#267

Open
ashfame wants to merge 1 commit into
trunkfrom
fix/docs-commonmark-children-array
Open

Fix docs parsing of CommonMark children#267
ashfame wants to merge 1 commit into
trunkfrom
fix/docs-commonmark-children-array

Conversation

@ashfame
Copy link
Copy Markdown
Member

@ashfame ashfame commented May 7, 2026

Fixes the docs deploy failure from https://github.com/WordPress/php-toolkit/actions/runs/25510294479/job/74871014893#step:5:21.

The vendored CommonMark Node::children() implementation can return a plain array. bin/build-reference.php assumed it always returned Traversable and passed it directly to iterator_to_array(), which fails under the docs deploy PHP 8.1 job.

This adds a small node_children() helper that accepts either arrays or Traversable results, then uses it in both bin/build-reference.php and bin/run-snippets.php.

@ashfame ashfame requested review from a team, JanJakes and adamziel and removed request for a team May 7, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant