Commit 594e6dd
authored
[BUGFIX] Bump phpdocumentor/guides-* to fix bignums-tip leak in tabs (#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](#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>1 parent 17933a0 commit 594e6dd
4 files changed
Lines changed: 317 additions & 26 deletions
File tree
- packages/typo3-docs-theme/src/Nodes
- tests/Integration/tests/bignum/bignum-in-tabs
- expected
- input
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
0 commit comments