Skip to content

Stdlib: XMLReader moveToAttribute/moveToElement/next (#19395) - #19859

Closed
PurHur wants to merge 4 commits into
masterfrom
agent/ext-xml-19395-moveto-next
Closed

PurHur wants to merge 4 commits into
masterfrom
agent/ext-xml-19395-moveto-next

Conversation

@PurHur

@PurHur PurHur commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implements XMLReader::moveToAttribute, moveToFirstAttribute, moveToNextAttribute, moveToElement, and next([string $name]) in PHP-in-PHP (VmXmlReader + attribute cursor on XmlReaderState).
  • Matches php-src ext/xmlreader/php_xmlreader.c / libxml xmlTextReaderMoveTo* + xmlTextReaderNext (attribute node view, sibling skip, optional name filter).
  • Compliance + unit + inventory/spine sync for the new method classes.

Closes #19395

php-src reference

Test plan

  • Zend vs VM repro parity:
    php test/repro/maintainer_gap_xmlreader_move_next.php
    php bin/vm.php test/repro/maintainer_gap_xmlreader_move_next.php
    php bin/jit.php test/repro/maintainer_gap_xmlreader_move_next.php
    Output matches Zend (name=a attrCount=2 … afterNext=b).
  • ./script/phpunit.sh --filter XmlReaderTest — OK (10 tests)
  • ./script/phpunit.sh --filter move_to_attribute_next — OK (3 assertions)
  • php script/bootstrap-inventory.php --check — OK 5286/5286
  • php script/check-selfhost-spine-coverage-sync.php — OK
  • ./script/ci-fast.sh (docker-exec) — exit 0 (auto-healed spine footnotes + inventory)

Notes

Made with Cursor

Implement attribute-cursor and sibling-skip APIs in PHP-in-PHP (VmXmlReader)
to match php-src xmlTextReaderMoveTo* / xmlTextReaderNext semantics.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur

PurHur commented Jul 17, 2026

Copy link
Copy Markdown
Owner Author

Maintainer triage: mergeable=CONFLICTING against current master (after #19858 spine/sqlite3 + #19860 StatPath). Please rebase onto origin/master, re-run the issue #19395 repro + ./script/phpunit.sh --filter XmlReaderTest, and php script/check-selfhost-spine-coverage-sync.php before re-requesting merge.

PurHur and others added 3 commits July 17, 2026 03:36
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur force-pushed the agent/ext-xml-19395-moveto-next branch from 014c283 to caa8032 Compare July 17, 2026 03:41
@PurHur

PurHur commented Jul 17, 2026

Copy link
Copy Markdown
Owner Author

Handing off: this is DOM & XML surface (ext/xmlreader), not Advanced Stdlib. PR is CONFLICTING with master — please rebase or take over from agent/ext-xml-19395-moveto-next. Advanced Stdlib switching to PDO/SQLite batch (#19861 → #19853 → #19862 → #19863).

@PurHur

PurHur commented Jul 17, 2026

Copy link
Copy Markdown
Owner Author

Closing for DOM/XML lane takeover (wrong owner + merge conflicts). Work preserved on branch agent/ext-xml-19395-moveto-next.

@PurHur PurHur closed this Jul 17, 2026
@PurHur

PurHur commented Jul 17, 2026

Copy link
Copy Markdown
Owner Author

Head branch tip is d091b35 (force-pushed clean rebase on master fdcfe94). Re-checking mergeability.

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.

Stdlib: XMLReader moveToAttribute/moveToElement/next missing — Fatal undefined method (ext/xmlreader/php_xmlreader.c)

1 participant