Repository navigation
Conversation
…12 and later The optional sequence that starts with <return> referenced the returnTags group, whose element is itself optional, so the content model of actionsRefType was ambiguous. libxml2 2.12 and later reject such schemas with "The content model is not determinist". The sequence now starts with a required <return> element; the sequence itself stays optional, so the accepted documents are unchanged.
Author
|
@magento run all tests |
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
With libxml2 2.12 or later, loading
mergedActionGroupSchema.xsdfails with:actionsRefTypeis a repeated choice of actions, followed by an optional sequence that starts with<xs:group ref="returnTags"/>and repeats the same choice.returnTags(Actions/customActions.xsd) declaresreturnwithminOccurs="0", so after the first choice loop the validator cannot tell whether the next action belongs to the first loop or to the optional sequence with an omittedreturn. libxml2 2.9 accepted this; 2.12 and later reject ambiguous content models (the same class of problem was fixed in magento/magento2#38553 for core schemas).This change makes the sequence start with a required
<xs:element type="returnType" name="return"/>. The sequence itself is stillminOccurs="0", so the set of valid documents is the same: action groups withoutreturn, with onereturnfollowed by more actions, and still at most onereturn.Checked against both libxml2 versions:
returnvalidate.returnvalidate before and after; an action group with tworeturnelements is rejected before and after.vendor/bin/phpunit -c dev/tests/phpunit.xml(unit and verification suites): 460 tests pass.No new test: the existing verification tests already generate action groups that use
return, and the ambiguity is only reported by libxml2 2.12+, so a test would only fail on CI images that ship it.Fixed Issues (if relevant)
Contribution checklist