class PackageManagerBypassServiceProvider
Defines services to bypass Package Manager's core functionality.
@internal
Hierarchy
- class \Drupal\Core\DependencyInjection\ServiceProviderBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface, \Drupal\Core\DependencyInjection\ServiceModifierInterface
- class \Drupal\package_manager_bypass\PackageManagerBypassServiceProvider extends \Drupal\Core\DependencyInjection\ServiceProviderBase
Expanded class hierarchy of PackageManagerBypassServiceProvider
File
-
core/
modules/ package_manager/ tests/ modules/ package_manager_bypass/ src/ PackageManagerBypassServiceProvider.php, line 20
Namespace
Drupal\package_manager_bypassView source
final class PackageManagerBypassServiceProvider extends ServiceProviderBase {
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) : void {
parent::alter($container);
// By default, \Drupal\package_manager_bypass\NoOpStager is applied, except
// when a test opts out by setting this setting to FALSE.
// @see \Drupal\package_manager_bypass\NoOpStager::setLockFileShouldChange()
if (Settings::get('package_manager_bypass_composer_stager', TRUE)) {
$container->register(NoOpStager::class)
->setClass(NoOpStager::class)
->setPublic(FALSE)
->setAutowired(TRUE)
->setDecoratedService(StagerInterface::class);
}
$container->getDefinition(PathLocator::class)
->setClass(MockPathLocator::class)
->setAutowired(FALSE)
->setArguments([
new Reference('state'),
new Parameter('app.root'),
new Reference('config.factory'),
new Reference('file_system'),
]);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
PackageManagerBypassServiceProvider::alter | public | function | Overrides ServiceProviderBase::alter | ||
ServiceProviderBase::register | public | function | Overrides ServiceProviderInterface::register | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.