BootReport
in package
Self-check of the packages registered in this WordPress request.
Collected after autoload and boot, it answers per package: did the autoloader resolve it (and from where), did its kernel boot, which version is it, and what did its own checks find. Report-level issues come on top: a package the caller expected that never registered (a plugin that failed to load cannot declare itself, so absence is the strongest signal of all), an invalid registration, or no package at all.
Scope: the built-in checks prove boot, not render. Unless at least one CheckScope::Render check ran, coversRender() is false and the rendered report says so, so a green report is never read as "the interface works".
Table of Contents
Constants
- EXIT_BROKEN : int = 1
- EXIT_HEALTHY : int = 0
Properties
Methods
- __construct() : mixed
- collect() : self
- Inspect every probe and compare the registered names with the expected ones.
- coversRender() : bool
- Whether at least one render check ran; when false the report proves boot only.
- exitCode() : int
- Process exit code for a health gate: non-zero when broken, and also on warnings when strict.
- status() : CheckStatus
- Worst status across packages; any report-level issue is a failure.
-
toArray()
: array{status: string, covers: list
, issues: list , packages: list >} - issuesFor() : array<int, string>
Constants
EXIT_BROKEN
public
int
EXIT_BROKEN
= 1
EXIT_HEALTHY
public
int
EXIT_HEALTHY
= 0
Properties
$issues
public
array<string|int, mixed>
$issues
= []
$packages
public
array<string|int, mixed>
$packages
Methods
__construct()
public
__construct(array<int, PackageReport> $packages[, array<int, string> $issues = [] ]) : mixed
Parameters
- $packages : array<int, PackageReport>
- $issues : array<int, string> = []
-
report-level problems, each one a failure
collect()
Inspect every probe and compare the registered names with the expected ones.
public
static collect(array<int, PackageProbe> $probes[, array<int, string> $expected = [] ][, int $invalid = 0 ]) : self
Parameters
- $probes : array<int, PackageProbe>
- $expected : array<int, string> = []
-
package names that must be registered
- $invalid : int = 0
-
registrations that were not a PackageProbe
Return values
selfcoversRender()
Whether at least one render check ran; when false the report proves boot only.
public
coversRender() : bool
Return values
boolexitCode()
Process exit code for a health gate: non-zero when broken, and also on warnings when strict.
public
exitCode([bool $strict = false ]) : int
Parameters
- $strict : bool = false
Return values
intstatus()
Worst status across packages; any report-level issue is a failure.
public
status() : CheckStatus
Return values
CheckStatustoArray()
public
toArray() : array{status: string, covers: list, issues: list, packages: list>}
Return values
array{status: string, covers: listissuesFor()
private
static issuesFor(array<int, PackageProbe> $probes, array<int, string> $expected, int $invalid) : array<int, string>
Parameters
- $probes : array<int, PackageProbe>
- $expected : array<int, string>
- $invalid : int