Skip to content

[BUGFIX] Bump phpdocumentor/guides-* to fix bignums-tip leak in tabs#1243

Merged
linawolf merged 2 commits into
TYPO3-Documentation:mainfrom
CybotTM:fix/bump-guides-bootstrap-1.9.7
May 10, 2026
Merged

[BUGFIX] Bump phpdocumentor/guides-* to fix bignums-tip leak in tabs#1243
linawolf merged 2 commits into
TYPO3-Documentation:mainfrom
CybotTM:fix/bump-guides-bootstrap-1.9.7

Conversation

@CybotTM
Copy link
Copy Markdown
Contributor

@CybotTM CybotTM commented May 9, 2026

Summary

Bumps phpdocumentor monorepo subsplit packages so the bignums-tip text leak in tabs (#1236) is fixed:

  • phpdocumentor/guides 1.9.6 → 1.10.1
  • phpdocumentor/guides-restructured-text 1.9.6 → 1.10.1
  • phpdocumentor/guides-theme-bootstrap 1.9.6 → 1.9.7
  • phpdocumentor/filesystem 1.9.0 → 1.10.0

Resolves #1236.

Why this fixes #1236

The bignums-tip rst-class leak inside tabs was caused by a dual-storage bug in phpDocumentor\Guides\Bootstrap\Nodes\TabsNode: tab children were kept in two parallel arrays (a private $tabs cache plus the $value array inherited from CompoundNode). The ClassNodeTransformer correctly removed orphan ClassNodes from $value, but the bootstrap-theme Twig template iterated the stale $tabs cache, which still referenced the pre-transform tab and emitted its ClassNode's value (bignums-tip) as plain text.

The fix landed incidentally via phpDocumentor/guides#1316 / 1bdb18c7, which moved the Tabs/Tab directives out of guides-theme-bootstrap into guides-restructured-text. The Bootstrap classes are now deprecation shims that delegate to RestructuredText\Nodes\TabsNode, whose getTabs() is derived from getChildren() — no stale cache, no leak.

Why this couldn't be merged earlier

guides-theme-bootstrap:1.9.7 declared phpdocumentor/guides-restructured-text:^1.10 || ^2.0, but no 1.10.x of guides-restructured-text had been published on Packagist yet — the constraint was unresolvable for any consumer with the default minimum-stability: stable. I filed phpDocumentor/guides#1341; @jaapio tagged 1.10.1 on 2026-05-05 and the release is now installable.

Test plan

  • composer update phpdocumentor/* resolves cleanly with the existing constraints in composer.json (no constraint changes needed)
  • make test-integration — 114 tests, 1140 assertions, OK (1 new test added)
  • make test-unit — 83 tests, 183 assertions, OK
  • make test-xml — all guides.xml fixtures validate
  • make test-docs — project docs render successfully
  • make test-rendertest — render test corpus renders successfully (incl. ru_RU, fr_FR, de_DE localizations)
  • make phpstan[OK] No errors
  • Reproducer from [BUG] Using rst-class:: bignums-tip for bulletpoints nested in tabs outputs the rst-class-tip in rendered documentation #1236 rendered against upgraded packages — produces <ol class="bignums-tip"> with no literal text leak
  • Same reproducer rendered against pre-upgrade packages — still leaks bignums-tip (regression test would catch it)

New regression fixture

tests/Integration/tests/bignum/bignum-in-tabs/ — mirrors the reproducer from #1236 (rst-class sibling to a list inside a tabs:: directive) and asserts the rendered tab pane contains <ol class="bignums-tip"> without leaking the literal class name as text. The fixture lives under bignum/ rather than tabs/ because the existing tabs/ test harness already has a top-level input/ directory and the data provider only recurses into directories without one.

Downstream PHPStan fix included

phpDocumentor/guides#1316 made phpDocumentor\Guides\Bootstrap\Nodes\AbstractTabNode a class_alias() shim. The local T3Docs\Typo3DocsTheme\Nodes\GroupTabNode extends that class, and PHPStan can't follow runtime aliases — so the bump initially caused two Quality job failures (return.type and staticMethod.notFound).

Fix is a one-line import switch to the new home: phpDocumentor\Guides\RestructuredText\Nodes\AbstractTabNode. Runtime behaviour is identical (the alias makes the inheritance chain the same either way), and the deprecation notice the shim would otherwise emit on file load is silenced as a side effect.

Related

A detailed per-PR review of all upstream changes between 1.9.6...1.10.1 (with risk assessment and pointers for deeper review) is in the comment thread below.

Notes for review

  • No composer.json constraint changes were required — the existing ^1.9.4 / ^1.9 / ^1.7 constraints all resolve to the new versions. The only code change is the one-line GroupTabNode import switch documented above.
  • The bump pulls in phpdocumentor/guides:1.10.1 (a minor) — the changes between 1.9.6 and 1.10.1 are dominated by the Tabs/Tab move (#1316) plus deprecation shims; full integration suite passes without changes to any other expected fixtures.

Bumps phpdocumentor monorepo subsplit packages:

- phpdocumentor/guides 1.9.6 -> 1.10.1
- phpdocumentor/guides-restructured-text 1.9.6 -> 1.10.1
- phpdocumentor/guides-theme-bootstrap 1.9.6 -> 1.9.7
- phpdocumentor/filesystem 1.9.0 -> 1.10.0

The fix landed incidentally in phpDocumentor/guides#1316 which moved the
Tabs/Tab directives out of guides-theme-bootstrap into guides-restructured-text,
turning the Bootstrap classes into deprecation shims that no longer carry the
TabsNode dual-storage bug. With the move, the sibling rst-class node is no
longer leaked as text into the tab pane.

The bump was previously blocked because guides-theme-bootstrap:1.9.7 declared
phpdocumentor/guides-restructured-text:^1.10 || ^2.0 but no 1.10.x of the
restructured-text package had been published yet (phpDocumentor/guides#1341).
guides-restructured-text:1.10.1 has now been tagged.

Adds a regression fixture at tests/Integration/tests/bignum/bignum-in-tabs/
that mirrors the reproducer from the upstream issue and asserts the rendered
tab pane contains <ol class="bignums-tip"> without leaking the literal class
name as text.

Resolves: TYPO3-Documentation#1236
Related: phpDocumentor/guides#1316, phpDocumentor/guides#1341
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@CybotTM CybotTM marked this pull request as draft May 9, 2026 09:21
@CybotTM
Copy link
Copy Markdown
Contributor Author

CybotTM commented May 9, 2026

Detailed change review for maintainers

Expanded breakdown of all upstream changes in phpDocumentor/guides 1.9.6...1.10.1, grouped per subsplit and annotated with risk and pointers for deeper review.

Why these 4 packages bump and others stay at 1.9.6

phpDocumentor/guides is a monorepo with one subsplit per packages/<name>/ directory. The subsplit publish workflow only tags a subsplit when its directory actually changed between two monorepo tags. So composer update phpdocumentor/* correctly resolves each package to its latest available Packagist tag — the asymmetric versions are not a resolution artifact, they reflect where code actually changed.

Package Resolved Why
phpdocumentor/guides 1.10.1 5 PRs touched packages/guides/
phpdocumentor/guides-restructured-text 1.10.1 4 PRs touched packages/guides-restructured-text/
phpdocumentor/guides-theme-bootstrap 1.9.7 only #1316 touched it; nothing in 1.10.x
phpdocumentor/filesystem 1.10.0 only #1330 touched it; nothing in 1.10.1
guides-cli, guides-graphs, guides-markdown, guides-theme-rst unchanged at 1.9.6 / 1.9.5 no PR touched their package dirs — no 1.10.x tag exists for these on Packagist

1.9.7 — 2026-04-07 (compare)

PR Title Touches Risk Where to look if deeper review needed
#1316 Move tabs/tab directive to rst package guides + guides-restructured-text + guides-theme-bootstrap Low — deprecation shim path preserves BC; this is the change that resolves #1236 New bignum-in-tabs integration fixture in this PR covers the render path. Anyone consuming phpDocumentor\Guides\Bootstrap\Nodes\TabsNode directly should verify the shim's behavior.
#1317 Fix registering a service from another sub-package guides-restructured-text None — removes a stale UML service registration n/a
#1322 Fix section ID deduplication by walking full node tree guides Low — anchor IDs may differ for pages with conflicting subsection heading slugs Diff against Documentation-rendertest corpus; all 53 docs render identically locally
#1325 Tilde nbsp deprecation (opt-in disableLegacyTilde) guides-restructured-text None — flag defaults to false, BC preserved n/a
#1326 Improve interlink architecture guides Low–medium — largest non-fix change in the bump (+562/−31, 14 files); refactor toward multi-provider interlink resolution interlink/* integration fixtures all pass. If anyone reaches into the interlink resolver internals from a downstream extension, this is the place to look.

1.10.0 — 2026-04-14 (compare)

PR Title Touches Risk Where to look if deeper review needed
#1330 Add lastModified to filesystem filesystem None — additive method (this is why filesystem bumped to a minor) n/a
#1331 Internal anchors do not prefer current doc guides Behavior change — RST anonymous heading refs now resolve to the current page first If any Documentation page deliberately relied on cross-document resolution of anonymous refs, that page's links may now point to a same-page anchor instead. Render-diff would catch it; none observed in our corpus. Fixes phpDocumentor/phpDocumentor#3781.

1.10.1 — 2026-05-08 (compare)

PR Title Touches Risk Where to look if deeper review needed
#1333 Guard against null token after trailing backslash in text role guides-restructured-text None — turns a PHP warning crash into graceful pass-through Fixes phpDocumentor/phpDocumentor#4082
#1334 Deprecate SpecificationInterface in FileCollector and ParseDirectoryCommand guides Low — only matters if render-guides or its consumers call FileCollector::collect() with a Flyfinder spec grep confirms no such call sites in render-guides

Non-substantive (CI only — no runtime impact)

GitHub Actions workflow updates only; none touch any packages/ directory:

#1313, #1318, #1319, #1323, #1332, #1337, #1340 — dependabot bumps for sorenlouv/backport-github-action, ramsey/composer-install, dependabot/fetch-metadata, actions/cache.

TL;DR — highest-attention items

For maintainers wanting to focus their review, these three are the ones worth reading carefully:

  1. #1326 (interlink refactor) — largest behavior surface change; interlink/* integration fixtures all green here.
  2. #1331 (anchor resolution priority) — semantic change in how anonymous RST refs resolve. Worth a render-diff against existing Documentation if cross-document anonymous refs are in use.
  3. #1316 (tabs move) — the change that fixes [BUG] Using rst-class:: bignums-tip for bulletpoints nested in tabs outputs the rst-class-tip in rendered documentation #1236. Deprecation shim, no runtime break expected.

Everything else is either an additive surface change, a deprecation that defaults to BC, or a fix.

phpDocumentor/guides#1316 moved Tabs/Tab from guides-theme-bootstrap to
guides-restructured-text. The Bootstrap\Nodes\AbstractTabNode class is now
a deprecation shim that uses class_alias() at runtime, which PHPStan cannot
follow. As a result, static analysis sees an empty `if (false) abstract
class AbstractTabNode {}` declaration, leading to:

- Method T3Docs\Typo3DocsTheme\Directives\GroupTabDirective::processSub()
  should return Node|null but returns GroupTabNode (because the parent
  AbstractTabNode appears to PHPStan as not-a-Node)
- Call to undefined static method
  phpDocumentor\Guides\Bootstrap\Nodes\AbstractTabNode::__construct()

Switching the import to the new RestructuredText namespace resolves both
errors. Runtime behaviour is unchanged: the deprecated Bootstrap class is
class_alias()d to the RST one, so the inheritance chain is identical
either way. This also silences the deprecation notice the shim would
otherwise emit when the file is loaded.

Refs: phpDocumentor/guides#1316, phpDocumentor/guides#1320
Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@CybotTM CybotTM marked this pull request as ready for review May 9, 2026 09:56
@CybotTM
Copy link
Copy Markdown
Contributor Author

CybotTM commented May 9, 2026

Ready for review.

@linawolf linawolf merged commit 594e6dd into TYPO3-Documentation:main May 10, 2026
8 checks passed
typo3-documentation-team pushed a commit to TYPO3-Documentation/t3docs-typo3-docs-theme that referenced this pull request May 10, 2026
…(#1243)

## Summary

Bumps phpdocumentor monorepo subsplit packages so the `bignums-tip` text
leak in tabs (#1236) is fixed:

- `phpdocumentor/guides` 1.9.6 → 1.10.1
- `phpdocumentor/guides-restructured-text` 1.9.6 → 1.10.1
- `phpdocumentor/guides-theme-bootstrap` 1.9.6 → 1.9.7
- `phpdocumentor/filesystem` 1.9.0 → 1.10.0

Resolves #1236.

## Why this fixes #1236

The `bignums-tip` rst-class leak inside tabs was caused by a
dual-storage bug in `phpDocumentor\Guides\Bootstrap\Nodes\TabsNode`: tab
children were kept in two parallel arrays (a private `$tabs` cache plus
the `$value` array inherited from `CompoundNode`). The
`ClassNodeTransformer` correctly removed orphan `ClassNode`s from
`$value`, but the bootstrap-theme Twig template iterated the stale
`$tabs` cache, which still referenced the pre-transform tab and emitted
its `ClassNode`'s value (`bignums-tip`) as plain text.

The fix landed incidentally via [phpDocumentor/guides#1316 /
1bdb18c7](phpDocumentor/guides@1bdb18c7),
which moved the Tabs/Tab directives out of `guides-theme-bootstrap` into
`guides-restructured-text`. The Bootstrap classes are now deprecation
shims that delegate to `RestructuredText\Nodes\TabsNode`, whose
`getTabs()` is derived from `getChildren()` — no stale cache, no leak.

## Why this couldn't be merged earlier

`guides-theme-bootstrap:1.9.7` declared
`phpdocumentor/guides-restructured-text:^1.10 || ^2.0`, but no `1.10.x`
of `guides-restructured-text` had been published on Packagist yet — the
constraint was unresolvable for any consumer with the default
`minimum-stability: stable`. I filed
[phpDocumentor/guides#1341](phpDocumentor/guides#1341);
@jaapio tagged `1.10.1` on 2026-05-05 and the release is now
installable.

## Test plan

- [x] `composer update phpdocumentor/*` resolves cleanly with the
existing constraints in `composer.json` (no constraint changes needed)
- [x] `make test-integration` — 114 tests, 1140 assertions, OK (1 new
test added)
- [x] `make test-unit` — 83 tests, 183 assertions, OK
- [x] `make test-xml` — all `guides.xml` fixtures validate
- [x] `make test-docs` — project docs render successfully
- [x] `make test-rendertest` — render test corpus renders successfully
(incl. ru_RU, fr_FR, de_DE localizations)
- [x] `make phpstan` — `[OK] No errors`
- [x] Reproducer from #1236 rendered against upgraded packages —
produces `<ol class="bignums-tip">` with no literal text leak
- [x] Same reproducer rendered against pre-upgrade packages — still
leaks `bignums-tip` (regression test would catch it)

## New regression fixture

`tests/Integration/tests/bignum/bignum-in-tabs/` — mirrors the
reproducer from #1236 (rst-class sibling to a list inside a `tabs::`
directive) and asserts the rendered tab pane contains `<ol
class="bignums-tip">` without leaking the literal class name as text.
The fixture lives under `bignum/` rather than `tabs/` because the
existing `tabs/` test harness already has a top-level `input/` directory
and the data provider only recurses into directories without one.

## Downstream PHPStan fix included


[phpDocumentor/guides#1316](phpDocumentor/guides#1316)
made `phpDocumentor\Guides\Bootstrap\Nodes\AbstractTabNode` a
`class_alias()` shim. The local
`T3Docs\Typo3DocsTheme\Nodes\GroupTabNode` extends that class, and
PHPStan can't follow runtime aliases — so the bump initially caused two
`Quality` job failures (`return.type` and `staticMethod.notFound`).

Fix is a one-line import switch to the new home:
`phpDocumentor\Guides\RestructuredText\Nodes\AbstractTabNode`. Runtime
behaviour is identical (the alias makes the inheritance chain the same
either way), and the deprecation notice the shim would otherwise emit on
file load is silenced as a side effect.

## Related

- #1236 — the issue this PR resolves
-
[phpDocumentor/guides#1316](phpDocumentor/guides#1316)
/ [commit
1bdb18c7](phpDocumentor/guides@1bdb18c7) —
upstream move of Tabs/Tab into `guides-restructured-text` (the
incidental fix)
-
[phpDocumentor/guides#1341](phpDocumentor/guides#1341)
— packaging issue blocking the upgrade until 2026-05-08

A detailed per-PR review of all upstream changes between
`1.9.6...1.10.1` (with risk assessment and pointers for deeper review)
is in the [comment thread
below](TYPO3-Documentation/render-guides#1243 (comment)).

## Notes for review

- No `composer.json` constraint changes were required — the existing
`^1.9.4` / `^1.9` / `^1.7` constraints all resolve to the new versions.
The only code change is the one-line `GroupTabNode` import switch
documented above.
- The bump pulls in `phpdocumentor/guides:1.10.1` (a minor) — the
changes between 1.9.6 and 1.10.1 are dominated by the Tabs/Tab move
(#1316) plus deprecation shims; full integration suite passes without
changes to any other expected fixtures.

---------

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
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.

[BUG] Using rst-class:: bignums-tip for bulletpoints nested in tabs outputs the rst-class-tip in rendered documentation

2 participants