Skip to content

release: 1.5.0 (framework ^1.7)#25

Merged
michaelmeneses merged 4 commits into
mainfrom
develop
Jul 9, 2026
Merged

release: 1.5.0 (framework ^1.7)#25
michaelmeneses merged 4 commits into
mainfrom
develop

Conversation

@michaelmeneses

Copy link
Copy Markdown
Contributor

Bump middag-io/framework floor to ^1.7 and cut minor release 1.5.0.

Includes since 1.4.0:

  • refactor(logging)!: relocate error_log fallback to framework
  • test(coverage): push wordpress toward higher method/line coverage
  • fix(tests): make AuthMiddlewareTest and WpMaintenanceGateTest host-independent
  • chore(deps): require middag-io/framework ^1.7

Release-As: 1.5.0 forces the minor bump (overrides the breaking-change major default).

michaelmeneses and others added 4 commits July 9, 2026 05:19
…dependent

AuthMiddlewareTest depended on the calling shell's OPENSSL_CONF for
openssl_pkey_new/export, which fails on hosts with a broken or missing
config and has no portable fallback. Generate a minimal self-contained
config per test run instead.

WpMaintenanceGateTest wrote to a shared fixed path (/tmp/wordpress/),
which breaks with permission denied when that path is owned by a
different uid on the host. Use a per-process temp dir keyed by pid.
Lines 91.40%->94.29%, methods 75.21%->82.34%, classes 50.65%->61.04%.

Real behavior gaps closed: WpdbConnectionAdapter (query/update wpdb
failure -> exception, named-param-with-no-token passthrough),
PostMetaRepository/UserMeta-adjacent Router (unmatched-pattern ->
null), AuthMiddleware (setIssuer, session-absent null path, bare
env-var fallback, missing-sub-claim rejection, refresh-token branches,
generateRefreshToken's own missing-key guard via reflection),
FieldRenderer (Textarea control), FieldType (CheckboxList sanitizer's
array branch), SettingsRegistrar::all(), SettingsPageRegistrar (the
recorded field/section callbacks actually invoked, mirroring how
WordPress calls them at render time), HookRegistrar (non-.php skip,
fixture file), WpUploadsFilesystem (mkdir failure, warning silenced
the same way RotatingStreamHandler's `silenced()` does), HttpClient
(non-CurlHandle handed to the http_api_curl action), and InertiaAdapter
(isPartialReload()/getPartialData(), driven directly via reflection
since their only caller, sendJson(), exits).

Left deliberately alone (each already documented as an accepted gap in
the class's own docblock/test, not a silent oversight):
- InertiaAdapter::sendJson()/location() and CsrfGuard::reject(): exit
  the process, "intentionally left to the untested exit path" per
  InertiaAdapterCoverageTest's docblock.
- WpMaintenanceGate's wp_is_maintenance_mode()/ABSPATH branches:
  WpMaintenanceGateTest documents `wp_is_maintenance_mode()` as
  deliberately unstubbed.
- The ~25 Support/* `function_exists('wp_*')` guards, plus similar
  guards in HttpClient/WpHookfileLoader: every one of those WP
  functions IS stubbed in tests/stubs/wp-stubs.php (loaded once for the
  whole run), so the "function absent" branch is unreachable within a
  single PHPUnit process without shadowing an already-defined global
  function — not a pattern used anywhere in this suite.
- PostMetaRepository/UserMeta's non-array-meta guards: get_post_meta()/
  get_user_meta() always return an array from the stub.
- AuthMiddleware::isAuthenticated()'s unauthenticated-but-no-error
  branch: only reachable if get_user_by() disagrees with itself between
  two calls in the same request — a should-never-happen race, not a
  normal code path.
Remove PhpErrorLogLogger (the zero-dep PSR-3 error_log fallback) and its
test; the canonical implementation now lives in middag-io/framework as
ErrorLogFallbackLogger. Repoint the LogSupport @see reference to it and drop
the now-stale src/Logging/ row from the structure table.

BREAKING CHANGE: Middag\WordPress\Logging\PhpErrorLogLogger is removed. Use
Middag\Framework\Logging\ErrorLogFallbackLogger instead (identical behaviour
and constructor signature).
@michaelmeneses michaelmeneses merged commit 358dd7c into main Jul 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant