Skip to main content

Module pest_plugin

Module pest_plugin 

Source
Expand description

Emulation of the pestphp/pest-plugin Composer plugin (docs/reference/plugins/pest-plugin/, MIT): on post-autoload-dump its DumpCommand writes vendor/pest-plugins.jsonjson_encode(..., JSON_PRETTY_PRINT) of the array_merge of every installed package’s extra.pest.plugins list, in the local repository’s order (getCanonicalPackages(): aliases excluded), the root package last. Identical from v1.0.0 to v5.0.0 (the four versions the corpus holds).

The local repository’s order is the caller’s business. Composer’s own is not reproducible: on a fresh install LibraryInstaller::install adds a package to the repository when its extraction promise resolves, so the list follows the completion order of parallel unzips (the corpus shows the small pest-plugin-laravel before pest every time, by size). vivacity writes the operation order — the previous installed.json entries minus the removed and updated ones, then the (re)installed ones — which local_repository_order builds; the harnesses compare the file sorted, like include_paths.php.

Constants§

CACHE_FILE
PLUGIN_NAME

Functions§

local_repository_order
The order of InstalledRepository::getCanonicalPackages() after a transaction: the packages already installed keep installed.json’s order (minus the removed and the updated ones), the installed and updated ones follow in operation order.
remove_pest_plugins
Manager::uninstall: the cache file goes with the plugin.
write_pest_plugins
DumpCommand::execute: packages are the installed packages’ extra values in local-repository order, root_extra the root manifest’s.