Skip to content

Update ds extension docs for v2.0#5493

Open
rtheunissen wants to merge 1 commit intophp:masterfrom
php-ds:ds-v2-docs
Open

Update ds extension docs for v2.0#5493
rtheunissen wants to merge 1 commit intophp:masterfrom
php-ds:ds-v2-docs

Conversation

@rtheunissen
Copy link
Copy Markdown
Contributor

Summary

  • Remove docs for classes removed in v2: Vector, Deque, Stack, Queue, PriorityQueue, Collection, Sequence, Hashable
  • Add docs for new v2 classes: Seq, Heap, Key
  • Update Map, Set, Pair docs for v2 API changes
  • Add missing method docs: getIterator, ArrayAccess methods, __serialize/__unserialize
  • Fix missing ksorted entry in versions.xml

See ext-ds v2.0.0 changelog for full details on the API changes.

Test plan

  • Verify XML validates against DocBook schema
  • Confirm all method pages render correctly on php.net
  • Cross-check versions.xml entries against documented methods

🤖 Generated with Claude Code

- Remove docs for classes removed in v2: Vector, Deque, Stack, Queue,
  PriorityQueue, Collection, Sequence, Hashable
- Add docs for new v2 classes: Seq, Heap, Key
- Update Map, Set, Pair docs for v2 API changes
- Add missing method docs: getIterator, ArrayAccess methods,
  __serialize/__unserialize across all collection classes
- Fix missing ksorted entry in versions.xml

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Comment thread reference/ds/ds.seq.xml
<varlistentry xml:id="ds-seq.constants.min-capacity">
<term><constant>Ds\Seq::MIN_CAPACITY</constant></term>
<listitem>
<para></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></para>
<simpara>The minimum capacity of a <classname>Ds\Seq</classname>.</simpara>

Comment thread reference/ds/ds.set.xml
<varlistentry xml:id="ds-set.constants.min-capacity">
<term><constant>Ds\Set::MIN_CAPACITY</constant></term>
<listitem>
<para></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
<simpara>The minimum capacity of a <classname>Ds\Set</classname>.</simpara>

Comment thread reference/ds/ds.map.xml
<varlistentry xml:id="ds-map.constants.min-capacity">
<term><constant>Ds\Map::MIN_CAPACITY</constant></term>
<listitem>
<para></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
<simpara>The minimum capacity of a <classname>Ds\Map</classname>.</simpara>

Comment thread reference/ds/ds.heap.xml
<varlistentry xml:id="ds-heap.constants.min-capacity">
<term><constant>Ds\Heap::MIN_CAPACITY</constant></term>
<listitem>
<para></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></para>
<simpara>The minimum capacity of a <classname>Ds\Heap</classname>.</simpara>

Comment thread reference/ds/ds.seq.xml
The name is a common abbreviation of “double-ended queue” and is used
internally by <classname>Ds\Queue</classname>.
A Seq is an ordered sequence of values in a contiguous buffer that grows
and shrinks automatically. It replaces both <classname>Ds\Vector</classname>
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
and shrinks automatically. It replaces both <classname>Ds\Vector</classname>
and shrinks automatically. It replaces both <literal>Ds\Vector</literal>

Comment thread reference/ds/ds.seq.xml
internally by <classname>Ds\Queue</classname>.
A Seq is an ordered sequence of values in a contiguous buffer that grows
and shrinks automatically. It replaces both <classname>Ds\Vector</classname>
and <classname>Ds\Deque</classname> from v1.
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
and <classname>Ds\Deque</classname> from v1.
and <literal>Ds\Deque</literal> from v1.

Comment thread reference/ds/ds.heap.xml
is provided, the heap behaves as a max-heap using standard comparison.
</para>
<para>
Replaces <classname>Ds\PriorityQueue</classname> from v1, providing more
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
Replaces <classname>Ds\PriorityQueue</classname> from v1, providing more
Replaces <literal>Ds\PriorityQueue</literal> from v1, providing more

Comment thread reference/ds/ds.key.xml
<para>
Key is an interface that allows objects to be used as keys in a
<classname>Ds\Map</classname> or values in a <classname>Ds\Set</classname>.
It replaces <classname>Ds\Hashable</classname> from v1.
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
It replaces <classname>Ds\Hashable</classname> from v1.
It replaces <literal>Ds\Hashable</literal> from v1.

Comment thread reference/ds/ds.map.xml
<row>
<entry>PECL ds 2.0.0</entry>
<entry>
No longer implements <classname>Ds\Collection</classname>.
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
No longer implements <classname>Ds\Collection</classname>.
No longer implements <literal>Ds\Collection</literal>.

Comment thread reference/ds/ds.set.xml
<row>
<entry>PECL ds 2.0.0</entry>
<entry>
No longer implements <classname>Ds\Collection</classname>.
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
No longer implements <classname>Ds\Collection</classname>.
No longer implements <literal>Ds\Collection</literal>.

<para>
&return.void;
</para>
</refsect1>
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.

Ds\Seq narrows the mixed offset to int at runtime and throws a TypeError otherwise here. Could we add a short <refsect1 role="errors"> here mentioning the TypeError for non-int offsets?

Returns &true; if the deque is empty, &false; otherwise.
The value at the given offset.
</para>
</refsect1>
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.

Ds\Seq narrows the mixed offset to int at runtime and throws a TypeError otherwise here. Could we add a short <refsect1 role="errors"> here mentioning the TypeError for non-int offsets?

<para>
&true; if the offset is valid, &false; otherwise.
</para>
</refsect1>
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.

Ds\Seq narrows the mixed offset to int at runtime and throws a TypeError otherwise here. Could we add a short <refsect1 role="errors"> here mentioning the TypeError for non-int offsets?

<para>
&return.void;
</para>
</refsect1>
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.

Ds\Seq narrows the mixed offset to int at runtime and throws a TypeError otherwise here. Could we add a short <refsect1 role="errors"> here mentioning the TypeError for non-int offsets?

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