Commit c9392293 authored by Frédéric G. Marand's avatar Frédéric G. Marand Committed by Greg Knaddison
Browse files

Issue #3289828 by Project Update Bot, fgm, balintpekker, nkoporec, RobLoach,...

Issue #3289828 by Project Update Bot, fgm, balintpekker, nkoporec, RobLoach, mglaman, smustgrave: Automated Drupal 10 compatibility fixes
parent c862fe3f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ class StageFileProxyCommands extends DrushCommands {
   *
   * @var \Psr\Log\LoggerInterface
   */
  protected $logger;
  protected $logger = NULL;

  /**
   * The module config.
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@

namespace Drupal\stage_file_proxy\EventDispatcher;

use Symfony\Component\EventDispatcher\Event;
use Symfony\Contracts\EventDispatcher\Event;

/**
 * Class AlterExcludedPathsEvent.
+4 −4
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

namespace Drupal\stage_file_proxy\EventSubscriber;

use Symfony\Component\HttpKernel\Event\RequestEvent;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\StreamWrapper\StreamWrapperManager;
@@ -12,7 +13,6 @@ use Psr\Log\LoggerInterface;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;

/**
@@ -80,10 +80,10 @@ class ProxySubscriber implements EventSubscriberInterface {
  /**
   * Fetch the file from it's origin.
   *
   * @param \Symfony\Component\HttpKernel\Event\GetResponseEvent $event
   * @param \Symfony\Component\HttpKernel\Event\RequestEvent $event
   *   The event to process.
   */
  public function checkFileOrigin(GetResponseEvent $event) {
  public function checkFileOrigin(RequestEvent $event) {
    $config = $this->configFactory->get('stage_file_proxy.settings');

    // Get the origin server.
@@ -119,7 +119,7 @@ class ProxySubscriber implements EventSubscriberInterface {
    }

    $alter_excluded_paths_event = new AlterExcludedPathsEvent([]);
    $this->eventDispatcher->dispatch('stage_file_proxy.alter_excluded_paths', $alter_excluded_paths_event);
    $this->eventDispatcher->dispatch($alter_excluded_paths_event, 'stage_file_proxy.alter_excluded_paths');
    $excluded_paths = $alter_excluded_paths_event->getExcludedPaths();
    foreach ($excluded_paths as $excluded_path) {
      if (strpos($request_path, $excluded_path) !== FALSE) {
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ class SettingsForm extends ConfigFormBase {
  public static function create(ContainerInterface $container) {
    return new static(
      $container->get('config.factory'),
      $container->get('site.path')
      $container->getParameter('site.path')
    );
  }

+1 −1
Original line number Diff line number Diff line
@@ -6,6 +6,6 @@ services:
      - '@database'
      - '@stage_file_proxy.fetch_manager'
      - '@logger.channel.stage_file_proxy'
      - '@app.root'
      - '%app.root%'
    tags:
      -  { name: drush.command }
Loading