Skip to content
docsv0.24.0

PackageArtifactsHandler

`package:artifacts` — lists the classes, interfaces, and enums one installed package declares through its own autoload roots, so «what does milpa/data ship» is a question with an answer instead of a guess. The package directory resolves via `vendor/<package>/composer.json` and its `autoload.psr-4` roots — the package's own declaration of what it autoloads, present for every Composer install, optimized or not. Files are inventoried through the token scanner: nothing is required or executed by asking what a package contains. Not found is `ok:false` with a reason, never an exception (same contract as {@see ValidateHandler}).

PackageArtifactsHandler::__construct()

public function __construct(Milpa\DevTools\Support\RootResolver $roots = new RootResolver()):

Parameters

Parameters of __construct()
NameTypeDescription
$rootsMilpa\DevTools\Support\RootResolver

PackageArtifactsHandler::handle()

public function handle(array $input): array

Lists the artifacts the package's PSR-4 autoload roots declare, in the same row shape `contract:search` answers with.

Parameters

Parameters of handle()
NameTypeDescription
$inputarray<string, mixed>