refreshless-8.x-1.x-dev/modules/refreshless_turbo/refreshless_turbo.services.yml
modules/refreshless_turbo/refreshless_turbo.services.yml
services:
_defaults:
autowire: true
autoconfigure: true
# @deprecated Use the 'refreshless_enabled' cache context instead.
#
# @todo Remove this when we can cleanly do so; currently causes fatal errors
# without a forcing full cache clear due to these contexts no longer being
# defined yet still present in cache. The cache contexts manager does not
# seem to offer a way to do this.
#
# @see https://www.drupal.org/project/group/issues/3061321
# Potential inspiration for how to do this.
cache_context.refreshless_turbo_enabled:
class: Drupal\refreshless\Cache\Context\RefreshlessEnabledCacheContext
tags:
- { name: cache.context }
# @deprecated Use the 'refreshless_request' cache context instead.
#
# @todo Remove this when we can cleanly do so; currently causes fatal errors
# without a forcing full cache clear due to these contexts no longer being
# defined yet still present in cache. The cache contexts manager does not
# seem to offer a way to do this.
#
# @see https://www.drupal.org/project/group/issues/3061321
# Potential inspiration for how to do this.
cache_context.refreshless_turbo_request:
class: Drupal\refreshless\Cache\Context\RefreshlessRequestCacheContext
tags:
- { name: cache.context }
http_middleware.refreshless_turbo.additive_libraries:
class: Drupal\refreshless_turbo\StackMiddleware\AdditiveLibraries
tags:
# Note the priority must be lower than http_middleware.ajax_page_state
# which has priority of 500.
- { name: http_middleware, priority: 499 }
refreshless_turbo.asset.resolver:
class: Drupal\refreshless_turbo\Service\AssetResolver
decorates: asset.resolver
public: false
refreshless_turbo.messenger:
class: Drupal\refreshless_turbo\Service\Messenger
decorates: messenger
public: false
refreshless_turbo.pager_manager:
class: Drupal\refreshless_turbo\Pager\PagerManager
decorates: pager.manager
public: false
refreshless_turbo.page_cache_request_policy.additive_libraries:
class: Drupal\refreshless_turbo\PageCache\AdditiveLibrariesRequestPolicy
tags:
- { name: page_cache_request_policy }
refreshless_turbo.path_processor.ajax_page_state:
class: Drupal\refreshless_turbo\PathProcessor\AjaxPageStatePathProcessor
tags:
- { name: path_processor_outbound }
refreshless_turbo.request_wrapper_factory:
class: Drupal\refreshless_turbo\Service\RequestWrapperFactory
decorates: refreshless.request_wrapper_factory
public: false
# Secondary flash message bag needed for our decorated messenger service.
session.refreshless_turbo_secondary_flash_bag:
class: Symfony\Component\HttpFoundation\Session\Flash\FlashBag
arguments:
- '_refreshless_turbo_secondary_flash_bag'
calls:
# We need to specify a different name than the default ('flashes') so that
# this doesn't replace the default Symfony flash message bag when
# initialized on the session.
- [setName, ['refreshless_turbo_secondary_flash_bag']]
tags:
- { name: session_bag }
