diff --git a/core/lib/Drupal/Core/Config/ConfigImporter.php b/core/lib/Drupal/Core/Config/ConfigImporter.php index f5aff08..ce691a7 100644 --- a/core/lib/Drupal/Core/Config/ConfigImporter.php +++ b/core/lib/Drupal/Core/Config/ConfigImporter.php @@ -96,6 +96,13 @@ class ConfigImporter { protected $validated; /** + * The Uuid service. + * + * @var \Drupal\Component\Uuid\UuidInterface + */ + protected $uuidService; + + /** * Constructs a configuration import object. * * @param \Drupal\Core\Config\StorageComparerInterface $storage_comparer @@ -109,16 +116,16 @@ class ConfigImporter { * The entity manager used to import config entities. * @param \Drupal\Core\Lock\LockBackendInterface * The lock backend to ensure multiple imports do not occur at the same time. - * @param \Drupal\Component\Uuid\UuidInterface $uuid + * @param \Drupal\Component\Uuid\UuidInterface $uuid_service * The uuid service. */ - public function __construct(StorageComparerInterface $storage_comparer, EventDispatcherInterface $event_dispatcher, ConfigFactory $config_factory, EntityManager $entity_manager, LockBackendInterface $lock, UuidInterface $uuid) { + public function __construct(StorageComparerInterface $storage_comparer, EventDispatcherInterface $event_dispatcher, ConfigFactory $config_factory, EntityManager $entity_manager, LockBackendInterface $lock, UuidInterface $uuid_service) { $this->storageComparer = $storage_comparer; $this->eventDispatcher = $event_dispatcher; $this->configFactory = $config_factory; $this->entityManager = $entity_manager; $this->lock = $lock; - $this->uuidService = $uuid; + $this->uuidService = $uuid_service; $this->processed = $this->storageComparer->getEmptyChangelist(); // Use an override free context for importing so that overrides to do not // pollute the imported data. The context is hard coded to ensure this is diff --git a/core/modules/config/lib/Drupal/config/Form/ConfigSync.php b/core/modules/config/lib/Drupal/config/Form/ConfigSync.php index 8c5cb96..79fea70 100644 --- a/core/modules/config/lib/Drupal/config/Form/ConfigSync.php +++ b/core/modules/config/lib/Drupal/config/Form/ConfigSync.php @@ -10,6 +10,8 @@ use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\DependencyInjection\ContainerInterface; +use Drupal\Component\Uuid\UuidInterface; + use Drupal\Core\Controller\ControllerInterface; use Drupal\Core\Form\FormInterface; use Drupal\Core\Config\StorageInterface; @@ -81,10 +83,15 @@ class ConfigSync implements ControllerInterface, FormInterface { protected $urlGenerator; /** + * The Uuid service. + * + * @var \Drupal\Component\Uuid\UuidInterface + */ + protected $uuidService; + + /** * Constructs the object. * - * @param \Drupal\Core\Database\Connection; $database - * The database object. * @param \Drupal\Core\Config\StorageInterface $sourceStorage * The source storage object. * @param \Drupal\Core\Config\StorageInterface $targetStorage @@ -95,14 +102,15 @@ class ConfigSync implements ControllerInterface, FormInterface { * Event dispatcher. * @param \Drupal\Core\Config\ConfigFactory $config_factory * Configuration object factory. - * @param \Drupal\Core\Entity\EntityManager + * @param \Drupal\Core\Entity\EntityManager $entity_manger * Entity manager. * @param \Drupal\Core\StringTranslation\Translator\TranslatorInterface $translation_manager * The translation manager. * @param \Drupal\Core\Routing\PathBasedGeneratorInterface $url_generator * The url generator service. + * @param \Drupal\Component\Uuid\UuidInterface $uuid_service */ - public function __construct(StorageInterface $sourceStorage, StorageInterface $targetStorage, LockBackendInterface $lock, EventDispatcherInterface $event_dispatcher, ConfigFactory $config_factory, EntityManager $entity_manger, TranslatorInterface $translation_manager, PathBasedGeneratorInterface $url_generator) { + public function __construct(StorageInterface $sourceStorage, StorageInterface $targetStorage, LockBackendInterface $lock, EventDispatcherInterface $event_dispatcher, ConfigFactory $config_factory, EntityManager $entity_manger, TranslatorInterface $translation_manager, PathBasedGeneratorInterface $url_generator, UuidInterface $uuid_service) { $this->sourceStorage = $sourceStorage; $this->targetStorage = $targetStorage; $this->lock = $lock; @@ -111,6 +119,7 @@ public function __construct(StorageInterface $sourceStorage, StorageInterface $t $this->entity_manager = $entity_manger; $this->translationManager = $translation_manager; $this->urlGenerator = $url_generator; + $this->uuidService = $uuid_service; } /** @@ -125,7 +134,8 @@ public static function create(ContainerInterface $container) { $container->get('config.factory'), $container->get('plugin.manager.entity'), $container->get('string_translation'), - $container->get('url_generator') + $container->get('url_generator'), + $container->get('uuid') ); } @@ -234,7 +244,8 @@ public function submitForm(array &$form, array &$form_state) { $this->eventDispatcher, $this->configFactory, $this->entity_manager, - $this->lock + $this->lock, + $this->uuidService ); if ($config_importer->alreadyImporting()) { drupal_set_message($this->translationManager->translate('Another request may be synchronizing configuration already.')); diff --git a/core/modules/image/lib/Drupal/image/ImageEffectBag.php b/core/modules/image/lib/Drupal/image/ImageEffectBag.php index d7789a4..e7d9899 100644 --- a/core/modules/image/lib/Drupal/image/ImageEffectBag.php +++ b/core/modules/image/lib/Drupal/image/ImageEffectBag.php @@ -50,7 +50,7 @@ public function removeInstanceID($instance_id) { public function updateConfiguration(array $configuration) { // Derive the instance ID from the configuration. if (empty($configuration['uuid'])) { - $uuid_generator = Drupal::service('uuid'); + $uuid_generator = \Drupal::service('uuid'); $configuration['uuid'] = $uuid_generator->generate(); } $instance_id = $configuration['uuid'];