Skip to content

Serve the pages of the moved extensions from /manual/extensions/ - #2038

Draft
lacatoire wants to merge 8 commits into
php:masterfrom
lacatoire:feat/doc-extensions-redirects
Draft

lacatoire wants to merge 8 commits into
php:masterfrom
lacatoire:feat/doc-extensions-redirects

Conversation

@lacatoire

@lacatoire lacatoire commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Serve the extensions manual (English only, from php/doc-extensions) from /manual/extensions/: a 301 from /manual/<lang>/<page>.php to /manual/extensions/<page>.php for the moved pages, no language chooser on its pages, and shortcuts (php.net/apcu_add) that fall back to it. Adds tests/extensions-migration.sh, the end-to-end test of the block. With PLAYWRIGHT=1 it also runs the Playwright tests of tests/EndToEnd/ExtensionsMigration (every old URL, variants of it, links in both directions, journeys in Chromium).

Includes the commits of #1960.

Block: php/phd#270, php/doc-extensions#49, php/doc-en#5998, php/doc-fr#3696. Merge order and how to test: php/doc-fr#3696.

jordikroon and others added 5 commits July 6, 2026 23:21
The third-party extensions manual is English only and lives next to the
language manuals. Pages that moved there keep their names:

- error.php loads manual/extensions/redirects.json, next to the doc
  redirects, and answers a 301 to /manual/extensions/ whatever the language
  of the old URL. A missing or corrupted redirects.json gives an empty map.
- manual_setup() builds the base URL, canonical URL and last modification
  time from manual/extensions/, and shows neither a language chooser nor
  the hreflang alternates.
- Shortcuts (php.net/apcu_add) fall back to the extensions manual when the
  language manual and the English one do not have the page.
error.php reads $LANG fewer times now that the doc redirect tables left it.
…s manual

The script builds the extensions manual and a language manual, serves them
with the built-in web server and checks the redirects, the links in both
directions and the shortcuts. Any maintainer can run it with the six
repositories side by side.
… test

doc-base defines an entity for every book of every sibling directory, which
hid the includes of books that moved. The test now builds the main manual as
its own CI does, and validates the English manual too.
LANGUAGE selects the language manual to build, fr by default.
… manual

The tests read the built manuals: every old URL in the language manual, a
sample in six other languages, variants of the URL (no .php, upper case,
trailing slash, query string, HEAD), pages that must not be redirected, the
links and the navigation in both directions, and journeys in Chromium.

They only exist when EXTENSIONS_MIGRATION=1, so the existing end-to-end job,
which does not build the manuals, is unchanged. tests/extensions-migration.sh
runs them with PLAYWRIGHT=1.
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.

2 participants