/**
  * @param \Symfony\Component\Console\Output\OutputInterface $output
  * @param \Symfony\Component\Console\Output\OutputInterface $output
  *
  * @return \DrupalPatchUtils\DoBrowser
  * @throws \Exception
  */
 protected function login(InputInterface $input, OutputInterface $output)
 {
     $browser = new DoBrowser();
     if (!$browser->loggedIn()) {
         $browser->login($this->getConfig()->getDrupalUser(), $this->ask($input, $output, new Question("Enter your Drupal.org password: "******"Enter tfa code (if activated for account): "), TRUE));
     }
     return $browser;
 }
 protected function deleteComment($delete_link, DoBrowser $browser, OutputInterface $output)
 {
     $output->writeln('Deleting ' . $delete_link);
     $crawler = $browser->getClient()->request('GET', DoBrowser::DO_URL . $delete_link);
     $form = $crawler->selectButton('Delete')->form();
     $browser->submitForm($form);
 }
Beispiel #3
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $browser = new DoBrowser();
     $browser->logout();
     $output->writeln('User logged out.');
 }