Skip to content

Add class to generate redirects.json from redirects.xml sidecar#260

Open
jordikroon wants to merge 1 commit into
php:masterfrom
jordikroon:doc-redirects
Open

Add class to generate redirects.json from redirects.xml sidecar#260
jordikroon wants to merge 1 commit into
php:masterfrom
jordikroon:doc-redirects

Conversation

@jordikroon

@jordikroon jordikroon commented Jul 6, 2026

Copy link
Copy Markdown
Member

The goal for this PR is to migrate all doc related redirects out of web-php.
Instead we generate a redirects.json from redirects.xml which is then loaded in-place.

Redirects not related to docs are NOT migrated. However shortcuts are.

@derickr derickr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really have to say much, but feel free to merge this. We can then see if it "breaks" anything, before merging doc-en (and web-php).

@alfsb

alfsb commented Jul 7, 2026

Copy link
Copy Markdown
Member

The Redirects class really generates data, or only validates it, while changing from XML to JSON?

Also, collectXmlIds() collects all xml:id, but I do not think all IDs become filenames of chunked manuals. AFAIK, the chunk logic is calculated using Docbook tag names, and this changes by render format.

So, if the purpose of xml:id collection is to verify if a redirect target exists, this can only be determined by inspecting the rendered chunked output directory for filenames (not IDs), for the specific rendering used by PHP Manual.

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.

3 participants