Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
CacheContextsPass example
// Add a compiler pass for registering event subscribers.
$container
->
addCompilerPass
(
new
RegisterEventSubscribersPass
(
)
, PassConfig::TYPE_AFTER_REMOVING
)
;
$container
->
addCompilerPass
(
new
RegisterAccessChecksPass
(
)
)
;
// Add a compiler pass for registering services needing destruction.
$container
->
addCompilerPass
(
new
RegisterServicesForDestructionPass
(
)
)
;
// Add the compiler pass that will process the tagged services.
$container
->
addCompilerPass
(
new
ListCacheBinsPass
(
)
)
;
$container
->
addCompilerPass
(
new
CacheContextsPass
(
)
)
;
$container
->
addCompilerPass
(
new
ContextProvidersPass
(
)
)
;
$container
->
addCompilerPass
(
new
AuthenticationProviderPass
(
)
)
;
// Register plugin managers.
$container
->
addCompilerPass
(
new
PluginManagerPass
(
)
)
;
$container
->
addCompilerPass
(
new
DeprecatedServicePass
(
)
)
;
}
/** * Alters the UUID service to use the most efficient method available. * * @param \Drupal\Core\DependencyInjection\ContainerBuilder $container * The container builder. */