Loading src/Commands/StageFileProxyCommands.php +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ class StageFileProxyCommands extends DrushCommands { * * @var \Psr\Log\LoggerInterface */ protected $logger; protected $logger = NULL; /** * The module config. Loading src/EventDispatcher/AlterExcludedPathsEvent.php +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ namespace Drupal\stage_file_proxy\EventDispatcher; use Symfony\Component\EventDispatcher\Event; use Symfony\Contracts\EventDispatcher\Event; /** * Class AlterExcludedPathsEvent. Loading src/EventSubscriber/ProxySubscriber.php +4 −4 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; /** Loading Loading @@ -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. Loading Loading @@ -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) { Loading src/Form/SettingsForm.php +1 −1 Original line number Diff line number Diff line Loading @@ -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') ); } Loading stage_file_proxy.drush.services.yml +1 −1 Original line number Diff line number Diff line Loading @@ -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
src/Commands/StageFileProxyCommands.php +1 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ class StageFileProxyCommands extends DrushCommands { * * @var \Psr\Log\LoggerInterface */ protected $logger; protected $logger = NULL; /** * The module config. Loading
src/EventDispatcher/AlterExcludedPathsEvent.php +1 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ namespace Drupal\stage_file_proxy\EventDispatcher; use Symfony\Component\EventDispatcher\Event; use Symfony\Contracts\EventDispatcher\Event; /** * Class AlterExcludedPathsEvent. Loading
src/EventSubscriber/ProxySubscriber.php +4 −4 Original line number Diff line number Diff line Loading @@ -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; Loading @@ -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; /** Loading Loading @@ -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. Loading Loading @@ -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) { Loading
src/Form/SettingsForm.php +1 −1 Original line number Diff line number Diff line Loading @@ -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') ); } Loading
stage_file_proxy.drush.services.yml +1 −1 Original line number Diff line number Diff line Loading @@ -6,6 +6,6 @@ services: - '@database' - '@stage_file_proxy.fetch_manager' - '@logger.channel.stage_file_proxy' - '@app.root' - '%app.root%' tags: - { name: drush.command }