X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fdrupal%2Fconsole%2Fsrc%2FBootstrap%2FDrupalCompilerPass.php;fp=vendor%2Fdrupal%2Fconsole%2Fsrc%2FBootstrap%2FDrupalCompilerPass.php;h=dcbfd6e72dc0267929967bb1b1e35ff34d6cf51b;hp=bb8c4c1cf55f92da82e0dbb44ecade218aa61031;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/vendor/drupal/console/src/Bootstrap/DrupalCompilerPass.php b/vendor/drupal/console/src/Bootstrap/DrupalCompilerPass.php index bb8c4c1cf..dcbfd6e72 100644 --- a/vendor/drupal/console/src/Bootstrap/DrupalCompilerPass.php +++ b/vendor/drupal/console/src/Bootstrap/DrupalCompilerPass.php @@ -2,6 +2,8 @@ namespace Drupal\Console\Bootstrap; +use Dflydev\DotAccessConfiguration\ConfigurationInterface; +use Drupal\Console\Override\ConfigSubscriber; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; use Drupal\Console\Utils\TranslatorManager; @@ -12,6 +14,18 @@ use Drupal\Core\Cache\ListCacheBinsPass; */ class DrupalCompilerPass implements CompilerPassInterface { + protected $configuration; + + /** + * DrupalCompilerPass constructor. + * + * @param ConfigurationInterface $configuration + */ + public function __construct(ConfigurationInterface $configuration) + { + $this->configuration = $configuration; + } + /** * @inheritdoc */ @@ -28,6 +42,17 @@ class DrupalCompilerPass implements CompilerPassInterface ->getDefinition('console.translator_manager') ->setClass(TranslatorManager::class); + $skipValidateSiteUuid = $this->configuration + ->get('application.overrides.config.skip-validate-site-uuid'); + + if ($skipValidateSiteUuid) { + // override system.config_subscriber + if ($container->has('system.config_subscriber')) { + $container->getDefinition('system.config_subscriber') + ->setClass(ConfigSubscriber::class); + } + } + // Set console.invalid_commands service $container ->get('console.key_value_storage')