Skip to content

Third-party manual, doc-base side#324

Open
alfsb wants to merge 5 commits into
php:masterfrom
alfsb:third-party-ext
Open

Third-party manual, doc-base side#324
alfsb wants to merge 5 commits into
php:masterfrom
alfsb:third-party-ext

Conversation

@alfsb

@alfsb alfsb commented Jul 21, 2026

Copy link
Copy Markdown
Member

This is the doc-base side of php/doc-en#5682 , for the splitting of third-party manuals from the main manual, with the minimal conventions possible. I took the path of also minimizing any XML output differences. In fact, the only output change occurs in the DOCTYPE node, the XML is identical. Also, the code is already prepared for any disappearance of actual DTD entity files.

As this is a big change, I plan to leave this open for almost two weeks.

The planned merge order is doc-en 5682 on July 30, and this in July 31. In the meantime, preparing for the actual disappearance of DTD entity files.

@alfsb

alfsb commented Jul 21, 2026

Copy link
Copy Markdown
Member Author

Comments and reviews wellcome.

Build breakage is expected, as manual.xml still does not exist on doc-en.

Comment thread configure.php Outdated
$conf[] = "<!ENTITY % translation-snippets $langTwo2>";
$conf[] = "<!ENTITY % translation-extensions $langTwo3>";

file_put_contents( __DIR__ . "/../conf.ent" , implode( "\n" , $conf ) );

@jordikroon jordikroon Jul 21, 2026

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.

This will break make in docker because this will write to /var/www, not doc-en. Can we perhaps write to temp instead. It's kinda meant for that.

file_put_contents( __DIR__ . "/temp/conf.ent" , implode( "\n" , $conf ) );

with it's companion:

<!ENTITY % configure SYSTEM "../doc-base/temp/conf.ent">.

If this conflicts, we could also write conf-$lang.ent.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This will break make in docker because this will write to /var/www, not doc-en. Can we perhaps write to temp instead. It's kinda meant for that.

The problem is that temp/ is relative to doc-base, but manual.xml now resides in doc-en. I was trying to remove the sibling restriction, but not considered this usage, and yes, it makes sense for now, as other parts/tools simply require doc-en and doc-base to be siblings. I will change it later.

That said, writing the output in /var/www is ok, but building manuals directly in /var/www is very unsafe, as it exposes all sorts executable scripts into the web. Even in local networks it is unwise to do so. Also permissions will get messy, very fast.

Consider setting up the docker with the internal superuser, but then decaying to a local user when doing any directory creations, git clonage and running build scripts. Only then publishing into /var/www that a superuser may be necessary. Running everything as root may cause all sorts of abnormal errors.

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.

Yes, but we should also assume that the docker for development is a tool, and writing to places other than the repositories would create files at places that are not desired.

Alternatively we could create a temp folder in doc-en and add it to gitignore.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Add temp/ folder, .gitignor'ed, and changed doc-en side.

@alfsb alfsb mentioned this pull request Jul 21, 2026
44 tasks
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