You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Report attribute refs to a no-namespace schema as unqualified - #67
Follow-up to #66, from the CodeRabbit comment there. #66 reported every attribute declared through ref as qualified. A global attribute lives in the target namespace of the schema that declares it, and when that schema has no targetNamespace the attribute has no namespace at all, so it is unqualified.
A ref is now qualified only when the schema of the referenced attribute has a target namespace. Local attributes keep following form and attributeFormDefault.
A chameleon include, a schema without targetNamespace included into one that has one, still comes back qualified. xsd-reader merges the included declarations into the including schema, so they take its namespace, which is what the spec asks for.
One xsd-reader quirk stays out of scope. It treats an xsd:import without a namespace attribute like a chameleon include and merges the imported declarations into the importing schema's namespace. This fix reports whatever namespace xsd-reader assigns.
Summary by CodeRabbit
Bug Fixes
Corrected how referenced global attributes are identified as qualified. Attributes in schemas without a target namespace are now recognized as unqualified, while attributes in schemas with a target namespace remain qualified.
Local attributes continue to follow their existing qualification settings, preserving their established behavior.
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
Attribute references are now qualified based on the referenced attribute’s schema target namespace. A regression test checks the result for a referenced global attribute in a schema without a target namespace.
Changes: Attribute qualification
Layer / File(s)
Summary
Qualification rule and regression test src/Metadata/Converter/Types/Configurator/AttributeSingleConfigurator.php, tests/Unit/Metadata/Coverter/Types/Configurator/AttributeQualificationTest.php
Referenced attributes are qualified only when their schema has a non-empty target namespace. Local attributes continue to use isQualified(). The test checks that a referenced global attribute in a schema without a target namespace is not qualified.
The qualification change has no identified issue requiring correction before merge.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main bugfix: attribute references to schemas without a target namespace are reported as unqualified.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Fix all pre-merge checks with AI
✨ 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #66, from the CodeRabbit comment there. #66 reported every attribute declared through
refas qualified. A global attribute lives in the target namespace of the schema that declares it, and when that schema has notargetNamespacethe attribute has no namespace at all, so it is unqualified.A ref is now qualified only when the schema of the referenced attribute has a target namespace. Local attributes keep following
formandattributeFormDefault.A chameleon include, a schema without
targetNamespaceincluded into one that has one, still comes back qualified. xsd-reader merges the included declarations into the including schema, so they take its namespace, which is what the spec asks for.One xsd-reader quirk stays out of scope. It treats an
xsd:importwithout anamespaceattribute like a chameleon include and merges the imported declarations into the importing schema's namespace. This fix reports whatever namespace xsd-reader assigns.Summary by CodeRabbit