backports murph-skeleton

This commit is contained in:
Simon Vieille 2021-05-30 17:57:56 +02:00
parent 7376bbaeb6
commit 2b8004eb54
4 changed files with 5 additions and 3 deletions

View file

@ -11,6 +11,7 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface; use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\HttpClient\Exception\ClientException; use Symfony\Component\HttpClient\Exception\ClientException;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\HttpClient\Exception\TransportException;
/** /**
* class SymfonyCacheManager. * class SymfonyCacheManager.
@ -49,6 +50,7 @@ class SymfonyCacheManager
// Hack: used to regenerate cache of url generator // Hack: used to regenerate cache of url generator
$this->httpClient->request('POST', $pingUrl); $this->httpClient->request('POST', $pingUrl);
} catch (ClientException $e) { } catch (ClientException $e) {
} catch (TransportException $e) {
} }
} }

View file

@ -24,7 +24,7 @@ class TaskInitEvent extends Event
return $this->tasks; return $this->tasks;
} }
public function addTask(string $task, string $label, string $section): self public function addTask(string $task, string $section, string $label): self
{ {
$this->tasks[$task] = [ $this->tasks[$task] = [
'label' => $label, 'label' => $label,

View file

@ -22,7 +22,7 @@ class CacheCleanTaskEventSubscriber extends TaskEventSubscriber
public function onInit(TaskInitEvent $event) public function onInit(TaskInitEvent $event)
{ {
$event->addTask('cache:clear', 'Clean all cache', '♻️ Cache'); $event->addTask('cache:clear', '♻️ Cache', 'Clean all cache');
} }
public function onRunRequest(TaskRunRequestedEvent $event) public function onRunRequest(TaskRunRequestedEvent $event)

View file

@ -42,7 +42,7 @@ class BlockExtension extends AbstractExtension
} catch (\Exception $e) { } catch (\Exception $e) {
} }
$content = str_replace($match[0], $url, $content); $content = str_replace($block[0], $url, $content);
} }
return $content; return $content;