Skip to content

Add missing ext/operator documentation#4669

Open
jb-lopez wants to merge 3 commits intophp:masterfrom
jb-lopez:master
Open

Add missing ext/operator documentation#4669
jb-lopez wants to merge 3 commits intophp:masterfrom
jb-lopez:master

Conversation

@jb-lopez
Copy link
Copy Markdown

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
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
Co-authored-by: Louis-Arnaud <la.catoire@gmail.com>
Comment on lines +315 to +317
<para>
Using the above class, you can overload the operators as follows:
</para>
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.

Suggested change
<para>
Using the above class, you can overload the operators as follows:
</para>
<simpara>
Using the above class, you can overload the operators as follows:
</simpara>

Comment on lines +328 to +330
<para>
The above code will output:
</para>
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.

Suggested change
<para>
The above code will output:
</para>
<simpara>
The above code will output:
</simpara>

Comment on lines +8 to +11
<para>
&pecl.info;
<link xlink:href="&url.pecl.package;operator">&url.pecl.package;operator</link>.
</para>
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.

Suggested change
<para>
&pecl.info;
<link xlink:href="&url.pecl.package;operator">&url.pecl.package;operator</link>.
</para>
<simpara>
&pecl.info;
<link xlink:href="&url.pecl.package;operator">&url.pecl.package;operator</link>.
</simpara>

Comment on lines +16 to +17
operator releases are hosted by PECL and the source code by
<link xlink:href="&url.git.hub;jb-lopez/pecl-php-operator">github</link>.
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.

Suggested change
operator releases are hosted by PECL and the source code by
<link xlink:href="&url.git.hub;jb-lopez/pecl-php-operator">github</link>.
Operator releases are hosted by PECL and the source code by
<link xlink:href="&url.git.hub;jb-lopez/pecl-php-operator">Github</link>.

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.

Could you register this as a global entity in doc-base? global.ent file.
Also PECL is deprecated. It is preferred to use PIE. So I would even suggest to strongly encourage users to install this extension through PIE.

https://github.com/php/pie

Comment on lines +80 to +83
<para>
The following is the class that is used in the testing of the operator overloading extension.
It overloads all of the possible operators that can be overloaded for testing.
</para>
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.

Suggested change
<para>
The following is the class that is used in the testing of the operator overloading extension.
It overloads all of the possible operators that can be overloaded for testing.
</para>
<simpara>
This class provides implementations for all operators that can be overloaded
by the operator overloading extension. It is intended as a reference class for
users who want to see which overloadable operators are available and how they
are represented.
</simpara>

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.

4 participants