Skip to content

Add missing ext/operator documentation#4669

Merged
jordikroon merged 6 commits into
php:masterfrom
jb-lopez:master
Jun 25, 2026
Merged

Add missing ext/operator documentation#4669
jordikroon merged 6 commits into
php:masterfrom
jb-lopez:master

Conversation

@jb-lopez

Copy link
Copy Markdown
Contributor

This pull request is to add the missing documentation for the PECL operator extension. I have taken over as the lead maintainer for that extension, but this is my first contribution to the PHP documentation so any feedback is welcome. There is a companion pull request to doc-base that goes with one and is required by this one. php/doc-base#246

There appears to never have been any documentation for the PECL operator extension. For this pull request I've added the test class that ext/operator uses all of its overloading capabilities as a complete code sample.

@jb-lopez

Copy link
Copy Markdown
Contributor Author

I would like to note that since this is a new documentation the workflow run https://github.com/php/doc-en/actions/runs/14958493251/job/42050000015 is going to fail until the related pull request php/doc-base#246 is merged.

@bettykadondi12

Copy link
Copy Markdown

Great👍

Comment thread reference/operator/book.xml Outdated
Comment thread reference/operator/book.xml Outdated
Comment thread reference/operator/book.xml Outdated
Comment thread reference/operator/book.xml Outdated
Comment thread reference/operator/setup.xml Outdated
Comment thread reference/operator/setup.xml Outdated
Comment thread reference/operator/overloading.xml
Comment thread language/operators.xml Outdated
Comment thread reference/operator/overloading.xml Outdated
Comment thread reference/operator/overloading.xml Outdated
Comment thread reference/operator/overloading.xml Outdated
Comment thread reference/operator/overloading.xml Outdated
Comment thread reference/operator/setup.xml Outdated
Comment thread reference/operator/setup.xml
Comment thread reference/operator/overloading.xml Outdated
@NickSdot

NickSdot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Quick heads up... Given that PECL was deprecated (after this PR was opened) I believe the references to PECL in this PR should be removed.

@jb-lopez

Copy link
Copy Markdown
Contributor Author

Quick heads up... Given that PECL was deprecated (after this PR was opened) I believe the references to PECL in this PR should be removed.

I am trying to update this to use PIE, but it is still using PECL. I have not yet had the time to do that yet. I will reorganize my todo list and move this up in priority.

@jordikroon

Copy link
Copy Markdown
Member

Hi @jb-lopez,

I have previously stated that I would recommend you to move this extension to PIE. However given the historical record of this extension I am fine if this links to PECL for the moment.

As for what blocks this PR, nothing really. And I would like to have this merged before an eventual passing or rejection of RFC to split third-party extensions for the docs. The reason is that if this is merged, we can do a lift and shift rather than that we have to deal with an open PR that needs to target a different repository.

We have recently introduced a sniffer tool (Docbook-CS). I would like to request you to rebase this PR with the master. That will give you some violations (like para to simpara). Once those are resolved (shouldn't be too difficult). We will merge the extension.

@jb-lopez jb-lopez force-pushed the master branch 2 times, most recently from ef09d4c to 3a6a39e Compare June 25, 2026 14:57
@jb-lopez

Copy link
Copy Markdown
Contributor Author

@jordikroon Thank you for the reply. I have been able to add PIE support to the extension. I have opened the PR here and have tested that I can install via pie install jblo/operator:dev-main without fail. At least on Linux, I do not have Windows or Mac.

I will work on updating the installation instructions to be for PIE instead of PECL here shortly.

I expected the Integrate test to fail. As I mentioned in the description, the companion PR php/doc-base#246 is mutually dependent with this one. Unless I have done things wrong (perhaps I have, it is my first time writing a new docbook).

I think I did the rebase wrong the first time around, but the two PRs are both rebased on master as of now.

Comment thread reference/operator/book.xml Outdated
Another example is creating an enhanced string class that has the multiplication
operator overloaded to allow repeating the string a certain number of times.
</simpara>
<section>

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.

Fyi this gave an error upon building.

Validating temp/manual.xml (jing)... failed.
/var/www/doc-base/temp/manual.xml:95854:13: error: element "section" incomplete; expected element "info", "subtitle", "title" or "titleabbrev"

@jordikroon

Copy link
Copy Markdown
Member

Thank you @jb-lopez. I have taken this on myself and have fixed the style issues.
As this is a big chunk that doc-base depends on, it's best to open a new PR for the PIE changes specifically.

@jordikroon jordikroon merged commit 6043cd2 into php:master Jun 25, 2026
2 checks passed
@bettykadondi12

bettykadondi12 commented Jun 25, 2026 via email

Copy link
Copy Markdown

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.

5 participants