Called after the actual commit is made. Because of this, it cannot disrupt the commit.
It is mainly used to allow notifications.

@param InputInterface        $input
@param OutputInterface       $output
@param ParameterBagInterface $configuration
179494
public function postCommit(
        InputInterface $input,
        OutputInterface $output,
        ParameterBagInterface $configuration
    ): void {
        // Yes we can send a notification to slack fx?
        // Then we would just add some configuration with slack channel, username etc etc
        // And then require the slack API via composer and do the code here

        // But very simple, we can say Hello World! to the console
        $output->write('Hello World!');
    }
218614
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $configurationPath = $input->getOption('configurationPath');
        $deploymentName = $input->getArgument('deploymentName');
        $deployment = $this->factory->getDeployment($deploymentName, $configurationPath, true, true, $input->getOption('force'));
        $deployment->simulate();

        return $deployment->getStatus();
    }
1095963
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $start = microtime(true);
        $output->writeln('Starting data import');

        $this->migrateData->setOutputInterface($output)->run();

        $output->writeln(sprintf('Import complete in %s', round(microtime(true) - $start, 2)));
    }
5296
protected function execute(Input\InputInterface $input, Output\OutputInterface $output)
    {
        $this->generatorService->process($input->getOption('force'));
        $output->writeln('Completed');
    }
186021
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $dir = $input->getArgument('dir');

        Console::setCustomEnvDirectory($dir);

        $output->writeln('### ENV directory has been set to '.$dir.' ###');
    }
666264
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $remote = $input->getOption('remote');

        $persistence = $this->getPersistence();

        if (null === $remote) {
            $dialog = $this->getHelper('dialog');

            $remote = $dialog->ask($output, 'Please enter a Git remote to clone and pull from and to push to: ');

            if (!$dialog->askConfirmation($output, '<question>'.$remote.' will be cloned into '.$persistence->getDirectoryName().'. Continue? [y] </question>', false)) {
                $output->writeln('Not cloning, cancelled.');

                return;
            }
        }

        $output->writeln('Cloning...');
        $persistence->cloneRepository($remote);

        $output->writeln(sprintf('Init of git repository for remote "%s" in %s successful', $remote, $persistence->getDirectoryName()));
    }
324753
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->startCommand($output);
        $pluginHash = $input->getArgument('hash');
        $plugin = $this
            ->pluginRepository
            ->findOneBy([
                'hash' => $pluginHash,
            ]);

        if (!($plugin instanceof Plugin)) {
            $this->printMessageFail(
                $output,
                'Plugin',
                'Plugin with hash "' . $pluginHash . '" not found'
            );

            return null;
        }

        $plugin->disable();
        $this
            ->pluginObjectManager
            ->flush($plugin);

        $this->printMessage(
            $output,
            'Plugin',
            'Plugin with hash "' . $pluginHash . '" disabled'
        );

        $this->finishCommand($output);
    }
1072702
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->modx->cacheManager->refresh();
        $output->writeln('### Cache has been refreshed(cleared) ###');
    }
642598
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->modx = $this->console->loadMODX();
        $this->modx->cacheManager->refresh();
        $output->writeln('### Cache has been refreshed(cleared) ###');
    }
391571
protected function execute(InputInterface $input, OutputInterface $output)
    {
        parent::execute($input, $output);

        $info = $this
            ->getSession()
            ->getInspector()
            ->getSchemaRelations($this->fetchSchemaOid()
        );
        $this->formatOutput($output, $info);
    }
426264
protected function execute(InputInterface $input, OutputInterface $output): void
    {
        $dumper = new \Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper;
        $config = $dumper->dump(
            new \Edyan\Neuralyzer\Configuration\ConfigDefinition
        );

        $output->writeLn($config);
    }
1025320
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->startCommand($output);
        $plugins = $this
            ->pluginManager
            ->loadPlugins();

        foreach ($plugins as $plugin) {
            $this->printMessage(
                $output,
                'Plugin',
                'Plugin "' . $plugin->getNamespace() . '" installed'
            );
        }

        $this->finishCommand($output);
    }
496129
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $created = $this->scaffold(
            'ajax',
            [
                'CLASSNAME' => $input->getArgument('name'),
            ],
            [
                'ACTION' => $input->getOption('action'),
            ]
        );

        if ($created === true) {
            $output->writeln("<info>{$input->getArgument('name')} was created successfully</info>");
        } else {
            $output->writeln("<error>{$input->getArgument('name')} could not be created</error>");
        }
    }
1128702
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $plugin = $input->getArgument('plugin');

        $pluginExp = explode('/', $plugin);

        $packageDir = config_path().'/'.$pluginExp[0];
        $configFile = $pluginExp[1].'.php';

        if (!file_exists($packageDir)) {
            $publish = true;
        } else {
            $helper = $this->getHelper('question');
            $question = new ConfirmationQuestion(
                "$plugin already has a config script in place, are you sure you want to overwrite it? ",
                false,
                '/^yes|y/i'
            );

            $publish = $helper->ask($input, $output, $question);
        }

        if ($publish) {
            mkdir($packageDir);
            $pluginConfig = app_path().'/../vendor/'.$plugin.'/config.php';
            $publishConfig = $packageDir.'/'.$configFile;

            $file = fopen($pluginConfig, 'r');
            $content = fread($file, filesize($pluginConfig));
            fclose($file);

            $file = fopen($publishConfig, 'w');
            fwrite($file, $content);
            fclose($file);

            $output->writeln("<info>Configuration for $plugin published</info>");
        }
    }
1216702
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->setupConsole($input, $output);
        $this->serve();
    }
342961
protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->cacheService->system()->clear();
        $this->cacheService->user()->clear();
        $output->writeln('Done!');
        return null;
    }
1363883
public function doRun(InputInterface $input, OutputInterface $output)
  {
    $this->input = $input;
    $this->output = $output;
    $this->committedFiles = $this->extractCommittedFiles();
    $this->allFiles = $this->extractTopLevelFiles();
    $this->intersectFiles = array_intersect($this->allFiles, $this->committedFiles);
    if ($this->getConfiguration()->execute()) {
      $this->parseFiles();
    }
    else {
      $this->destroy();
    }
  }