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

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

Build:
DEFAULT BRANCH: master
Ran 16 Jul 2026 01:18AM 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

16 Jul 2026 01:16AM UTC coverage: 98.79% (+0.002%) from 98.788%
29463715140

push

github

web-flow
Improve $ref resolution error messages (#164)

* Improve $ref resolution error messages

Distinguish an unresolvable ref (no matching local file, not a URL) from a
resolved path/URL whose content could not be fetched, and surface the
underlying PHP warning (e.g. the HTTP status line on a 404) instead of a
generic "non existing" message in both cases.

Also fixes an existing-but-empty referenced file being misreported as
"non existing" instead of falling through to the "Invalid JSON-Schema file"
check.

* Add test coverage for the "failed to read" local $ref error message

Uses a Unix domain socket to deterministically trigger file_exists()
succeeding while file_get_contents() fails, exercising the read-failure
branch added in the previous commit.

* Make the unreadable-local-ref test's message assertion cross-platform

The C library's ENXIO message text differs between Linux and BSD/macOS,
so only the PHP-authored "Failed to open stream:" prefix is asserted
verbatim; the OS-specific reason is matched loosely. The Windows skip
path (no "unix://" transport support) was verified separately.

* Make the unreadable-local-ref test run (not just skip) on every platform

Replace the Unix-domain-socket approach with a namespaced file_get_contents()
override for PHPModelGenerator\SchemaProvider (tests/Fixtures/file_get_contents_override.php,
loaded once from bootstrap.php) that a test can arm via FileGetContentsFailureSimulator to
fail for one specific, otherwise-readable path. It's a transparent passthrough everywhere
else, so it has no effect on the rest of the suite (verified: full suite still 2863 tests,
0 failures).

This actually exercises the "resolved but unreadable" branch on Windows and macOS too,
rather than skipping there: sockets have no Windows equivalent, a directory ref returns ""
(not false) from file_get_contents() on Linux instead of failing, and permission bits are
bypassed when tests run as root.

* Revert "Make the unreadable-local-ref tes... (continued)

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

7022 of 7108 relevant lines covered (98.79%)

552.52 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Unit - 29463715140.1 16 Jul 2026 01:18AM UTC 175
98.79
GitHub Action Run
Source Files on build 29463715140
  • Tree
  • List 175
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #29463715140
  • 343d72be on github
  • Prev Build on master (#29452850938)
  • Next Build on master (#29661031835)
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