Skip to content

Add SplDoublyLinkedList ArrayAccess offset API (#13088)#13096

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-13088-spldoublylinkedlist-arrayaccess
Jun 28, 2026
Merged

Add SplDoublyLinkedList ArrayAccess offset API (#13088)#13096
PurHur merged 1 commit into
masterfrom
agent/issue-13088-spldoublylinkedlist-arrayaccess

Conversation

@PurHur

@PurHur PurHur commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Registers offsetExists, offsetGet, offsetSet, and offsetUnset on SplDoublyLinkedList.
  • Bracket read/write/unset delegates to the deque backing store with OutOfRangeException for invalid indices and ?int coercion matching php-src.

php-src reference: ext/spl/spl_dllist.cspl_dllist_object_* offset handlers.

Closes #13088

Verification

./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_spldoublylinkedlist_arrayaccess.php'
# ok

./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/compliance/cases/stdlib/spl_dllist_arrayaccess.phpt'
# 1 / true / 99 / 1 / 99

Note: foreach over SplDoublyLinkedList still requires Iterator method registration (separate from this ArrayAccess slice).

Made with Cursor

Wire offsetExists/offsetGet/offsetSet/offsetUnset to deque storage
with php-src OutOfRangeException and ?int coercion semantics.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 9854a45 into master Jun 28, 2026
@PurHur PurHur deleted the agent/issue-13088-spldoublylinkedlist-arrayaccess branch June 28, 2026 08:47
PurHur added a commit that referenced this pull request Jun 28, 2026
…ges. (#13103)

Regenerate docs/bootstrap-inventory.md construct flags after #13094#13096
added getSize/setSize/jsonSerialize and ArrayAccess offset APIs.

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Regression: SplDoublyLinkedList ArrayAccess — offsetExists/offsetGet missing despite instanceof (ext/spl/spl_dllist.c)

1 participant