π ADULT: WordPress/gutenberg/pull/ - Collection
{{ message }}
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.
Summary
Implements a hierarchical block validation system as proposed in #21703, replacing the binary valid/invalid approach with a 6-level hierarchy that provides better context for validation outcomes and data preservation.
This PR introduces a more nuanced validation system that classifies block validation results into 6 hierarchical levels, from most valid (Level 0) to least valid (Level 5). Each level represents a different degree of confidence in the block's integrity and the potential for data loss.
Validation Type Hierarchy
Changes Made
Core Validation System
validateBlock(): Now returns[isValid, validationIssues, validationType]tupleclassifyValidationResult()function__unstableWasMigratedflag for tracking deprecationsParser Integration
applyBlockValidation(): Handles and propagates new validation typesPublic API
VALIDATION_RESULT_TYPEenum with comprehensive documentationgetValidationTypeLevel()andcompareValidationTypes()helpersBenefits
Testing
Test plan
Backward Compatibility
All existing validation APIs continue to work unchanged. The new validation type is returned as an additional third element in the
validateBlock()result tuple, which existing code can safely ignore.Addresses #21703
π€ Generated with Claude Code