Search by

mwx / tools-wp

metaworx

Typed wp-cli command wrapper: commands, sub-commands, arguments and parameters as PHP objects and enums

0.2.0 2026-09-24 10:29 UTC

This package is auto-updated.

Last update: 2026-10-01 00:04:17 UTC


README

Typed wp-cli command wrapper: wp commands, sub-commands, arguments and parameters modelled as PHP classes and enums. Owns the mwx\Tools\Wp\ namespace prefix.

Contents

NamespaceWhat it holds
mwx\Tools\Wp\Wp entry point, WpInterface
...\Wp\SubCommand\Typed sub-commands for core, plugin, theme and language operations
...\Wp\Arguments\, ...\Wp\Parameters\Argument/parameter traits composing the commands
...\Wp\Enums\Command/parameter enums

Dependencies

Only mwx/lib (enum framework and magic accessors) — no symfony, no process library; execution is delegated to the consuming application.

Known coupling (pre-1.0): several classes still reference the consuming application's ComponentEnum (whose case values are application Info classes). The planned fix is a package-owned component enum with the Info-class mapping inverted into the application; until then this package is only usable from applications that provide metaworx\GetSite\Extensions\Wp\Command\Helper\ComponentEnum.

Install

composer require mwx/tools-wp

MIT license.