Repository navigation
Conversation
A WSDL can hold several inline schemas in its types section where one schema refers to an element or type of another without importing that namespace. ext-soap treats all inline schemas as one pool and accepts this. xsd-reader only resolves references through imports, so reading such a WSDL failed with "Can't find element named {namespace}#Name".
SchemaParser now adds the missing namespace-only imports between the inline schemas before handing them to xsd-reader. It leaves existing imports alone.
In phpro/soap-client#614 the provider's own schema refers to ns1:Vehicle without importing its namespace. The FlatteningLoader copies that schema as is, which is why flattening did not help.
Fixes phpro/soap-client#614
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe parser adds missing XSD imports between inline schemas with distinct target namespaces. A PHPT test checks the generated method and types for schemas that reference each other without explicit imports. ChangesInline schema imports
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to This change is intended to let client generation resolve references between inline schemas. The pinned reader accepts the investigated import ordering, and no supported merge-blocking risk remains; the PR is ready subject to normal checks. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change broadens visibility between schemas already supplied in the same WSDL without adding external schema locations. No introduced security vulnerability was established, but mutation isolation and resource growth for unusually large schema collections remain incompletely assessed. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Closing this in favour of goetas-webservices/xsd-reader#95. Adding imports to the inline schemas was the wrong place to fix this. It makes every inline schema import every other one, which bloats the schema graph for WSDLs that were already fine: gordic.cz.wsdl, with 150 inline schemas, hit Xdebug's nesting limit, and 11 other WSDLs came out with their types in a different order. The cause is in xsd-reader. Since goetas-webservices/xsd-reader#53 it resolves type references across sibling schemas without an import, but element, group, attribute and attributeGroup references never got that fallback. The xsd-reader PR makes all of those lookups consistent. Across the 122 WSDLs I compared, the WSDL from phpro/soap-client#614 is the only one whose output changes. |
A WSDL can hold several inline schemas in its types section where one schema refers to an element or type of another without importing that namespace. ext-soap treats all inline schemas as one pool and accepts this. xsd-reader only resolves references through imports, so reading such a WSDL failed with "Can't find element named {namespace}#Name".
SchemaParser now adds the missing namespace-only imports between the inline schemas before handing them to xsd-reader. It leaves existing imports alone.
In phpro/soap-client#614 the provider's own schema refers to ns1:Vehicle without importing its namespace. The FlatteningLoader copies that schema as is, which is why flattening did not help.
Fixes phpro/soap-client#614
Summary by CodeRabbit