Skip to content

Fix the calc XSD encoder example on the new Dom API - #87

Merged
veewee merged 1 commit into
php-soap:mainfrom
veewee:fix-calc-xsd-encoder-example
Oct 16, 2026
Merged

veewee merged 1 commit into
php-soap:mainfrom
veewee:fix-calc-xsd-encoder-example

Conversation

@veewee

@veewee veewee commented Oct 16, 2026 •

Copy link
Copy Markdown
Member
Q A
Type bugfix
BC Break no
Fixed issues

examples/calc-xsd-encoder.php crashed with a TypeError before it encoded anything. veewee/xml 4 hands out a PHP 8.4 Dom\Element, and goetas' SchemaReader::readNode() still only accepts the legacy DOMElement.

The example now passes the legacy document element from toUnsafeLegacyDocument(), the same way wsdl-reader's SchemaParser feeds schemas to goetas until that reader supports the new Dom API.

Summary by CodeRabbit

  • Chores
    • Updated the calculator example’s XSD document-element handling. No user-facing behavior changes are specified.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 21adef10-3f2c-418c-a9e7-7d448675e679
📥 Commits

Reviewing files that changed from the base of the PR and between 403a479 and bc92288.

📒 Files selected for processing: 1
  • examples/calc-xsd-encoder.php

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The XSD encoder example now passes the document element from toUnsafeLegacyDocument() to SchemaReader instead of using locateDocumentElement().

Changes: XSD reader input

Layer / File(s) Summary
Document element source
examples/calc-xsd-encoder.php
SchemaReader now receives the document element from toUnsafeLegacyDocument() instead of locateDocumentElement().

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to bc922

The example now supplies the legacy document element required by the schema reader while retaining the same XSD root and file context. No actionable merge risk is established.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the fix to the calc XSD encoder example for the new DOM API. It matches the main change in the pull request.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1 files.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@veewee
veewee merged commit 299d3da into php-soap:main Oct 16, 2026
13 checks passed
@veewee
veewee deleted the fix-calc-xsd-encoder-example branch October 16, 2026 08:49
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.

1 participant