ArgvInput -> Command::execute() arguments * legacy shim entrypoint <-> cli/cacti.php entrypoint (parity) * shell metacharacters in --oldrrd -> rejection before any file is touched * Command::SUCCESS / Command::FAILURE -> subprocess exit code * parent env CACTI_PHP_TESTING -> CactiCommand::initialize() bootstrap skip * * The in-process cases use Symfony's CommandTester. The cross-process cases * reuse the runCli helper from CliInvocationTest so the bootstrap chain * (cli_check.php -> autoload.php -> CactiApplication) is a real subprocess * and not a mocked include graph. */ use Symfony\Component\Console\Application; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Tester\CommandTester; if (!file_exists(dirname(__DIR__, 2) . '/lib/CactiCommand.php')) { test('CLI invocation hand-off: feature not present on this branch', function () {}) ->skip('lib/CactiCommand.php absent — feature PR #7075 not merged into develop yet'); return; } const CLI_HANDOFF_REPO_ROOT = __DIR__ . '/../..'; require_once dirname(__DIR__, 1) . '/Helpers/CactiStubs.php'; require_once dirname(__DIR__, 2) . '/lib/CactiCommand.php'; require_once dirname(__DIR__, 2) . '/lib/CmdRealtimeCommand.php'; require_once dirname(__DIR__, 2) . '/lib/SpliceRrdCommand.php'; /** * Spawn a fresh PHP process for `php