Skip to content
docsv0.44.3

StubsPublishHandler

`stubs:publish` — copy the package's stubs into the app's `stubs/`, where `make` reads them first. A copy already in the app is KEPT unless `force` says otherwise: the whole point of publishing is to edit the copy, and a second publish must not undo the edit. `only` narrows the copy to named stubs; a name the package does not ship is refused, not silently skipped.

StubsPublishHandler::__construct()

public function __construct(Milpa\DevTools\Support\RootResolver $roots = new RootResolver(), Milpa\DevTools\Make\StubLocator $locator = new StubLocator()):

Parameters

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

StubsPublishHandler::handle()

public function handle(array $input): array

Copies the named (or every) stub into `<root>/stubs/`, keeping copies already there unless `force`.

Parameters

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