[DOC-CVS] [doc-en] master: Document offsetSet() as alias of deprecated SplObjectStorage::attach() (#5089)
[email protected] (Louis-Arnaud via GitHub)
| Newsgroups | php.doc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: Louis-Arnaud (lacatoire)
Committer: GitHub (web-flow)
Pusher: Girgias
Date: 2026-01-11T14:49:45Z
Commit: https://github.com/php/doc-en/commit/a0d62151102e4bf83e2bb4068782757d20ba086d
Raw diff: https://github.com/php/doc-en/commit/a0d62151102e4bf83e2bb4068782757d20ba086d.diff
Document offsetSet() as alias of deprecated SplObjectStorage::attach() (#5089)
`SplObjectStorage::offsetSet()` is an alias of `SplObjectStorage::attach()`,
which is deprecated as of PHP 8.5.
This change makes the alias relationship explicit in the documentation.
Issue: https://github.com/php/doc-en/issues/4957
Changed paths:
M reference/spl/splobjectstorage/attach.xml
Diff:
diff --git a/reference/spl/splobjectstorage/attach.xml b/reference/spl/splobjectstorage/attach.xml
index 83ca9883cc1e..ee940f37a7d3 100644
--- a/reference/spl/splobjectstorage/attach.xml
+++ b/reference/spl/splobjectstorage/attach.xml
@@ -21,6 +21,10 @@
<para>
Adds an <type>object</type> inside the storage, and optionally associate it to some data.
</para>
+ <simpara>
+ This method is an alias of <methodname>SplObjectStorage::offsetSet</methodname>.
+ </simpara>
+
</refsect1>
<refsect1 role="parameters">