Problem/motivation
Schema discovery can't recognize schema defintion with more than one wild card selection. For example:
breakpoint.breakpoint.module.toolbar.* works but not breakpoint.breakpoint.*.*.*
which is blocking #1912308-26: Create configuration schemas for breakpoint module
Proposed solution
Updte SchemaDiscovery::getFallbackName() to check for fallback recursively.
Comment | File | Size | Author |
---|---|---|---|
#12 | 1940440-schema-wild-card-12.patch | 5.26 KB | vijaycs85 |
#12 | 1940440-diff-10-12.txt | 1.45 KB | vijaycs85 |
#10 | 1940440-schema-wild-card-10.patch | 5.22 KB | vijaycs85 |
#10 | 1940440-diff-8-10.txt | 1.26 KB | vijaycs85 |
#8 | 1940440-schema-wild-card-8-testonly.patch | 3.6 KB | vijaycs85 |
Comments
Comment #1
vijaycs85Here is the patch to solve this issue.
Comment #2
vijaycs85Updating method doc-comment to reflect changes...
Comment #3
vijaycs85Please ignore patch in #2. here is the right patch for the comments in #2
Comment #4
vijaycs85Just had a word with @alexpott and adding tag as advised...
Comment #5
vijaycs85Adding tests and comments...
Comment #6
Gábor HojtsyWhy do you think it is important to have two separate files with same formatted keys and similar schema? Sounds like one would be fine to test this. Also testid and testdescription in the keys can just loose the test prefix I think, becoming id and description.
Comment #7
Gábor HojtsyAlso putting on sprint for D8MI.
Comment #8
vijaycs85Thanks for the review @Gábor Hojtsy. Updated key names. The reason for two files is that we want to prove that it works for multiple files with same format. But my test wasn't right. Updated test with proper file name to test this.
Comment #9
Gábor HojtsyHow come can/would you remove the isset()? It is still possible that a name would not be found, right? How does this not caught by tests (we do have tests for keys without schema). What do I misunderstand?
Same expectation as above, so you can remove all these lines and just use $expected like already set up above?
Comment #10
vijaycs85isset() has been moved to getFallbackNmae() to check recursively.
Removed the assert test copy.
Comment #11
Gábor HojtsyThanks for the insight. Now only two comments :)
Document it would return null if no matching element found IMHO.
Change comment to this IMHO:
// The other file should have the same schema.
Comment #12
vijaycs85Updated...
Comment #13
Gábor HojtsyLooks good to me. Thanks for the great tests.
Comment #14
Dries CreditAttribution: Dries commentedCommitted to 8.x. Thanks!
Comment #15
Gábor HojtsySuperb, thanks!
Comment #16.0
(not verified) CreditAttribution: commentedUpdating summary with blocked defect details...