refactor: consolidate CLIApp + CliBase into CliFramework #234
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Three overlapping base classes exist for CLI tools:
Both CliBase and CLIApp duplicate features already in CliFramework: progress bars, banners, colored output, argument parsing.
Impact
Proposal
Acceptance Criteria
Branch created:
feature/234-refactor-consolidate-cliapp-clibase-intoPartial progress:
CliBase migration complete:
fix/scripts migrated from CliBase → CliFrameworkCLIApp still used by:
deploy/deploy-sftp.php(578 lines)cli/deploy_joomla.php(1130 lines)These are complex deployment scripts — migrating them requires careful testing. Leaving this issue open for the remaining CLIApp → CliFramework migration.
CliFramework enhancements added:
confirm()method (was in CLIApp/CliBase but missing from CliFramework)input(),select(),table()interactive methodsjsonOutput()standard JSON envelopeEXIT_*constantsConsolidation complete.
Changes:
deploy/deploy-sftp.php— migrated from CLIApp → CliFramework (getOption→getArgument, log order fix)cli/deploy_joomla.php— migrated from CLIApp → CliFramework (same pattern)fix/fix_*.php— 4 scripts already migrated in previous committests/test_enterprise_libraries.php— updated to use CliFrameworklib/Enterprise/CliFramework.php— removed 673-line CLIApp body, replaced with 40-line compatibility shimNo scripts depend on CLIApp directly anymore. The shim exists only for backward compatibility with client repos that may still reference it.
CliBase status: Zero consumers in codebase (only template reference). Can be deleted when ready.
27 tests pass, 44 assertions.