• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wol-soft / php-json-schema-model-generator / 30223249113
99%

Build:
DEFAULT BRANCH: master
Ran 27 Jul 2026 01:52AM UTC
Jobs 1
Files 175
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

26 Jul 2026 10:29PM UTC coverage: 98.746%. Remained the same
30223249113

push

github

web-flow
Fix silently unvalidated compositions nested inside property-level composition branches (#177)

* Fix silently unvalidated compositions nested inside property-level composition branches

AbstractCompositionValidatorFactory::getCompositionProperties() and IfValidatorFactory::modify()
unconditionally stripped a branch's own composed/conditional validator (allOf/anyOf/oneOf/not,
if/then/else), assuming a generated nested class always re-validates it. That only holds when the
branch resolves to an explicit object schema; a branch that is itself a bare composition (e.g.
"allOf": [{"anyOf": [...]}]) has no such class, so the strip deleted the only validator that would
ever check it, silently accepting any value.

Make the strip conditional on the branch having a nested schema, and widen it from
ComposedPropertyValidator to the shared AbstractComposedPropertyValidator base so if/then/else
branches follow the same rule (previously never stripped, even when redundant).

* Mark provably-unreachable nested-schema branch as coverage-exempt

The $nestedSchema !== null strip in getCompositionProperties() can never fire: nestedSchema is
only set for a branch whose own schema declares "type": "object", and for any such branch
shouldSkip() already blocks every composition-keyword factory from attaching a validator to it in
the first place (the object's composition is processed inside its own generated class instead).
Document the invariant and exempt the line, matching the existing @codeCoverageIgnore precedent in
ConditionalPropertyValidator::getIfBranch().

* Remove unreachable coverage guard, move tests into issue structure

- src/.../AbstractCompositionValidatorFactory.php: the $nestedSchema !== null strip added for
  issue #167 was provably unreachable (any branch with a nested schema is already blocked by
  shouldSkip() from ever carrying its own composed/conditional validator), so drop the dead
  conditional instead of coverage-ignoring it; the validator is now... (continued)

1 of 1 new or added line in 1 file covered. (100.0%)

7086 of 7176 relevant lines covered (98.75%)

562.51 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Unit - 30223249113.1 27 Jul 2026 01:52AM UTC 175
98.75
GitHub Action Run
Source Files on build 30223249113
  • Tree
  • List 175
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30223249113
  • 595bcead on github
  • Prev Build on master (#30142349027)
  • Next Build on master (#30326899778)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc