symfony

PipelineWebhookEventResource.php


$event = new PipelineEvent($data, $project);
$this->eventDispatcher->dispatch($event, 'webhook');
$this->eventDispatcher->dispatch($event, 'webhook.' . $event->type());
$this->eventDispatcher->dispatch($event, 'webhook.' . $event->type() . '.' . $event->status());
01.04.2025 | Marc Hitscherich, Dominik Wille

Dispatch multiple pipeline events based on more specific contexts

ComponentPluginManager.php
    // Check if the component plugin instance was already created.
    if (isset($this->componentPluginCacheEntries[$machine_name])) {
      return $this->componentPluginCacheEntries[$machine_name];
    }

    $definitions = $this->getDefinitions();
    if (empty($definitions)) {
      throw new ComponentNotFoundException('Unable to find any component definition.');
    }
    $instance = $this->createInstance(
      $this->componentNegotiator->negotiate($machine_name, $definitions)
    );

    // Cache the component plugin instance.
    $this->componentPluginCacheEntries[$machine_name] = $instance;
27.01.2023 | Dominik Wille, Peter Gerken, Pascal Crott

How to static cache in symfony services