/** * @param ScrapeResponseEvent $event */ public function onScrapeUrlNotOk(ScrapeResponseEvent $event) { $response = $event->getResponse(); $code = $response->getStatusCode(); $text = (new Response($code))->getReasonPhrase(); $this->logger->debug(sprintf('Server replied with response %d (%s)', $code, $text)); }
/** * @param ScrapeResponseEvent $event */ public function onScrapeUrlNotOk(ScrapeResponseEvent $event) { $response = $event->getResponse(); $code = $response->getStatusCode(); $text = (new Response($code))->getReasonPhrase(); $this->output->writeln(sprintf('Server replied with response <info>%d (%s)</info>', $code, $text)); }