You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Complete the Taxonomy CLI adapter convergence by removing direct concrete ability construction from TaxonomyCommand and executing the already registered WordPress abilities through the existing CLI AbilityRunner.
Update inc/Cli/Commands/TaxonomyCommand.php to execute:
datamachine/get-taxonomy-terms
datamachine/create-taxonomy-term
datamachine/update-taxonomy-term
datamachine/delete-taxonomy-term
datamachine/resolve-term
The list command already establishes the AbilityRunner pattern. Remove the five concrete Taxonomy ability imports. Do not modify ability implementations.
Contract preservation
Preserve exactly:
command names and aliases
positional arguments, options, defaults, casts, and optional-field inclusion
all preflight validation messages
delete confirmation timing and --yes
JSON, table, CSV, and YAML behavior where supported
success, warning, log, and error text
pagination behavior
WP_CLI::error() exit behavior
create success-message ordering before optional JSON
resolve Created versus Resolved presentation
Do not move parsing or presentation into abilities. AbilityRunner may normalize native WP_Error into the existing CLI failure-array path, but public output must not leak diagnostic metadata.
Tests
Extend AllAbilitiesRegisteredTest with all five Taxonomy slugs.
Add focused Taxonomy CLI coverage for list defaults/output, create success/failure, update, delete confirmation and --yes, resolve existing/create behavior, and native error normalization.
Continue running TaxonomyAbilityWpErrorTest.
Constraints
No helper, wrapper, resolver, framework, DSL, or compatibility infrastructure.
No ability implementation changes.
No command or output contract changes.
Use existing AbilityRunner; do not duplicate raw registry plumbing.
Goal
Complete the Taxonomy CLI adapter convergence by removing direct concrete ability construction from
TaxonomyCommandand executing the already registered WordPress abilities through the existing CLIAbilityRunner.Refs #3332. Parent: #3113.
Scope
Update
inc/Cli/Commands/TaxonomyCommand.phpto execute:datamachine/get-taxonomy-termsdatamachine/create-taxonomy-termdatamachine/update-taxonomy-termdatamachine/delete-taxonomy-termdatamachine/resolve-termThe list command already establishes the
AbilityRunnerpattern. Remove the five concrete Taxonomy ability imports. Do not modify ability implementations.Contract preservation
Preserve exactly:
--yesWP_CLI::error()exit behaviorCreatedversusResolvedpresentationDo not move parsing or presentation into abilities.
AbilityRunnermay normalize nativeWP_Errorinto the existing CLI failure-array path, but public output must not leak diagnostic metadata.Tests
AllAbilitiesRegisteredTestwith all five Taxonomy slugs.--yes, resolve existing/create behavior, and native error normalization.TaxonomyAbilityWpErrorTest.Constraints
AbilityRunner; do not duplicate raw registry plumbing.CHANGELOG.mdor version strings.refactor:commit.Expected production delta: approximately -5 PHP LOC.