public function isCommandAvailable(Command $command): bool
    {
        if (!$this->isFullyCapable()
            && in_array($command->getName(), [
                // Although these commands are technically available
                // they call other hidden commands in sub processes
                // that need all capabilities. Therefore we disable these commands here.
                // This can be removed, once they implement Symfony commands directly.
                'upgrade:all',
                'upgrade:list',
                'upgrade:wizard',
            ], true)
        ) {
            return false;
        }
        if ($command->getName() === 'cache:flushcomplete') {
            return true;
        }

        return $this->runLevel->isCommandAvailable($command->getName());
    }