From 932e4d9eb0920bc5c21ede05d14575425c516be4 Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Thu, 13 Feb 2014 01:59:20 +0000 Subject: [PATCH] Issue #2184231 by jibran, dawehner, Xano: Use ConfigFactoryInterface to type hint ConfigFactory. --- core/lib/Drupal.php | 2 +- .../Core/Config/ConfigFactoryInterface.php | 15 +++++---------- core/lib/Drupal/Core/Config/ConfigInstaller.php | 6 +++--- .../Config/Entity/ConfigStorageController.php | 8 ++++---- .../Drupal/Core/Config/Entity/Query/Query.php | 8 +++++--- .../Core/Config/Entity/Query/QueryFactory.php | 8 ++++---- core/lib/Drupal/Core/Datetime/Date.php | 8 ++++---- core/lib/Drupal/Core/Extension/ThemeHandler.php | 8 ++++---- core/lib/Drupal/Core/Form/ConfigFormBase.php | 8 ++++---- core/lib/Drupal/Core/Form/FormBase.php | 8 ++++---- .../Core/ImageToolkit/ImageToolkitManager.php | 8 ++++---- core/lib/Drupal/Core/Mail/MailFactory.php | 6 +++--- .../Core/PathProcessor/PathProcessorDecode.php | 1 - .../Core/PathProcessor/PathProcessorFront.php | 8 ++++---- core/lib/Drupal/Core/Routing/UrlGenerator.php | 16 +++++++++++----- .../Drupal/Core/Theme/AjaxBasePageNegotiator.php | 8 ++++---- core/lib/Drupal/Core/Theme/DefaultNegotiator.php | 6 +++--- .../lib/Drupal/aggregator/Form/SettingsForm.php | 6 +++--- .../aggregator/processor/DefaultProcessor.php | 8 ++++---- .../aggregator/processor/TestProcessor.php | 8 ++++---- .../Authentication/Provider/BasicAuth.php | 8 ++++---- .../lib/Drupal/block/BlockFormController.php | 8 ++++---- .../block/Plugin/Derivative/ThemeLocalTask.php | 6 +++--- .../block/Tests/BlockFormControllerTest.php | 4 +--- .../modules/book/lib/Drupal/book/BookManager.php | 6 +++--- .../lib/Drupal/comment/CommentManager.php | 6 +++--- .../config/Tests/ConfigOverridesPriorityTest.php | 2 +- .../config_translation/ConfigEntityMapper.php | 6 +++--- .../config_translation/ConfigNamesMapper.php | 8 ++++---- .../Form/ConfigTranslationDeleteForm.php | 6 +++--- .../Form/ConfigTranslationFormBase.php | 6 +++--- .../Tests/ConfigNamesMapperTest.php | 6 +++--- .../Drupal/contact/Access/ContactPageAccess.php | 8 ++++---- .../modules/field/lib/Drupal/field/FieldInfo.php | 2 +- .../field/FieldInstanceStorageController.php | 6 +++--- .../lib/Drupal/field/FieldStorageController.php | 6 +++--- .../filter/FilterFormatFormControllerBase.php | 8 ++++---- .../Drupal/filter/FilterFormatListController.php | 8 ++++---- .../forum/lib/Drupal/forum/Form/Overview.php | 2 +- .../lib/Drupal/forum/ForumBreadcrumbBuilder.php | 6 +++--- .../forum/lib/Drupal/forum/ForumManager.php | 8 ++++---- .../Drupal/forum/Tests/ForumManagerTest.php | 4 +--- .../language/ConfigurableLanguageManager.php | 8 ++++---- .../LanguageRequestSubscriber.php | 8 ++++---- .../Form/ContentLanguageSettingsForm.php | 6 +++--- .../language/Form/NegotiationBrowserForm.php | 4 ++-- .../language/Form/NegotiationConfigureForm.php | 6 +++--- .../HttpKernel/PathProcessorLanguage.php | 8 ++++---- .../language/LanguageNegotiationMethodBase.php | 6 +++--- .../LanguageNegotiationMethodInterface.php | 6 +++--- .../lib/Drupal/language/LanguageNegotiator.php | 8 ++++---- .../Tests/LanguageNegotiationUrlTest.php | 4 +--- .../lib/Drupal/locale/LocaleConfigManager.php | 10 +++++----- .../lib/Drupal/locale/LocaleTranslation.php | 8 ++++---- .../LocaleAdminPathConfigEntityConverter.php | 6 +++--- .../lib/Drupal/rest/Routing/ResourceRoutes.php | 8 ++++---- .../lib/Drupal/search/Entity/SearchPage.php | 2 +- .../Drupal/search/SearchPageListController.php | 8 ++++---- .../lib/Drupal/search/SearchPageRepository.php | 8 ++++---- .../search/Tests/SearchPageRepositoryTest.php | 6 ++---- .../system/lib/Drupal/system/Form/CronForm.php | 6 +++--- .../lib/Drupal/system/Form/ImageToolkitForm.php | 6 +++--- .../lib/Drupal/system/Form/PerformanceForm.php | 6 +++--- .../lib/Drupal/system/Form/RegionalForm.php | 6 +++--- .../Drupal/system/Form/SiteInformationForm.php | 6 +++--- .../system/Form/SiteMaintenanceModeForm.php | 6 +++--- .../lib/Drupal/system/Form/ThemeSettingsForm.php | 6 +++--- .../Drupal/system/PathBasedBreadcrumbBuilder.php | 6 +++--- .../lib/Drupal/taxonomy/TermFormController.php | 8 ++++---- .../update/lib/Drupal/update/UpdateFetcher.php | 6 +++--- .../update/lib/Drupal/update/UpdateManager.php | 6 +++--- .../update/lib/Drupal/update/UpdateProcessor.php | 6 +++--- .../user/lib/Drupal/user/AccountSettingsForm.php | 6 +++--- .../user/lib/Drupal/user/Form/UserCancelForm.php | 8 ++++---- .../user/Form/UserMultipleCancelConfirm.php | 8 ++++---- .../lib/Drupal/user/Theme/AdminNegotiator.php | 8 ++++---- .../user/lib/Drupal/user/UserAutocomplete.php | 8 ++++---- .../modules/views/lib/Drupal/views/ViewsData.php | 6 +++--- .../tests/Drupal/views/Tests/ViewsDataTest.php | 2 +- core/tests/Drupal/Tests/Core/DrupalTest.php | 4 +--- .../Tests/Core/Extension/ThemeHandlerTest.php | 2 +- core/tests/Drupal/Tests/UnitTestCase.php | 4 +--- 82 files changed, 262 insertions(+), 272 deletions(-) diff --git a/core/lib/Drupal.php b/core/lib/Drupal.php index b939679cab60..f07ea7fa5773 100644 --- a/core/lib/Drupal.php +++ b/core/lib/Drupal.php @@ -266,7 +266,7 @@ public static function config($name) { * factory. For example, changing the language, or turning all overrides on * or off. * - * @return \Drupal\Core\Config\ConfigFactory + * @return \Drupal\Core\Config\ConfigFactoryInterface */ public static function configFactory() { return static::$container->get('config.factory'); diff --git a/core/lib/Drupal/Core/Config/ConfigFactoryInterface.php b/core/lib/Drupal/Core/Config/ConfigFactoryInterface.php index 663404776eb1..1969e823f0ff 100644 --- a/core/lib/Drupal/Core/Config/ConfigFactoryInterface.php +++ b/core/lib/Drupal/Core/Config/ConfigFactoryInterface.php @@ -26,8 +26,7 @@ interface ConfigFactoryInterface { * @param bool $state * TRUE if overrides should be applied, FALSE otherwise. * - * @return \Drupal\Core\Config\ConfigFactory - * The config factory object. + * @return $this */ public function setOverrideState($state); @@ -71,8 +70,7 @@ public function loadMultiple(array $names); * (optional) The name of the configuration object to reset. If omitted, all * configuration objects are reset. * - * @return \Drupal\Core\Config\ConfigFactory - * The config factory object. + * @return $this */ public function reset($name = NULL); @@ -114,8 +112,7 @@ public function getCacheKeys($name); /** * Clears the config factory static cache. * - * @return \Drupal\Core\Config\ConfigFactory - * The config factory object. + * @return $this */ public function clearStaticCache(); @@ -126,8 +123,7 @@ public function clearStaticCache(); * The language object to be set on the config factory. Used to override * configuration by language. * - * @return \Drupal\Core\Config\ConfigFactory - * The config factory object. + * @return $this */ public function setLanguage(Language $language = NULL); @@ -139,8 +135,7 @@ public function setLanguage(Language $language = NULL); * config factory to the site's default. The language can be used to * override configuration data if language overrides are available. * - * @return \Drupal\Core\Config\ConfigFactory - * The config factory object. + * @return $this */ public function setLanguageFromDefault(LanguageDefault $language_default); diff --git a/core/lib/Drupal/Core/Config/ConfigInstaller.php b/core/lib/Drupal/Core/Config/ConfigInstaller.php index 39f8d8ab3843..2bb06b3b4f3a 100644 --- a/core/lib/Drupal/Core/Config/ConfigInstaller.php +++ b/core/lib/Drupal/Core/Config/ConfigInstaller.php @@ -15,7 +15,7 @@ class ConfigInstaller implements ConfigInstallerInterface { /** * The configuration factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -50,7 +50,7 @@ class ConfigInstaller implements ConfigInstallerInterface { /** * Constructs the configuration installer. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The configuration factory. * @param \Drupal\Core\Config\StorageInterface $active_storage * The active configuration storage. @@ -61,7 +61,7 @@ class ConfigInstaller implements ConfigInstallerInterface { * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher * The event dispatcher. */ - public function __construct(ConfigFactory $config_factory, StorageInterface $active_storage, TypedConfigManagerInterface $typed_config, ConfigManagerInterface $config_manager, EventDispatcherInterface $event_dispatcher) { + public function __construct(ConfigFactoryInterface $config_factory, StorageInterface $active_storage, TypedConfigManagerInterface $typed_config, ConfigManagerInterface $config_manager, EventDispatcherInterface $event_dispatcher) { $this->configFactory = $config_factory; $this->activeStorage = $active_storage; $this->typedConfig = $typed_config; diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php index 8b1aa45056f3..6b717b7d56a3 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php @@ -8,11 +8,11 @@ namespace Drupal\Core\Config\Entity; use Drupal\Component\Utility\String; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityMalformedException; use Drupal\Core\Entity\EntityStorageControllerBase; use Drupal\Core\Config\Config; -use Drupal\Core\Config\ConfigFactory; use Drupal\Core\Config\StorageInterface; use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\EntityStorageException; @@ -61,7 +61,7 @@ class ConfigStorageController extends EntityStorageControllerBase implements Con /** * The config factory service. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -84,7 +84,7 @@ class ConfigStorageController extends EntityStorageControllerBase implements Con * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory service. * @param \Drupal\Core\Config\StorageInterface $config_storage * The config storage service. @@ -93,7 +93,7 @@ class ConfigStorageController extends EntityStorageControllerBase implements Con * @param \Drupal\Component\Uuid\UuidInterface $uuid_service * The UUID service. */ - public function __construct(EntityTypeInterface $entity_type, ConfigFactory $config_factory, StorageInterface $config_storage, QueryFactory $entity_query_factory, UuidInterface $uuid_service) { + public function __construct(EntityTypeInterface $entity_type, ConfigFactoryInterface $config_factory, StorageInterface $config_storage, QueryFactory $entity_query_factory, UuidInterface $uuid_service) { parent::__construct($entity_type); $this->idKey = $this->entityType->getKey('id'); diff --git a/core/lib/Drupal/Core/Config/Entity/Query/Query.php b/core/lib/Drupal/Core/Config/Entity/Query/Query.php index 36c6c50566a1..1df3ffd53dd6 100644 --- a/core/lib/Drupal/Core/Config/Entity/Query/Query.php +++ b/core/lib/Drupal/Core/Config/Entity/Query/Query.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Config\Entity\Query; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Config\StorageInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\Query\QueryBase; @@ -35,7 +35,7 @@ class Query extends QueryBase implements QueryInterface { /** * The config factory used by the config entity query. * - * @var \Drupal\Core\Config\ConfigFactory; + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -51,10 +51,12 @@ class Query extends QueryBase implements QueryInterface { * The entity manager that stores all meta information. * @param \Drupal\Core\Config\StorageInterface $config_storage * The actual config storage which is used to list all config items. + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory + * The config factory. * @param array $namespaces * List of potential namespaces of the classes belonging to this query. */ - function __construct($entity_type, $conjunction, EntityManagerInterface $entity_manager, StorageInterface $config_storage, ConfigFactory $config_factory, array $namespaces) { + function __construct($entity_type, $conjunction, EntityManagerInterface $entity_manager, StorageInterface $config_storage, ConfigFactoryInterface $config_factory, array $namespaces) { parent::__construct($entity_type, $conjunction, $namespaces); $this->entityManager = $entity_manager; $this->configStorage = $config_storage; diff --git a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php index fcd2591d2fd5..6d557cf3d99b 100644 --- a/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php +++ b/core/lib/Drupal/Core/Config/Entity/Query/QueryFactory.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Config\Entity\Query; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Config\StorageInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\Query\QueryBase; @@ -29,7 +29,7 @@ class QueryFactory implements QueryFactoryInterface { /** * The config factory used by the config entity query. * - * @var \Drupal\Core\Config\ConfigFactory; + * @var \Drupal\Core\Config\ConfigFactoryInterface; */ protected $configFactory; @@ -45,10 +45,10 @@ class QueryFactory implements QueryFactoryInterface { * * @param \Drupal\Core\Config\StorageInterface $config_storage * The config storage used by the config entity query. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config storage used by the config entity query. */ - public function __construct(StorageInterface $config_storage, ConfigFactory $config_factory) { + public function __construct(StorageInterface $config_storage, ConfigFactoryInterface $config_factory) { $this->configStorage = $config_storage; $this->configFactory = $config_factory; $this->namespaces = QueryBase::getNamespaces($this); diff --git a/core/lib/Drupal/Core/Datetime/Date.php b/core/lib/Drupal/Core/Datetime/Date.php index 18f2425fdc7c..5c2b92b0f03f 100644 --- a/core/lib/Drupal/Core/Datetime/Date.php +++ b/core/lib/Drupal/Core/Datetime/Date.php @@ -8,7 +8,7 @@ namespace Drupal\Core\Datetime; use Drupal\Component\Utility\Xss; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Datetime\DrupalDateTime; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Language\Language; @@ -44,7 +44,7 @@ class Date { /** * The configuration factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -79,10 +79,10 @@ class Date { * The language manager. * @param \Drupal\Core\StringTranslation\TranslationInterface $translation * The string translation. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The configuration factory. */ - public function __construct(EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager, TranslationInterface $translation, ConfigFactory $config_factory) { + public function __construct(EntityManagerInterface $entity_manager, LanguageManagerInterface $language_manager, TranslationInterface $translation, ConfigFactoryInterface $config_factory) { $this->dateFormatStorage = $entity_manager->getStorageController('date_format'); $this->languageManager = $language_manager; $this->stringTranslation = $translation; diff --git a/core/lib/Drupal/Core/Extension/ThemeHandler.php b/core/lib/Drupal/Core/Extension/ThemeHandler.php index 7c71eba93a73..82ebad92d477 100644 --- a/core/lib/Drupal/Core/Extension/ThemeHandler.php +++ b/core/lib/Drupal/Core/Extension/ThemeHandler.php @@ -10,7 +10,7 @@ use Drupal\Component\Utility\String; use Drupal\Core\Cache\Cache; use Drupal\Core\Cache\CacheBackendInterface; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Config\ConfigInstallerInterface; use Drupal\Core\Routing\RouteBuilder; use Drupal\Core\SystemListingInfo; @@ -47,7 +47,7 @@ class ThemeHandler implements ThemeHandlerInterface { /** * The config factory to get the enabled themes. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -96,7 +96,7 @@ class ThemeHandler implements ThemeHandlerInterface { /** * Constructs a new ThemeHandler. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory to get the enabled themes. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler to fire themes_enabled/themes_disabled hooks. @@ -113,7 +113,7 @@ class ThemeHandler implements ThemeHandlerInterface { * @param \Drupal\Core\SystemListingInfo $system_list_info * (optional) The system listing info. */ - public function __construct(ConfigFactory $config_factory, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, InfoParserInterface $info_parser, ConfigInstallerInterface $config_installer = NULL, RouteBuilder $route_builder = NULL, SystemListingInfo $system_list_info = NULL) { + public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, InfoParserInterface $info_parser, ConfigInstallerInterface $config_installer = NULL, RouteBuilder $route_builder = NULL, SystemListingInfo $system_list_info = NULL) { $this->configFactory = $config_factory; $this->moduleHandler = $module_handler; $this->cacheBackend = $cache_backend; diff --git a/core/lib/Drupal/Core/Form/ConfigFormBase.php b/core/lib/Drupal/Core/Form/ConfigFormBase.php index 5a4abb22a07f..8d971dccf9f9 100644 --- a/core/lib/Drupal/Core/Form/ConfigFormBase.php +++ b/core/lib/Drupal/Core/Form/ConfigFormBase.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Form; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Form\FormBase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -19,17 +19,17 @@ abstract class ConfigFormBase extends FormBase { /** * Stores the configuration factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; /** * Constructs a \Drupal\system\ConfigFormBase object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The factory for configuration objects. */ - public function __construct(ConfigFactory $config_factory) { + public function __construct(ConfigFactoryInterface $config_factory) { $this->configFactory = $config_factory; } diff --git a/core/lib/Drupal/Core/Form/FormBase.php b/core/lib/Drupal/Core/Form/FormBase.php index 41d9482b6cbb..93abb5ba60a6 100644 --- a/core/lib/Drupal/Core/Form/FormBase.php +++ b/core/lib/Drupal/Core/Form/FormBase.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Form; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\Core\DependencyInjection\DependencySerialization; use Drupal\Core\Routing\UrlGeneratorInterface; @@ -44,7 +44,7 @@ abstract class FormBase extends DependencySerialization implements FormInterface /** * The config factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -143,12 +143,12 @@ public function setTranslationManager(TranslationInterface $translation_manager) /** * Sets the config factory for this form. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * * @return $this */ - public function setConfigFactory(ConfigFactory $config_factory) { + public function setConfigFactory(ConfigFactoryInterface $config_factory) { $this->configFactory = $config_factory; return $this; } diff --git a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitManager.php b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitManager.php index 43686ff4d81a..eceab87976d9 100644 --- a/core/lib/Drupal/Core/ImageToolkit/ImageToolkitManager.php +++ b/core/lib/Drupal/Core/ImageToolkit/ImageToolkitManager.php @@ -8,7 +8,7 @@ namespace Drupal\Core\ImageToolkit; use Drupal\Core\Cache\CacheBackendInterface; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Language\LanguageManager; use Drupal\Core\Plugin\DefaultPluginManager; @@ -20,7 +20,7 @@ class ImageToolkitManager extends DefaultPluginManager { /** * The config factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -34,10 +34,10 @@ class ImageToolkitManager extends DefaultPluginManager { * Cache backend instance to use. * @param \Drupal\Core\Language\LanguageManager $language_manager * The language manager. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. */ - public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, LanguageManager $language_manager, ConfigFactory $config_factory) { + public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, LanguageManager $language_manager, ConfigFactoryInterface $config_factory) { parent::__construct('Plugin/ImageToolkit', $namespaces, 'Drupal\Core\ImageToolkit\Annotation\ImageToolkit'); $this->setCacheBackend($cache_backend, $language_manager, 'image_toolkit_plugins'); diff --git a/core/lib/Drupal/Core/Mail/MailFactory.php b/core/lib/Drupal/Core/Mail/MailFactory.php index dc1b70621f3d..439fd64746dd 100644 --- a/core/lib/Drupal/Core/Mail/MailFactory.php +++ b/core/lib/Drupal/Core/Mail/MailFactory.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Mail; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Component\Utility\String; /** @@ -32,10 +32,10 @@ class MailFactory { /** * Constructs a MailFActory object. * - * @param \Drupal\Core\Config\ConfigFactory $configFactory + * @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory * The configuration factory. */ - public function __construct(ConfigFactory $configFactory) { + public function __construct(ConfigFactoryInterface $configFactory) { $this->mailConfig = $configFactory->get('system.mail'); } diff --git a/core/lib/Drupal/Core/PathProcessor/PathProcessorDecode.php b/core/lib/Drupal/Core/PathProcessor/PathProcessorDecode.php index 0674cda8a2a7..a45c24eb1f03 100644 --- a/core/lib/Drupal/Core/PathProcessor/PathProcessorDecode.php +++ b/core/lib/Drupal/Core/PathProcessor/PathProcessorDecode.php @@ -7,7 +7,6 @@ namespace Drupal\Core\PathProcessor; -use Drupal\Core\Config\ConfigFactory; use Symfony\Component\HttpFoundation\Request; /** diff --git a/core/lib/Drupal/Core/PathProcessor/PathProcessorFront.php b/core/lib/Drupal/Core/PathProcessor/PathProcessorFront.php index b5b3cd17db80..11c66fdd68fe 100644 --- a/core/lib/Drupal/Core/PathProcessor/PathProcessorFront.php +++ b/core/lib/Drupal/Core/PathProcessor/PathProcessorFront.php @@ -7,7 +7,7 @@ namespace Drupal\Core\PathProcessor; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Symfony\Component\HttpFoundation\Request; /** @@ -18,17 +18,17 @@ class PathProcessorFront implements InboundPathProcessorInterface, OutboundPathP /** * A config factory for retrieving required config settings. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $config; /** * Constructs a PathProcessorFront object. * - * @param \Drupal\Core\Config\ConfigFactory $config + * @param \Drupal\Core\Config\ConfigFactoryInterface $config * A config factory for retrieving the site front page configuration. */ - public function __construct(ConfigFactory $config) { + public function __construct(ConfigFactoryInterface $config) { $this->config = $config; } diff --git a/core/lib/Drupal/Core/Routing/UrlGenerator.php b/core/lib/Drupal/Core/Routing/UrlGenerator.php index 1bb4b53b5035..cfd90a9090a7 100644 --- a/core/lib/Drupal/Core/Routing/UrlGenerator.php +++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php @@ -17,7 +17,7 @@ use Drupal\Component\Utility\Settings; use Drupal\Component\Utility\Url; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\PathProcessor\OutboundPathProcessorInterface; use Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface; @@ -43,7 +43,7 @@ class UrlGenerator extends ProviderBasedGenerator implements UrlGeneratorInterfa /** * The route processor. * - * @var \Drupal\Tests\Core\RouteProcessor\OutboundRouteProcessorInterface + * @var \Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface */ protected $routeProcessor; @@ -80,12 +80,18 @@ class UrlGenerator extends ProviderBasedGenerator implements UrlGeneratorInterfa * * @param \Drupal\Core\Routing\RouteProviderInterface $provider * The route provider to be searched for routes. - * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager - * The alias manager responsible for path aliasing. + * @param \Drupal\Core\PathProcessor\OutboundPathProcessorInterface $path_processor + * The path processor to convert the system path to one suitable for urls. + * @param \Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface $route_processor + * The route processor. + * @param \Drupal\Core\Config\ConfigFactoryInterface $config + * The config factory. + * @param \Drupal\Component\Utility\Settings $settings + * The read only settings. * @param \Symfony\Component\HttpKernel\Log\LoggerInterface $logger * An optional logger for recording errors. */ - public function __construct(RouteProviderInterface $provider, OutboundPathProcessorInterface $path_processor, OutboundRouteProcessorInterface $route_processor, ConfigFactory $config, Settings $settings, LoggerInterface $logger = NULL) { + public function __construct(RouteProviderInterface $provider, OutboundPathProcessorInterface $path_processor, OutboundRouteProcessorInterface $route_processor, ConfigFactoryInterface $config, Settings $settings, LoggerInterface $logger = NULL) { parent::__construct($provider, $logger); $this->pathProcessor = $path_processor; diff --git a/core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php b/core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php index 4066b163ca4e..d3a4bac4caf7 100644 --- a/core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php +++ b/core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php @@ -8,7 +8,7 @@ namespace Drupal\Core\Theme; use Drupal\Core\Access\CsrfTokenGenerator; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Symfony\Cmf\Component\Routing\RouteObjectInterface; use Symfony\Component\HttpFoundation\Request; @@ -41,7 +41,7 @@ class AjaxBasePageNegotiator implements ThemeNegotiatorInterface { /** * The config factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -50,10 +50,10 @@ class AjaxBasePageNegotiator implements ThemeNegotiatorInterface { * * @param \Drupal\Core\Access\CsrfTokenGenerator $token_generator * The CSRF token generator. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. */ - public function __construct(CsrfTokenGenerator $token_generator, ConfigFactory $config_factory) { + public function __construct(CsrfTokenGenerator $token_generator, ConfigFactoryInterface $config_factory) { $this->csrfGenerator = $token_generator; $this->configFactory = $config_factory; } diff --git a/core/lib/Drupal/Core/Theme/DefaultNegotiator.php b/core/lib/Drupal/Core/Theme/DefaultNegotiator.php index b08882d132f1..22b5863b364d 100644 --- a/core/lib/Drupal/Core/Theme/DefaultNegotiator.php +++ b/core/lib/Drupal/Core/Theme/DefaultNegotiator.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Theme; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Symfony\Component\HttpFoundation\Request; /** @@ -25,10 +25,10 @@ class DefaultNegotiator implements ThemeNegotiatorInterface { /** * Constructs a DefaultNegotiator object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. */ - public function __construct(ConfigFactory $config_factory) { + public function __construct(ConfigFactoryInterface $config_factory) { $this->config = $config_factory->get('system.theme'); } diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php b/core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php index 5fc015bd116c..8470858b8803 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Form/SettingsForm.php @@ -9,7 +9,7 @@ use Drupal\aggregator\Plugin\AggregatorPluginManager; use Drupal\Component\Utility\String; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Plugin\PluginFormInterface; use Drupal\Core\StringTranslation\TranslationInterface; use Drupal\Core\Form\ConfigFormBase; @@ -48,7 +48,7 @@ class SettingsForm extends ConfigFormBase { /** * Constructs a \Drupal\aggregator\SettingsForm object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The factory for configuration objects. * @param \Drupal\aggregator\Plugin\AggregatorPluginManager $fetcher_manager * The aggregator fetcher plugin manager. @@ -59,7 +59,7 @@ class SettingsForm extends ConfigFormBase { * @param \Drupal\Core\StringTranslation\TranslationInterface $translation_manager * The string translation manager. */ - public function __construct(ConfigFactory $config_factory, AggregatorPluginManager $fetcher_manager, AggregatorPluginManager $parser_manager, AggregatorPluginManager $processor_manager, TranslationInterface $translation_manager) { + public function __construct(ConfigFactoryInterface $config_factory, AggregatorPluginManager $fetcher_manager, AggregatorPluginManager $parser_manager, AggregatorPluginManager $processor_manager, TranslationInterface $translation_manager) { parent::__construct($config_factory); $this->translationManager = $translation_manager; $this->managers = array( diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php index 94a3da5c6359..c7553c2c11a8 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/aggregator/processor/DefaultProcessor.php @@ -11,7 +11,7 @@ use Drupal\aggregator\Plugin\ProcessorInterface; use Drupal\aggregator\Entity\Feed; use Drupal\Core\Database\Database; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -31,7 +31,7 @@ class DefaultProcessor extends AggregatorPluginSettingsBase implements Processor /** * Contains the configuration object factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -44,10 +44,10 @@ class DefaultProcessor extends AggregatorPluginSettingsBase implements Processor * The plugin_id for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. - * @param \Drupal\Core\Config\ConfigFactory $config + * @param \Drupal\Core\Config\ConfigFactoryInterface $config * The configuration factory object. */ - public function __construct(array $configuration, $plugin_id, array $plugin_definition, ConfigFactory $config) { + public function __construct(array $configuration, $plugin_id, array $plugin_definition, ConfigFactoryInterface $config) { $this->configFactory = $config; // @todo Refactor aggregator plugins to ConfigEntity so merging // the configuration here is not needed. diff --git a/core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Plugin/aggregator/processor/TestProcessor.php b/core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Plugin/aggregator/processor/TestProcessor.php index bbfe0d0efcfa..6fc94798498c 100644 --- a/core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Plugin/aggregator/processor/TestProcessor.php +++ b/core/modules/aggregator/tests/modules/aggregator_test/lib/Drupal/aggregator_test/Plugin/aggregator/processor/TestProcessor.php @@ -10,7 +10,7 @@ use Drupal\aggregator\Plugin\AggregatorPluginSettingsBase; use Drupal\aggregator\Plugin\ProcessorInterface; use Drupal\aggregator\Entity\Feed; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -30,7 +30,7 @@ class TestProcessor extends AggregatorPluginSettingsBase implements ProcessorInt /** * Contains the configuration object factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -55,10 +55,10 @@ public static function create(ContainerInterface $container, array $configuratio * The plugin_id for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. - * @param \Drupal\Core\Config\ConfigFactory $config + * @param \Drupal\Core\Config\ConfigFactoryInterface $config * The configuration factory object. */ - public function __construct(array $configuration, $plugin_id, array $plugin_definition, ConfigFactory $config) { + public function __construct(array $configuration, $plugin_id, array $plugin_definition, ConfigFactoryInterface $config) { $this->configFactory = $config; parent::__construct($configuration + $this->getConfiguration(), $plugin_id, $plugin_definition); } diff --git a/core/modules/basic_auth/lib/Drupal/basic_auth/Authentication/Provider/BasicAuth.php b/core/modules/basic_auth/lib/Drupal/basic_auth/Authentication/Provider/BasicAuth.php index 573da4cfeb69..79fe59f62053 100644 --- a/core/modules/basic_auth/lib/Drupal/basic_auth/Authentication/Provider/BasicAuth.php +++ b/core/modules/basic_auth/lib/Drupal/basic_auth/Authentication/Provider/BasicAuth.php @@ -10,7 +10,7 @@ use \Drupal\Component\Utility\String; use Drupal\Core\Authentication\AuthenticationProviderInterface; use Drupal\Core\Config\Config; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Event\GetResponseForExceptionEvent; use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; @@ -24,17 +24,17 @@ class BasicAuth implements AuthenticationProviderInterface { /** * The config factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; /** * Constructs a HTTP basic authentication provider object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. */ - public function __construct(ConfigFactory $config_factory) { + public function __construct(ConfigFactoryInterface $config_factory) { $this->configFactory = $config_factory; } diff --git a/core/modules/block/lib/Drupal/block/BlockFormController.php b/core/modules/block/lib/Drupal/block/BlockFormController.php index 4990a53076b4..3419afc71525 100644 --- a/core/modules/block/lib/Drupal/block/BlockFormController.php +++ b/core/modules/block/lib/Drupal/block/BlockFormController.php @@ -8,7 +8,7 @@ namespace Drupal\block; use Drupal\Core\Cache\Cache; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityFormController; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\Query\QueryFactory; @@ -53,7 +53,7 @@ class BlockFormController extends EntityFormController { /** * The config factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -66,10 +66,10 @@ class BlockFormController extends EntityFormController { * The entity query factory. * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager * The language manager. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. */ - public function __construct(EntityManagerInterface $entity_manager, QueryFactory $entity_query_factory, LanguageManagerInterface $language_manager, ConfigFactory $config_factory) { + public function __construct(EntityManagerInterface $entity_manager, QueryFactory $entity_query_factory, LanguageManagerInterface $language_manager, ConfigFactoryInterface $config_factory) { $this->storageController = $entity_manager->getStorageController('block'); $this->entityQueryFactory = $entity_query_factory; $this->languageManager = $language_manager; diff --git a/core/modules/block/lib/Drupal/block/Plugin/Derivative/ThemeLocalTask.php b/core/modules/block/lib/Drupal/block/Plugin/Derivative/ThemeLocalTask.php index 36b71ed5bea2..055ab4813d9e 100644 --- a/core/modules/block/lib/Drupal/block/Plugin/Derivative/ThemeLocalTask.php +++ b/core/modules/block/lib/Drupal/block/Plugin/Derivative/ThemeLocalTask.php @@ -8,7 +8,7 @@ namespace Drupal\block\Plugin\Derivative; use Drupal\Component\Plugin\Derivative\DerivativeBase; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Extension\ThemeHandlerInterface; use Drupal\Core\Plugin\Discovery\ContainerDerivativeInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -35,12 +35,12 @@ class ThemeLocalTask extends DerivativeBase implements ContainerDerivativeInterf /** * Constructs a new ThemeLocalTask. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param \Drupal\Core\Extension\ThemeHandlerInterface $theme_handler * The theme handler. */ - public function __construct(ConfigFactory $config_factory, ThemeHandlerInterface $theme_handler) { + public function __construct(ConfigFactoryInterface $config_factory, ThemeHandlerInterface $theme_handler) { $this->config = $config_factory->get('system.theme'); $this->themeHandler = $theme_handler; } diff --git a/core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php b/core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php index 9882aa1c4ae7..5d9f692799e7 100644 --- a/core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php +++ b/core/modules/block/tests/Drupal/block/Tests/BlockFormControllerTest.php @@ -66,9 +66,7 @@ public function testGetUniqueMachineName() { $language_manager = $this->getMock('Drupal\Core\Language\LanguageManagerInterface'); - $config_factory = $this->getMockBuilder('Drupal\Core\Config\ConfigFactory') - ->disableOriginalConstructor() - ->getMock(); + $config_factory = $this->getMock('Drupal\Core\Config\ConfigFactoryInterface'); $block_form_controller = new BlockFormController($entity_manager, $query_factory, $language_manager, $config_factory); diff --git a/core/modules/book/lib/Drupal/book/BookManager.php b/core/modules/book/lib/Drupal/book/BookManager.php index 746a20aa8071..37982ffa6fb2 100644 --- a/core/modules/book/lib/Drupal/book/BookManager.php +++ b/core/modules/book/lib/Drupal/book/BookManager.php @@ -13,7 +13,7 @@ use Drupal\Core\Language\Language; use Drupal\Core\Session\AccountInterface; use Drupal\Core\StringTranslation\TranslationInterface; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\node\NodeInterface; /** @@ -45,7 +45,7 @@ class BookManager { /** * Config Factory Service Object. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -59,7 +59,7 @@ class BookManager { /** * Constructs a BookManager object. */ - public function __construct(Connection $connection, EntityManagerInterface $entity_manager, TranslationInterface $translation, ConfigFactory $config_factory) { + public function __construct(Connection $connection, EntityManagerInterface $entity_manager, TranslationInterface $translation, ConfigFactoryInterface $config_factory) { $this->connection = $connection; $this->entityManager = $entity_manager; $this->translation = $translation; diff --git a/core/modules/comment/lib/Drupal/comment/CommentManager.php b/core/modules/comment/lib/Drupal/comment/CommentManager.php index b4d4e3fae7e0..76b9500e96ce 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentManager.php +++ b/core/modules/comment/lib/Drupal/comment/CommentManager.php @@ -8,7 +8,7 @@ namespace Drupal\comment; use Drupal\Component\Utility\String; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Routing\UrlGeneratorInterface; @@ -79,14 +79,14 @@ class CommentManager implements CommentManagerInterface { * The entity manager service. * @param \Drupal\Core\Session\AccountInterface $current_user * The current user. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param \Drupal\Core\StringTranslation\TranslationInterface $translation_manager * The string translation service. * @param \Drupal\Core\Routing\UrlGeneratorInterface $url_generator * The url generator service. */ - public function __construct(FieldInfo $field_info, EntityManagerInterface $entity_manager, AccountInterface $current_user, ConfigFactory $config_factory, TranslationInterface $translation_manager, UrlGeneratorInterface $url_generator) { + public function __construct(FieldInfo $field_info, EntityManagerInterface $entity_manager, AccountInterface $current_user, ConfigFactoryInterface $config_factory, TranslationInterface $translation_manager, UrlGeneratorInterface $url_generator) { $this->fieldInfo = $field_info; $this->entityManager = $entity_manager; $this->currentUser = $current_user; diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigOverridesPriorityTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigOverridesPriorityTest.php index 343318eae2ec..49482f9d2e83 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigOverridesPriorityTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigOverridesPriorityTest.php @@ -38,7 +38,7 @@ public function testOverridePriorities() { $module_overridden_slogan = 'Yay for overrides!'; $non_overridden_slogan = 'Yay for defaults!'; - /** @var \Drupal\Core\Config\ConfigFactory $config_factory */ + /** @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory */ $config_factory = $this->container->get('config.factory'); $config_factory ->get('system.site') diff --git a/core/modules/config_translation/lib/Drupal/config_translation/ConfigEntityMapper.php b/core/modules/config_translation/lib/Drupal/config_translation/ConfigEntityMapper.php index d8d3297761ba..ced4e5c9930a 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/ConfigEntityMapper.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/ConfigEntityMapper.php @@ -7,7 +7,7 @@ namespace Drupal\config_translation; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Routing\RouteProviderInterface; @@ -58,7 +58,7 @@ class ConfigEntityMapper extends ConfigNamesMapper { * An array of plugin information as documented in * ConfigNamesMapper::__construct() with the following additional keys: * - entity_type: The name of the entity type this mapper belongs to. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The configuration factory. * @param \Drupal\locale\LocaleConfigManager $locale_config_manager * The locale configuration manager. @@ -71,7 +71,7 @@ class ConfigEntityMapper extends ConfigNamesMapper { * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. */ - public function __construct($plugin_id, array $plugin_definition, ConfigFactory $config_factory, LocaleConfigManager $locale_config_manager, ConfigMapperManagerInterface $config_mapper_manager, RouteProviderInterface $route_provider, TranslationInterface $translation_manager, EntityManagerInterface $entity_manager) { + public function __construct($plugin_id, array $plugin_definition, ConfigFactoryInterface $config_factory, LocaleConfigManager $locale_config_manager, ConfigMapperManagerInterface $config_mapper_manager, RouteProviderInterface $route_provider, TranslationInterface $translation_manager, EntityManagerInterface $entity_manager) { parent::__construct($plugin_id, $plugin_definition, $config_factory, $locale_config_manager, $config_mapper_manager, $route_provider, $translation_manager); $this->setType($plugin_definition['entity_type']); diff --git a/core/modules/config_translation/lib/Drupal/config_translation/ConfigNamesMapper.php b/core/modules/config_translation/lib/Drupal/config_translation/ConfigNamesMapper.php index 7ba5b2a2162a..8198a47aed95 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/ConfigNamesMapper.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/ConfigNamesMapper.php @@ -7,7 +7,7 @@ namespace Drupal\config_translation; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Language\Language; use Drupal\Core\Plugin\PluginBase; use Drupal\Core\Routing\RouteProviderInterface; @@ -26,7 +26,7 @@ class ConfigNamesMapper extends PluginBase implements ConfigMapperInterface, Con /** * The configuration factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -73,7 +73,7 @@ class ConfigNamesMapper extends PluginBase implements ConfigMapperInterface, Con * Defaults to 20. * - list_controller: (optional) Class name for list controller used to * generate lists of this type of configuration. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The configuration factory. * @param \Drupal\locale\LocaleConfigManager $locale_config_manager * The locale configuration manager. @@ -88,7 +88,7 @@ class ConfigNamesMapper extends PluginBase implements ConfigMapperInterface, Con * Throws an exception if the route specified by the 'base_route_name' in * the plugin definition could not be found by the route provider. */ - public function __construct($plugin_id, array $plugin_definition, ConfigFactory $config_factory, LocaleConfigManager $locale_config_manager, ConfigMapperManagerInterface $config_mapper_manager, RouteProviderInterface $route_provider, TranslationInterface $translation_manager) { + public function __construct($plugin_id, array $plugin_definition, ConfigFactoryInterface $config_factory, LocaleConfigManager $locale_config_manager, ConfigMapperManagerInterface $config_mapper_manager, RouteProviderInterface $route_provider, TranslationInterface $translation_manager) { $this->pluginId = $plugin_id; $this->pluginDefinition = $plugin_definition; diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php index 395066742323..319e1682848e 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationDeleteForm.php @@ -10,7 +10,7 @@ use Drupal\config_translation\ConfigMapperManagerInterface; use Drupal\Core\Cache\Cache; use Drupal\Core\Config\StorageInterface; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Form\ConfirmFormBase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -66,10 +66,10 @@ class ConfigTranslationDeleteForm extends ConfirmFormBase { * The configuration mapper manager. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The configuration factory. */ - public function __construct(StorageInterface $config_storage, ConfigMapperManagerInterface $config_mapper_manager, ModuleHandlerInterface $module_handler, ConfigFactory $config_factory) { + public function __construct(StorageInterface $config_storage, ConfigMapperManagerInterface $config_mapper_manager, ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory) { $this->configStorage = $config_storage; $this->configMapperManager = $config_mapper_manager; $this->moduleHandler = $module_handler; diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationFormBase.php b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationFormBase.php index 30413add05c8..22e678383763 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationFormBase.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Form/ConfigTranslationFormBase.php @@ -9,7 +9,7 @@ use Drupal\config_translation\ConfigMapperManagerInterface; use Drupal\Core\Config\Config; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Config\Schema\Element; use Drupal\Core\Config\TypedConfigManager; use Drupal\Core\Extension\ModuleHandlerInterface; @@ -93,10 +93,10 @@ abstract class ConfigTranslationFormBase extends FormBase implements BaseFormIdI * The translation storage object. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler to invoke the alter hook. - * @param \Drupal\Core\Config\ConfigFactory + * @param \Drupal\Core\Config\ConfigFactoryInterface * The config factory. */ - public function __construct(TypedConfigManager $typed_config_manager, ConfigMapperManagerInterface $config_mapper_manager, StringStorageInterface $locale_storage, ModuleHandlerInterface $module_handler, ConfigFactory $config_factory) { + public function __construct(TypedConfigManager $typed_config_manager, ConfigMapperManagerInterface $config_mapper_manager, StringStorageInterface $locale_storage, ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory) { $this->typedConfigManager = $typed_config_manager; $this->configMapperManager = $config_mapper_manager; $this->localeStorage = $locale_storage; diff --git a/core/modules/config_translation/tests/Drupal/config_translation/Tests/ConfigNamesMapperTest.php b/core/modules/config_translation/tests/Drupal/config_translation/Tests/ConfigNamesMapperTest.php index ac8a13a30bba..6f45771f90e1 100644 --- a/core/modules/config_translation/tests/Drupal/config_translation/Tests/ConfigNamesMapperTest.php +++ b/core/modules/config_translation/tests/Drupal/config_translation/Tests/ConfigNamesMapperTest.php @@ -8,7 +8,7 @@ namespace Drupal\config_translation\Tests; use Drupal\config_translation\ConfigNamesMapper; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Language\Language; use Drupal\Tests\UnitTestCase; use Symfony\Component\Routing\Route; @@ -646,10 +646,10 @@ public function setConfigNames(array $config_names) { /** * Sets the configuration factory. * - * @var \Drupal\Core\Config\ConfigFactory $config_factory + * @var \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory to set. */ - public function setConfigFactory(ConfigFactory $config_factory) { + public function setConfigFactory(ConfigFactoryInterface $config_factory) { $this->configFactory = $config_factory; } diff --git a/core/modules/contact/lib/Drupal/contact/Access/ContactPageAccess.php b/core/modules/contact/lib/Drupal/contact/Access/ContactPageAccess.php index c8d0ed93ebbe..548d1faf8bcf 100644 --- a/core/modules/contact/lib/Drupal/contact/Access/ContactPageAccess.php +++ b/core/modules/contact/lib/Drupal/contact/Access/ContactPageAccess.php @@ -7,7 +7,7 @@ namespace Drupal\contact\Access; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Routing\Access\AccessInterface; use Drupal\Core\Session\AccountInterface; use Drupal\user\UserDataInterface; @@ -22,7 +22,7 @@ class ContactPageAccess implements AccessInterface { /** * The contact settings config object. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -36,12 +36,12 @@ class ContactPageAccess implements AccessInterface { /** * Constructs a ContactPageAccess instance. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param \Drupal\user\UserDataInterface $user_data * The user data service. */ - public function __construct(ConfigFactory $config_factory, UserDataInterface $user_data) { + public function __construct(ConfigFactoryInterface $config_factory, UserDataInterface $user_data) { $this->configFactory = $config_factory; $this->userData = $user_data; } diff --git a/core/modules/field/lib/Drupal/field/FieldInfo.php b/core/modules/field/lib/Drupal/field/FieldInfo.php index 4be22b75165f..7269567f7166 100644 --- a/core/modules/field/lib/Drupal/field/FieldInfo.php +++ b/core/modules/field/lib/Drupal/field/FieldInfo.php @@ -56,7 +56,7 @@ class FieldInfo { /** * The config factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $config; diff --git a/core/modules/field/lib/Drupal/field/FieldInstanceStorageController.php b/core/modules/field/lib/Drupal/field/FieldInstanceStorageController.php index 82c03e9eda5b..f92e96e683ef 100644 --- a/core/modules/field/lib/Drupal/field/FieldInstanceStorageController.php +++ b/core/modules/field/lib/Drupal/field/FieldInstanceStorageController.php @@ -13,7 +13,7 @@ use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\Query\QueryFactory; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Component\Uuid\UuidInterface; use Drupal\Core\Config\StorageInterface; use Drupal\Core\Extension\ModuleHandler; @@ -48,7 +48,7 @@ class FieldInstanceStorageController extends ConfigStorageController { * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory service. * @param \Drupal\Core\Config\StorageInterface $config_storage * The config storage service. @@ -61,7 +61,7 @@ class FieldInstanceStorageController extends ConfigStorageController { * @param \Drupal\Core\KeyValueStore\StateInterface $state * The state key value store. */ - public function __construct(EntityTypeInterface $entity_type, ConfigFactory $config_factory, StorageInterface $config_storage, QueryFactory $entity_query_factory, UuidInterface $uuid_service, EntityManagerInterface $entity_manager, StateInterface $state) { + public function __construct(EntityTypeInterface $entity_type, ConfigFactoryInterface $config_factory, StorageInterface $config_storage, QueryFactory $entity_query_factory, UuidInterface $uuid_service, EntityManagerInterface $entity_manager, StateInterface $state) { parent::__construct($entity_type, $config_factory, $config_storage, $entity_query_factory, $uuid_service); $this->entityManager = $entity_manager; $this->state = $state; diff --git a/core/modules/field/lib/Drupal/field/FieldStorageController.php b/core/modules/field/lib/Drupal/field/FieldStorageController.php index 4a9727b3b68a..9c83968620a9 100644 --- a/core/modules/field/lib/Drupal/field/FieldStorageController.php +++ b/core/modules/field/lib/Drupal/field/FieldStorageController.php @@ -14,7 +14,7 @@ use Drupal\Core\Entity\EntityTypeInterface; use Drupal\Core\Entity\Query\QueryFactory; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Config\StorageInterface; use Drupal\Core\Extension\ModuleHandler; use Drupal\Core\KeyValueStore\StateInterface; @@ -50,7 +50,7 @@ class FieldStorageController extends ConfigStorageController { * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory service. * @param \Drupal\Core\Config\StorageInterface $config_storage * The config storage service. @@ -65,7 +65,7 @@ class FieldStorageController extends ConfigStorageController { * @param \Drupal\Core\KeyValueStore\StateInterface $state * The state key value store. */ - public function __construct(EntityTypeInterface $entity_type, ConfigFactory $config_factory, StorageInterface $config_storage, QueryFactory $entity_query_factory, UuidInterface $uuid_service, EntityManagerInterface $entity_manager, ModuleHandler $module_handler, StateInterface $state) { + public function __construct(EntityTypeInterface $entity_type, ConfigFactoryInterface $config_factory, StorageInterface $config_storage, QueryFactory $entity_query_factory, UuidInterface $uuid_service, EntityManagerInterface $entity_manager, ModuleHandler $module_handler, StateInterface $state) { parent::__construct($entity_type, $config_factory, $config_storage, $entity_query_factory, $uuid_service); $this->entityManager = $entity_manager; $this->moduleHandler = $module_handler; diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php b/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php index 1529babfc9bc..eae21c21c6c0 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatFormControllerBase.php @@ -7,7 +7,7 @@ namespace Drupal\filter; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityFormController; use Drupal\Core\Entity\Query\QueryFactory; use Drupal\filter\Plugin\Filter\FilterNull; @@ -21,7 +21,7 @@ abstract class FilterFormatFormControllerBase extends EntityFormController { /** * The config factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -35,12 +35,12 @@ abstract class FilterFormatFormControllerBase extends EntityFormController { /** * Constructs a new FilterFormatFormControllerBase. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param \Drupal\Core\Entity\Query\QueryFactory $query_factory * The entity query factory. */ - public function __construct(ConfigFactory $config_factory, QueryFactory $query_factory) { + public function __construct(ConfigFactoryInterface $config_factory, QueryFactory $query_factory) { $this->configFactory = $config_factory; $this->queryFactory = $query_factory; } diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php b/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php index b83c0a960b5c..e64dce872bf0 100644 --- a/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php +++ b/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php @@ -8,7 +8,7 @@ namespace Drupal\filter; use Drupal\Component\Utility\String; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Config\Entity\DraggableListController; use Drupal\Core\Entity\EntityControllerInterface; use Drupal\Core\Entity\EntityInterface; @@ -29,7 +29,7 @@ class FilterFormatListController extends DraggableListController implements Enti /** * The config factory service. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -40,10 +40,10 @@ class FilterFormatListController extends DraggableListController implements Enti * The entity type definition. * @param \Drupal\Core\Entity\EntityStorageControllerInterface $storage * The entity storage controller class. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. */ - public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage, ConfigFactory $config_factory) { + public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage, ConfigFactoryInterface $config_factory) { parent::__construct($entity_type, $storage); $this->configFactory = $config_factory; diff --git a/core/modules/forum/lib/Drupal/forum/Form/Overview.php b/core/modules/forum/lib/Drupal/forum/Form/Overview.php index e821997ef9c5..d31387c02c75 100644 --- a/core/modules/forum/lib/Drupal/forum/Form/Overview.php +++ b/core/modules/forum/lib/Drupal/forum/Form/Overview.php @@ -9,7 +9,7 @@ use Drupal\Core\Entity\EntityManagerInterface; use Drupal\taxonomy\Form\OverviewTerms; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; diff --git a/core/modules/forum/lib/Drupal/forum/ForumBreadcrumbBuilder.php b/core/modules/forum/lib/Drupal/forum/ForumBreadcrumbBuilder.php index 6128aa8db06a..80abfc6a9f40 100644 --- a/core/modules/forum/lib/Drupal/forum/ForumBreadcrumbBuilder.php +++ b/core/modules/forum/lib/Drupal/forum/ForumBreadcrumbBuilder.php @@ -8,7 +8,7 @@ namespace Drupal\forum; use Drupal\Core\Breadcrumb\BreadcrumbBuilderBase; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\forum\ForumManagerInterface; use Symfony\Cmf\Component\Routing\RouteObjectInterface; @@ -44,12 +44,12 @@ class ForumBreadcrumbBuilder extends BreadcrumbBuilderBase { * * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. - * @param \Drupal\Core\Config\ConfigFactory $configFactory + * @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory * The configuration factory. * @param \Drupal\forum\ForumManagerInterface $forum_manager * The forum manager service. */ - public function __construct(EntityManagerInterface $entity_manager, ConfigFactory $configFactory, ForumManagerInterface $forum_manager) { + public function __construct(EntityManagerInterface $entity_manager, ConfigFactoryInterface $configFactory, ForumManagerInterface $forum_manager) { $this->entityManager = $entity_manager; $this->config = $configFactory->get('forum.settings'); $this->forumManager = $forum_manager; diff --git a/core/modules/forum/lib/Drupal/forum/ForumManager.php b/core/modules/forum/lib/Drupal/forum/ForumManager.php index 5c530c7e6856..bcc7372de5c7 100644 --- a/core/modules/forum/lib/Drupal/forum/ForumManager.php +++ b/core/modules/forum/lib/Drupal/forum/ForumManager.php @@ -7,7 +7,7 @@ namespace Drupal\forum; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Database\Connection; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\StringTranslation\TranslationInterface; @@ -43,7 +43,7 @@ class ForumManager implements ForumManagerInterface { /** * Forum settings config object. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -113,7 +113,7 @@ class ForumManager implements ForumManagerInterface { /** * Constructs the forum manager service. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory service. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager service. @@ -124,7 +124,7 @@ class ForumManager implements ForumManagerInterface { * @param \Drupal\Core\StringTranslation\TranslationInterface $translation_manager * The translation manager service. */ - public function __construct(ConfigFactory $config_factory, EntityManagerInterface $entity_manager, Connection $connection, FieldInfo $field_info, TranslationInterface $translation_manager) { + public function __construct(ConfigFactoryInterface $config_factory, EntityManagerInterface $entity_manager, Connection $connection, FieldInfo $field_info, TranslationInterface $translation_manager) { $this->configFactory = $config_factory; $this->entityManager = $entity_manager; $this->connection = $connection; diff --git a/core/modules/forum/tests/Drupal/forum/Tests/ForumManagerTest.php b/core/modules/forum/tests/Drupal/forum/Tests/ForumManagerTest.php index 8d3be5f68f58..ab02d1d7379e 100644 --- a/core/modules/forum/tests/Drupal/forum/Tests/ForumManagerTest.php +++ b/core/modules/forum/tests/Drupal/forum/Tests/ForumManagerTest.php @@ -34,9 +34,7 @@ public function testGetIndex() { ->disableOriginalConstructor() ->getMock(); - $config_factory = $this->getMockBuilder('\Drupal\Core\Config\ConfigFactory') - ->disableOriginalConstructor() - ->getMock(); + $config_factory = $this->getMock('\Drupal\Core\Config\ConfigFactoryInterface'); $config = $this->getMockBuilder('\Drupal\Core\Config\Config') ->disableOriginalConstructor() diff --git a/core/modules/language/lib/Drupal/language/ConfigurableLanguageManager.php b/core/modules/language/lib/Drupal/language/ConfigurableLanguageManager.php index 951836c55e16..3e0da615c2d4 100644 --- a/core/modules/language/lib/Drupal/language/ConfigurableLanguageManager.php +++ b/core/modules/language/lib/Drupal/language/ConfigurableLanguageManager.php @@ -9,7 +9,7 @@ use Drupal\Component\PhpStorage\PhpStorageFactory; use Drupal\Component\Utility\MapArray; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Language\Language; use Drupal\Core\Language\LanguageDefault; @@ -24,7 +24,7 @@ class ConfigurableLanguageManager extends LanguageManager implements Configurabl /** * The configuration storage service. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -94,12 +94,12 @@ public static function rebuildServices() { /** * Constructs a new ConfigurableLanguageManager object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The configuration storage service. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler service. */ - public function __construct(LanguageDefault $default_language, ConfigFactory $config_factory, ModuleHandlerInterface $module_handler) { + public function __construct(LanguageDefault $default_language, ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler) { $this->defaultLanguage = $default_language; $this->configFactory = $config_factory; $this->moduleHandler = $module_handler; diff --git a/core/modules/language/lib/Drupal/language/EventSubscriber/LanguageRequestSubscriber.php b/core/modules/language/lib/Drupal/language/EventSubscriber/LanguageRequestSubscriber.php index 26c81901d501..2d81206b38f4 100644 --- a/core/modules/language/lib/Drupal/language/EventSubscriber/LanguageRequestSubscriber.php +++ b/core/modules/language/lib/Drupal/language/EventSubscriber/LanguageRequestSubscriber.php @@ -7,7 +7,7 @@ namespace Drupal\language\EventSubscriber; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Language\Language; use Drupal\Core\Session\AccountInterface; use Drupal\Core\StringTranslation\Translator\TranslatorInterface; @@ -54,7 +54,7 @@ class LanguageRequestSubscriber implements EventSubscriberInterface { /** * The configuration factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -69,10 +69,10 @@ class LanguageRequestSubscriber implements EventSubscriberInterface { * The translation service. * @param \Drupal\Core\Session\AccountInterface $current_user * The current active user. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The configuration factory. */ - public function __construct(ConfigurableLanguageManagerInterface $language_manager, LanguageNegotiatorInterface $negotiator, TranslatorInterface $translation, AccountInterface $current_user, ConfigFactory $config_factory) { + public function __construct(ConfigurableLanguageManagerInterface $language_manager, LanguageNegotiatorInterface $negotiator, TranslatorInterface $translation, AccountInterface $current_user, ConfigFactoryInterface $config_factory) { $this->languageManager = $language_manager; $this->negotiator = $negotiator; $this->translation = $translation; diff --git a/core/modules/language/lib/Drupal/language/Form/ContentLanguageSettingsForm.php b/core/modules/language/lib/Drupal/language/Form/ContentLanguageSettingsForm.php index c8b90f2d60a7..26e0fd68d741 100644 --- a/core/modules/language/lib/Drupal/language/Form/ContentLanguageSettingsForm.php +++ b/core/modules/language/lib/Drupal/language/Form/ContentLanguageSettingsForm.php @@ -7,7 +7,7 @@ namespace Drupal\language\Form; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Form\ConfigFormBase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -27,12 +27,12 @@ class ContentLanguageSettingsForm extends ConfigFormBase { /** * Constructs a ContentLanguageSettingsForm object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. */ - public function __construct(ConfigFactory $config_factory, EntityManagerInterface $entity_manager) { + public function __construct(ConfigFactoryInterface $config_factory, EntityManagerInterface $entity_manager) { parent::__construct($config_factory); $this->entityManager = $entity_manager; diff --git a/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php b/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php index 0537a6ac1999..0455b7da1867 100644 --- a/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php +++ b/core/modules/language/lib/Drupal/language/Form/NegotiationBrowserForm.php @@ -7,7 +7,7 @@ namespace Drupal\language\Form; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Form\ConfigFormBase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -30,7 +30,7 @@ class NegotiationBrowserForm extends ConfigFormBase { * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler */ - public function __construct(ConfigFactory $config_factory, ModuleHandlerInterface $module_handler) { + public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler) { parent::__construct($config_factory); $this->moduleHandler = $module_handler; } diff --git a/core/modules/language/lib/Drupal/language/Form/NegotiationConfigureForm.php b/core/modules/language/lib/Drupal/language/Form/NegotiationConfigureForm.php index 24ae048af913..d99b67199578 100644 --- a/core/modules/language/lib/Drupal/language/Form/NegotiationConfigureForm.php +++ b/core/modules/language/lib/Drupal/language/Form/NegotiationConfigureForm.php @@ -11,7 +11,7 @@ use Drupal\Component\Utility\String; use Drupal\Component\Utility\Unicode; use Drupal\Component\Utility\Xss; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Form\FormBase; use Drupal\language\ConfigurableLanguageManagerInterface; @@ -55,7 +55,7 @@ class NegotiationConfigureForm extends FormBase { /** * Constructs a NegotiationConfigureForm object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The factory for configuration objects. * @param \Drupal\language\ConfigurableLanguageManagerInterface $language_manager * The language manager. @@ -64,7 +64,7 @@ class NegotiationConfigureForm extends FormBase { * @param \Drupal\block\Plugin\Type\BlockManager $block_manager * The block manager, or NULL if not available. */ - public function __construct(ConfigFactory $config_factory, ConfigurableLanguageManagerInterface $language_manager, LanguageNegotiatorInterface $negotiator, BlockManager $block_manager = NULL) { + public function __construct(ConfigFactoryInterface $config_factory, ConfigurableLanguageManagerInterface $language_manager, LanguageNegotiatorInterface $negotiator, BlockManager $block_manager = NULL) { $this->languageTypes = $config_factory->get('language.types'); $this->languageManager = $language_manager; $this->negotiator = $negotiator; diff --git a/core/modules/language/lib/Drupal/language/HttpKernel/PathProcessorLanguage.php b/core/modules/language/lib/Drupal/language/HttpKernel/PathProcessorLanguage.php index 71a5cfe3b685..f4268054e598 100644 --- a/core/modules/language/lib/Drupal/language/HttpKernel/PathProcessorLanguage.php +++ b/core/modules/language/lib/Drupal/language/HttpKernel/PathProcessorLanguage.php @@ -9,7 +9,7 @@ use Drupal\Component\Utility\Settings; use Drupal\Component\Utility\Unicode; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\PathProcessor\InboundPathProcessorInterface; use Drupal\Core\PathProcessor\OutboundPathProcessorInterface; use Drupal\language\ConfigurableLanguageManagerInterface; @@ -25,7 +25,7 @@ class PathProcessorLanguage implements InboundPathProcessorInterface, OutboundPa /** * A config factory for retrieving required config settings. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $config; @@ -67,7 +67,7 @@ class PathProcessorLanguage implements InboundPathProcessorInterface, OutboundPa /** * Constructs a PathProcessorLanguage object. * - * @param \Drupal\Core\Config\ConfigFactory $config + * @param \Drupal\Core\Config\ConfigFactoryInterface $config * A config factory object for retrieving configuration settings. * @param \Drupal\Component\Utility\Settings $settings * The settings instance. @@ -78,7 +78,7 @@ class PathProcessorLanguage implements InboundPathProcessorInterface, OutboundPa * @param \Drupal\Core\Session\AccountInterface $current_user * The current active user. */ - public function __construct(ConfigFactory $config, Settings $settings, ConfigurableLanguageManagerInterface $language_manager, LanguageNegotiatorInterface $negotiator, AccountInterface $current_user) { + public function __construct(ConfigFactoryInterface $config, Settings $settings, ConfigurableLanguageManagerInterface $language_manager, LanguageNegotiatorInterface $negotiator, AccountInterface $current_user) { $this->config = $config; $this->mixedModeSessions = $settings->get('mixed_mode_sessions', FALSE); $this->languageManager = $language_manager; diff --git a/core/modules/language/lib/Drupal/language/LanguageNegotiationMethodBase.php b/core/modules/language/lib/Drupal/language/LanguageNegotiationMethodBase.php index 5dc497bd745f..9ed0f7ce0fed 100644 --- a/core/modules/language/lib/Drupal/language/LanguageNegotiationMethodBase.php +++ b/core/modules/language/lib/Drupal/language/LanguageNegotiationMethodBase.php @@ -7,7 +7,7 @@ namespace Drupal\language; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Language\Language; use Drupal\Core\Session\AccountInterface; @@ -26,7 +26,7 @@ abstract class LanguageNegotiationMethodBase implements LanguageNegotiationMetho /** * The configuration factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $config; @@ -47,7 +47,7 @@ public function setLanguageManager(ConfigurableLanguageManagerInterface $languag /** * {@inheritdoc} */ - public function setConfig(ConfigFactory $config) { + public function setConfig(ConfigFactoryInterface $config) { $this->config = $config; } diff --git a/core/modules/language/lib/Drupal/language/LanguageNegotiationMethodInterface.php b/core/modules/language/lib/Drupal/language/LanguageNegotiationMethodInterface.php index 3ac20c9e0300..fefa5850ada7 100644 --- a/core/modules/language/lib/Drupal/language/LanguageNegotiationMethodInterface.php +++ b/core/modules/language/lib/Drupal/language/LanguageNegotiationMethodInterface.php @@ -7,7 +7,7 @@ namespace Drupal\language; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Language\Language; use Drupal\Core\Session\AccountInterface; use Symfony\Component\HttpFoundation\Request; @@ -29,10 +29,10 @@ public function setLanguageManager(ConfigurableLanguageManagerInterface $languag /** * Injects the configuration factory. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The configuration factory. */ - public function setConfig(ConfigFactory $config); + public function setConfig(ConfigFactoryInterface $config); /** * Injects the current user. diff --git a/core/modules/language/lib/Drupal/language/LanguageNegotiator.php b/core/modules/language/lib/Drupal/language/LanguageNegotiator.php index 1c8fd94f33d1..7841babc4b2c 100644 --- a/core/modules/language/lib/Drupal/language/LanguageNegotiator.php +++ b/core/modules/language/lib/Drupal/language/LanguageNegotiator.php @@ -9,7 +9,7 @@ use Drupal\Component\Plugin\PluginManagerInterface; use Drupal\Component\Utility\Settings; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Language\LanguageManagerInterface; use Drupal\Core\Session\AccountInterface; use Symfony\Component\HttpFoundation\Request; @@ -36,7 +36,7 @@ class LanguageNegotiator implements LanguageNegotiatorInterface { /** * The configuration factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -82,12 +82,12 @@ class LanguageNegotiator implements LanguageNegotiatorInterface { * The language manager. * @param \Drupal\Component\Plugin\PluginManagerInterface $negotiator_manager * The language negotiation methods plugin manager - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The configuration factory. * @param \Drupal\Component\Utility\Settings $settings * The settings instance. */ - public function __construct(ConfigurableLanguageManagerInterface $language_manager, PluginManagerInterface $negotiator_manager, ConfigFactory $config_factory, Settings $settings) { + public function __construct(ConfigurableLanguageManagerInterface $language_manager, PluginManagerInterface $negotiator_manager, ConfigFactoryInterface $config_factory, Settings $settings) { $this->languageManager = $language_manager; $this->negotiatorManager = $negotiator_manager; $this->configFactory = $config_factory; diff --git a/core/modules/language/tests/Drupal/language/Tests/LanguageNegotiationUrlTest.php b/core/modules/language/tests/Drupal/language/Tests/LanguageNegotiationUrlTest.php index 48a39a155fdc..6a4df28c3c2a 100644 --- a/core/modules/language/tests/Drupal/language/Tests/LanguageNegotiationUrlTest.php +++ b/core/modules/language/tests/Drupal/language/Tests/LanguageNegotiationUrlTest.php @@ -82,9 +82,7 @@ public function testDomain($http_host, $domains, $expected_langcode) { ->with('url') ->will($this->returnValue($config_data)); - $config = $this->getMockBuilder('Drupal\Core\Config\ConfigFactory') - ->disableOriginalConstructor() - ->getMock(); + $config = $this->getMock('Drupal\Core\Config\ConfigFactoryInterface'); $config->expects($this->any()) ->method('get') ->with('language.negotiation') diff --git a/core/modules/locale/lib/Drupal/locale/LocaleConfigManager.php b/core/modules/locale/lib/Drupal/locale/LocaleConfigManager.php index bd06d76c940f..353fcc6033ef 100644 --- a/core/modules/locale/lib/Drupal/locale/LocaleConfigManager.php +++ b/core/modules/locale/lib/Drupal/locale/LocaleConfigManager.php @@ -11,7 +11,7 @@ use Drupal\Core\Language\Language; use Drupal\Core\Config\TypedConfigManager; use Drupal\Core\Config\StorageInterface; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; /** * Manages localized configuration type plugins. @@ -40,7 +40,7 @@ class LocaleConfigManager extends TypedConfigManager { /** * The configuration factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -58,10 +58,10 @@ class LocaleConfigManager extends TypedConfigManager { * The locale storage to use for reading string translations. * @param \Drupal\Core\Cache\CacheBackendInterface $cache * The cache backend to use for caching the definitions. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The configuration factory */ - public function __construct(StorageInterface $configStorage, StorageInterface $schemaStorage, StorageInterface $installStorage, StringStorageInterface $localeStorage, CacheBackendInterface $cache, ConfigFactory $config_factory) { + public function __construct(StorageInterface $configStorage, StorageInterface $schemaStorage, StorageInterface $installStorage, StringStorageInterface $localeStorage, CacheBackendInterface $cache, ConfigFactoryInterface $config_factory) { // Note we use the install storage for the parent constructor. parent::__construct($configStorage, $schemaStorage, $cache); $this->installStorage = $installStorage; @@ -220,7 +220,7 @@ public function getStringNames(array $lids) { * Language code to delete. */ public function deleteLanguageTranslations($langcode) { - $locale_name = ConfigFactory::LANGUAGE_CONFIG_PREFIX . '.' . $langcode . '.'; + $locale_name = ConfigFactoryInterface::LANGUAGE_CONFIG_PREFIX . '.' . $langcode . '.'; foreach ($this->configStorage->listAll($locale_name) as $name) { $this->configStorage->delete($name); } diff --git a/core/modules/locale/lib/Drupal/locale/LocaleTranslation.php b/core/modules/locale/lib/Drupal/locale/LocaleTranslation.php index b0983deb6038..2c4590fd97c3 100644 --- a/core/modules/locale/lib/Drupal/locale/LocaleTranslation.php +++ b/core/modules/locale/lib/Drupal/locale/LocaleTranslation.php @@ -8,7 +8,7 @@ namespace Drupal\locale; use Drupal\Core\Cache\CacheBackendInterface; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\DestructableInterface; use Drupal\Core\Language\Language; use Drupal\Core\Lock\LockBackendAbstract; @@ -35,7 +35,7 @@ class LocaleTranslation implements TranslatorInterface, DestructableInterface { /** * The configuration factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -71,10 +71,10 @@ class LocaleTranslation implements TranslatorInterface, DestructableInterface { * The cache backend. * @param \Drupal\Core\Lock\LockBackendInterface $lock * The lock backend. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. */ - public function __construct(StringStorageInterface $storage, CacheBackendInterface $cache, LockBackendInterface $lock, ConfigFactory $config_factory) { + public function __construct(StringStorageInterface $storage, CacheBackendInterface $cache, LockBackendInterface $lock, ConfigFactoryInterface $config_factory) { $this->storage = $storage; $this->cache = $cache; $this->lock = $lock; diff --git a/core/modules/locale/lib/Drupal/locale/ParamConverter/LocaleAdminPathConfigEntityConverter.php b/core/modules/locale/lib/Drupal/locale/ParamConverter/LocaleAdminPathConfigEntityConverter.php index 00f1bd44c2d4..390424570fcc 100644 --- a/core/modules/locale/lib/Drupal/locale/ParamConverter/LocaleAdminPathConfigEntityConverter.php +++ b/core/modules/locale/lib/Drupal/locale/ParamConverter/LocaleAdminPathConfigEntityConverter.php @@ -9,7 +9,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Routing\Route; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\ParamConverter\EntityConverter; use Drupal\Core\ParamConverter\ParamConverterInterface; @@ -33,7 +33,7 @@ class LocaleAdminPathConfigEntityConverter extends EntityConverter { /** * The config factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -43,7 +43,7 @@ class LocaleAdminPathConfigEntityConverter extends EntityConverter { * @param \Drupal\Core\Entity\EntityManagerInterface $entityManager * The entity manager. */ - public function __construct(EntityManagerInterface $entity_manager, ConfigFactory $config_factory) { + public function __construct(EntityManagerInterface $entity_manager, ConfigFactoryInterface $config_factory) { $this->configFactory = $config_factory; parent::__construct($entity_manager); } diff --git a/core/modules/rest/lib/Drupal/rest/Routing/ResourceRoutes.php b/core/modules/rest/lib/Drupal/rest/Routing/ResourceRoutes.php index 7536a03f595d..fcea6176a2ed 100644 --- a/core/modules/rest/lib/Drupal/rest/Routing/ResourceRoutes.php +++ b/core/modules/rest/lib/Drupal/rest/Routing/ResourceRoutes.php @@ -7,7 +7,7 @@ namespace Drupal\rest\Routing; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\DependencyInjection\ContainerInjectionInterface; use Drupal\rest\Plugin\Type\ResourcePluginManager; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -27,7 +27,7 @@ class ResourceRoutes implements ContainerInjectionInterface { /** * The Drupal configuration factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $config; @@ -36,10 +36,10 @@ class ResourceRoutes implements ContainerInjectionInterface { * * @param \Drupal\rest\Plugin\Type\ResourcePluginManager $manager * The resource plugin manager. - * @param \Drupal\Core\Config\ConfigFactory $config + * @param \Drupal\Core\Config\ConfigFactoryInterface $config * The configuration factory holding resource settings. */ - public function __construct(ResourcePluginManager $manager, ConfigFactory $config) { + public function __construct(ResourcePluginManager $manager, ConfigFactoryInterface $config) { $this->manager = $manager; $this->config = $config; } diff --git a/core/modules/search/lib/Drupal/search/Entity/SearchPage.php b/core/modules/search/lib/Drupal/search/Entity/SearchPage.php index 1baa4f642496..bbc4e6f88ffb 100644 --- a/core/modules/search/lib/Drupal/search/Entity/SearchPage.php +++ b/core/modules/search/lib/Drupal/search/Entity/SearchPage.php @@ -251,7 +251,7 @@ protected function routeBuilder() { /** * Wraps the config factory. * - * @return \Drupal\Core\Config\ConfigFactory + * @return \Drupal\Core\Config\ConfigFactoryInterface * A config factory object. */ protected function configFactory() { diff --git a/core/modules/search/lib/Drupal/search/SearchPageListController.php b/core/modules/search/lib/Drupal/search/SearchPageListController.php index 8c69ac0ce183..6d4edc33335d 100644 --- a/core/modules/search/lib/Drupal/search/SearchPageListController.php +++ b/core/modules/search/lib/Drupal/search/SearchPageListController.php @@ -8,7 +8,7 @@ namespace Drupal\search; use Drupal\Component\Utility\MapArray; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Config\Entity\DraggableListController; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityStorageControllerInterface; @@ -31,7 +31,7 @@ class SearchPageListController extends DraggableListController implements FormIn /** * Stores the configuration factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -51,10 +51,10 @@ class SearchPageListController extends DraggableListController implements FormIn * The entity storage controller class. * @param \Drupal\search\SearchPluginManager $search_manager * The search plugin manager. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The factory for configuration objects. */ - public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage, SearchPluginManager $search_manager, ConfigFactory $config_factory) { + public function __construct(EntityTypeInterface $entity_type, EntityStorageControllerInterface $storage, SearchPluginManager $search_manager, ConfigFactoryInterface $config_factory) { parent::__construct($entity_type, $storage); $this->configFactory = $config_factory; $this->searchManager = $search_manager; diff --git a/core/modules/search/lib/Drupal/search/SearchPageRepository.php b/core/modules/search/lib/Drupal/search/SearchPageRepository.php index 680d45c95a82..db1e57fb3339 100644 --- a/core/modules/search/lib/Drupal/search/SearchPageRepository.php +++ b/core/modules/search/lib/Drupal/search/SearchPageRepository.php @@ -7,7 +7,7 @@ namespace Drupal\search; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityManagerInterface; /** @@ -18,7 +18,7 @@ class SearchPageRepository implements SearchPageRepositoryInterface { /** * The config factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -32,12 +32,12 @@ class SearchPageRepository implements SearchPageRepositoryInterface { /** * Constructs a new SearchPageRepository. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. */ - public function __construct(ConfigFactory $config_factory, EntityManagerInterface $entity_manager) { + public function __construct(ConfigFactoryInterface $config_factory, EntityManagerInterface $entity_manager) { $this->configFactory = $config_factory; $this->storage = $entity_manager->getStorageController('search_page'); } diff --git a/core/modules/search/tests/Drupal/search/Tests/SearchPageRepositoryTest.php b/core/modules/search/tests/Drupal/search/Tests/SearchPageRepositoryTest.php index 131f8fc129be..c547251b684e 100644 --- a/core/modules/search/tests/Drupal/search/Tests/SearchPageRepositoryTest.php +++ b/core/modules/search/tests/Drupal/search/Tests/SearchPageRepositoryTest.php @@ -45,7 +45,7 @@ class SearchPageRepositoryTest extends UnitTestCase { /** * The config factory. * - * @var \Drupal\Core\Config\ConfigFactory|\PHPUnit_Framework_MockObject_MockObject + * @var \Drupal\Core\Config\ConfigFactoryInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $configFactory; @@ -76,9 +76,7 @@ public function setUp() { ->method('getStorageController') ->will($this->returnValue($this->storage)); - $this->configFactory = $this->getMockBuilder('Drupal\Core\Config\ConfigFactory') - ->disableOriginalConstructor() - ->getMock(); + $this->configFactory = $this->getMock('Drupal\Core\Config\ConfigFactoryInterface'); $this->searchPageRepository = new SearchPageRepository($this->configFactory, $entity_manager); } diff --git a/core/modules/system/lib/Drupal/system/Form/CronForm.php b/core/modules/system/lib/Drupal/system/Form/CronForm.php index f59e4c030820..ac5789d83f87 100644 --- a/core/modules/system/lib/Drupal/system/Form/CronForm.php +++ b/core/modules/system/lib/Drupal/system/Form/CronForm.php @@ -7,7 +7,7 @@ namespace Drupal\system\Form; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\CronInterface; use Drupal\Core\KeyValueStore\StateInterface; use Drupal\Core\Form\ConfigFormBase; @@ -36,14 +36,14 @@ class CronForm extends ConfigFormBase { /** * Constructs a CronForm object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The factory for configuration objects. * @param \Drupal\Core\KeyValueStore\StateInterface $state * The state key value store. * @param \Drupal\Core\CronInterface $cron * The cron service. */ - public function __construct(ConfigFactory $config_factory, StateInterface $state, CronInterface $cron) { + public function __construct(ConfigFactoryInterface $config_factory, StateInterface $state, CronInterface $cron) { parent::__construct($config_factory); $this->state = $state; $this->cron = $cron; diff --git a/core/modules/system/lib/Drupal/system/Form/ImageToolkitForm.php b/core/modules/system/lib/Drupal/system/Form/ImageToolkitForm.php index 1ab3a26f06f8..dca33b4c1b71 100644 --- a/core/modules/system/lib/Drupal/system/Form/ImageToolkitForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ImageToolkitForm.php @@ -7,7 +7,7 @@ namespace Drupal\system\Form; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Form\ConfigFormBase; use Drupal\Core\ImageToolkit\ImageToolkitManager; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -27,12 +27,12 @@ class ImageToolkitForm extends ConfigFormBase { /** * Constructs a ImageToolkitForm object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The factory for configuration objects. * @param \Drupal\Core\ImageToolkit\ImageToolkitManager $manager * The image toolkit plugin manager. */ - public function __construct(ConfigFactory $config_factory, ImageToolkitManager $manager) { + public function __construct(ConfigFactoryInterface $config_factory, ImageToolkitManager $manager) { parent::__construct($config_factory); foreach ($manager->getAvailableToolkits() as $id => $definition) { diff --git a/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php b/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php index cc114bf71849..3f441280373a 100644 --- a/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php +++ b/core/modules/system/lib/Drupal/system/Form/PerformanceForm.php @@ -8,7 +8,7 @@ namespace Drupal\system\Form; use Drupal\Core\Form\ConfigFormBase; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Cache\CacheBackendInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -27,11 +27,11 @@ class PerformanceForm extends ConfigFormBase { /** * Constructs a PerformanceForm object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The factory for configuration objects. * @param \Drupal\Core\Cache\CacheBackendInterface $page_cache */ - public function __construct(ConfigFactory $config_factory, CacheBackendInterface $page_cache) { + public function __construct(ConfigFactoryInterface $config_factory, CacheBackendInterface $page_cache) { parent::__construct($config_factory); $this->pageCache = $page_cache; diff --git a/core/modules/system/lib/Drupal/system/Form/RegionalForm.php b/core/modules/system/lib/Drupal/system/Form/RegionalForm.php index 2ca6acfe5016..f4cc22539c53 100644 --- a/core/modules/system/lib/Drupal/system/Form/RegionalForm.php +++ b/core/modules/system/lib/Drupal/system/Form/RegionalForm.php @@ -7,7 +7,7 @@ namespace Drupal\system\Form; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Locale\CountryManagerInterface; use Drupal\Core\Form\ConfigFormBase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -27,12 +27,12 @@ class RegionalForm extends ConfigFormBase { /** * Constructs a RegionalForm object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The factory for configuration objects. * @param \Drupal\Core\Locale\CountryManagerInterface $country_manager * The country manager. */ - public function __construct(ConfigFactory $config_factory, CountryManagerInterface $country_manager) { + public function __construct(ConfigFactoryInterface $config_factory, CountryManagerInterface $country_manager) { parent::__construct($config_factory); $this->countryManager = $country_manager; } diff --git a/core/modules/system/lib/Drupal/system/Form/SiteInformationForm.php b/core/modules/system/lib/Drupal/system/Form/SiteInformationForm.php index aca83c33bffb..6f433ee80b27 100644 --- a/core/modules/system/lib/Drupal/system/Form/SiteInformationForm.php +++ b/core/modules/system/lib/Drupal/system/Form/SiteInformationForm.php @@ -7,7 +7,7 @@ namespace Drupal\system\Form; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Path\AliasManagerInterface; use Drupal\Core\Form\ConfigFormBase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -27,12 +27,12 @@ class SiteInformationForm extends ConfigFormBase { /** * Constructs a SiteInformationForm object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The factory for configuration objects. * @param \Drupal\Core\Path\AliasManagerInterface $alias_manager * The path alias manager. */ - public function __construct(ConfigFactory $config_factory, AliasManagerInterface $alias_manager) { + public function __construct(ConfigFactoryInterface $config_factory, AliasManagerInterface $alias_manager) { parent::__construct($config_factory); $this->aliasManager = $alias_manager; diff --git a/core/modules/system/lib/Drupal/system/Form/SiteMaintenanceModeForm.php b/core/modules/system/lib/Drupal/system/Form/SiteMaintenanceModeForm.php index 535ecfd19025..42bebc7a5180 100644 --- a/core/modules/system/lib/Drupal/system/Form/SiteMaintenanceModeForm.php +++ b/core/modules/system/lib/Drupal/system/Form/SiteMaintenanceModeForm.php @@ -7,7 +7,7 @@ namespace Drupal\system\Form; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\KeyValueStore\StateInterface; use Drupal\Core\Form\ConfigFormBase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -27,12 +27,12 @@ class SiteMaintenanceModeForm extends ConfigFormBase { /** * Constructs a new SiteMaintenanceModeForm. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The factory for configuration objects. * @param \Drupal\Core\KeyValueStore\StateInterface $state * The state keyvalue collection to use. */ - public function __construct(ConfigFactory $config_factory, StateInterface $state) { + public function __construct(ConfigFactoryInterface $config_factory, StateInterface $state) { parent::__construct($config_factory); $this->state = $state; } diff --git a/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php b/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php index dc1490a6965a..5dbbea1fe28b 100644 --- a/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php +++ b/core/modules/system/lib/Drupal/system/Form/ThemeSettingsForm.php @@ -11,7 +11,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Drupal\Core\Cache\Cache; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Form\ConfigFormBase; @@ -30,12 +30,12 @@ class ThemeSettingsForm extends ConfigFormBase { /** * Constructs a ThemeSettingsForm object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The factory for configuration objects. * @param \Drupal\Core\Extension\ModuleHandlerInterface * The module handler instance to use. */ - public function __construct(ConfigFactory $config_factory, ModuleHandlerInterface $module_handler) { + public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler) { parent::__construct($config_factory); $this->moduleHandler = $module_handler; diff --git a/core/modules/system/lib/Drupal/system/PathBasedBreadcrumbBuilder.php b/core/modules/system/lib/Drupal/system/PathBasedBreadcrumbBuilder.php index f39a1a5acb61..091ec9c0b955 100644 --- a/core/modules/system/lib/Drupal/system/PathBasedBreadcrumbBuilder.php +++ b/core/modules/system/lib/Drupal/system/PathBasedBreadcrumbBuilder.php @@ -8,7 +8,7 @@ namespace Drupal\system; use Drupal\Core\Breadcrumb\BreadcrumbBuilderBase; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Controller\TitleResolverInterface; use Drupal\Core\Access\AccessManager; use Drupal\Core\Entity\EntityManagerInterface; @@ -87,12 +87,12 @@ class PathBasedBreadcrumbBuilder extends BreadcrumbBuilderBase { * The dynamic router service. * @param \Drupal\Core\PathProcessor\InboundPathProcessorInterface $path_processor * The inbound path processor. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory service. * @param \Drupal\Core\Controller\TitleResolverInterface $title_resolver * The title resolver service. */ - public function __construct(Request $request, EntityManagerInterface $entity_manager, AccessManager $access_manager, RequestMatcherInterface $router, InboundPathProcessorInterface $path_processor, ConfigFactory $config_factory, TitleResolverInterface $title_resolver) { + public function __construct(Request $request, EntityManagerInterface $entity_manager, AccessManager $access_manager, RequestMatcherInterface $router, InboundPathProcessorInterface $path_processor, ConfigFactoryInterface $config_factory, TitleResolverInterface $title_resolver) { $this->request = $request; $this->accessManager = $access_manager; $this->menuStorage = $entity_manager->getStorageController('menu'); diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php index 07db84e3fa4f..3fa15e2703c9 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php @@ -8,7 +8,7 @@ namespace Drupal\taxonomy; use Drupal\Core\Cache\Cache; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\ContentEntityFormController; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Language\Language; @@ -22,7 +22,7 @@ class TermFormController extends ContentEntityFormController { /** * The config factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -31,10 +31,10 @@ class TermFormController extends ContentEntityFormController { * * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. */ - public function __construct(EntityManagerInterface $entity_manager, ConfigFactory $config_factory) { + public function __construct(EntityManagerInterface $entity_manager, ConfigFactoryInterface $config_factory) { parent::__construct($entity_manager); $this->configFactory = $config_factory; } diff --git a/core/modules/update/lib/Drupal/update/UpdateFetcher.php b/core/modules/update/lib/Drupal/update/UpdateFetcher.php index 047ef0e57eca..394810ed1749 100644 --- a/core/modules/update/lib/Drupal/update/UpdateFetcher.php +++ b/core/modules/update/lib/Drupal/update/UpdateFetcher.php @@ -7,7 +7,7 @@ namespace Drupal\update; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Guzzle\Http\ClientInterface; use Guzzle\Http\Exception\RequestException; @@ -45,12 +45,12 @@ class UpdateFetcher implements UpdateFetcherInterface { /** * Constructs a UpdateFetcher. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param \Guzzle\Http\ClientInterface $http_client * A Guzzle client object. */ - public function __construct(ConfigFactory $config_factory, ClientInterface $http_client) { + public function __construct(ConfigFactoryInterface $config_factory, ClientInterface $http_client) { $this->fetchUrl = $config_factory->get('update.settings')->get('fetch.url'); $this->httpClient = $http_client; $this->updateSettings = $config_factory->get('update.settings'); diff --git a/core/modules/update/lib/Drupal/update/UpdateManager.php b/core/modules/update/lib/Drupal/update/UpdateManager.php index fda243349a00..2139fdc51509 100644 --- a/core/modules/update/lib/Drupal/update/UpdateManager.php +++ b/core/modules/update/lib/Drupal/update/UpdateManager.php @@ -6,7 +6,7 @@ namespace Drupal\update; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\KeyValueStore\KeyValueFactoryInterface; use Drupal\Core\StringTranslation\TranslationInterface; @@ -69,7 +69,7 @@ class UpdateManager implements UpdateManagerInterface { /** * Constructs a UpdateManager. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The Module Handler service @@ -80,7 +80,7 @@ class UpdateManager implements UpdateManagerInterface { * @param \Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value_expirable_factory * The expirable key/value factory. */ - public function __construct(ConfigFactory $config_factory, ModuleHandlerInterface $module_handler, UpdateProcessorInterface $update_processor, TranslationInterface $translation, KeyValueFactoryInterface $key_value_expirable_factory) { + public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, UpdateProcessorInterface $update_processor, TranslationInterface $translation, KeyValueFactoryInterface $key_value_expirable_factory) { $this->updateSettings = $config_factory->get('update.settings'); $this->moduleHandler = $module_handler; $this->updateProcessor = $update_processor; diff --git a/core/modules/update/lib/Drupal/update/UpdateProcessor.php b/core/modules/update/lib/Drupal/update/UpdateProcessor.php index 611dce53ca6e..fd42b7613152 100644 --- a/core/modules/update/lib/Drupal/update/UpdateProcessor.php +++ b/core/modules/update/lib/Drupal/update/UpdateProcessor.php @@ -7,7 +7,7 @@ namespace Drupal\update; use Drupal\Component\Utility\Crypt; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\KeyValueStore\KeyValueFactoryInterface; use Drupal\Core\KeyValueStore\StateInterface; use Drupal\Core\PrivateKey; @@ -84,7 +84,7 @@ class UpdateProcessor implements UpdateProcessorInterface { /** * Constructs a UpdateProcessor. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param \Drupal\Core\Queue\QueueFactory $queue_factory * The queue factory @@ -99,7 +99,7 @@ class UpdateProcessor implements UpdateProcessorInterface { * @param \Drupal\Core\KeyValueStore\KeyValueFactoryInterface $key_value_expirable_factory * The expirable key/value factory. */ - public function __construct(ConfigFactory $config_factory, QueueFactory $queue_factory, UpdateFetcherInterface $update_fetcher, StateInterface $state_store, PrivateKey $private_key, KeyValueFactoryInterface $key_value_factory, KeyValueFactoryInterface $key_value_expirable_factory) { + public function __construct(ConfigFactoryInterface $config_factory, QueueFactory $queue_factory, UpdateFetcherInterface $update_fetcher, StateInterface $state_store, PrivateKey $private_key, KeyValueFactoryInterface $key_value_factory, KeyValueFactoryInterface $key_value_expirable_factory) { $this->updateFetcher = $update_fetcher; $this->updateSettings = $config_factory->get('update.settings'); $this->fetchQueue = $queue_factory->get('update_fetch_tasks'); diff --git a/core/modules/user/lib/Drupal/user/AccountSettingsForm.php b/core/modules/user/lib/Drupal/user/AccountSettingsForm.php index 75203a4d0c4d..b7c4c3a66f53 100644 --- a/core/modules/user/lib/Drupal/user/AccountSettingsForm.php +++ b/core/modules/user/lib/Drupal/user/AccountSettingsForm.php @@ -8,7 +8,7 @@ namespace Drupal\user; use Drupal\Core\Form\ConfigFormBase; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Extension\ModuleHandler; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -27,12 +27,12 @@ class AccountSettingsForm extends ConfigFormBase { /** * Constructs a \Drupal\user\AccountSettingsForm object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The factory for configuration objects. * @param \Drupal\Core\Extension\ModuleHandler $module_handler * The module handler. */ - public function __construct(ConfigFactory $config_factory, ModuleHandler $module_handler) { + public function __construct(ConfigFactoryInterface $config_factory, ModuleHandler $module_handler) { parent::__construct($config_factory); $this->moduleHandler = $module_handler; } diff --git a/core/modules/user/lib/Drupal/user/Form/UserCancelForm.php b/core/modules/user/lib/Drupal/user/Form/UserCancelForm.php index 5d14e0992926..cc31d1b5072d 100644 --- a/core/modules/user/lib/Drupal/user/Form/UserCancelForm.php +++ b/core/modules/user/lib/Drupal/user/Form/UserCancelForm.php @@ -7,7 +7,7 @@ namespace Drupal\user\Form; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\ContentEntityConfirmFormBase; use Drupal\Core\Entity\EntityManagerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -27,7 +27,7 @@ class UserCancelForm extends ContentEntityConfirmFormBase { /** * The config factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -41,12 +41,12 @@ class UserCancelForm extends ContentEntityConfirmFormBase { /** * Constructs an EntityFormController object. * - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. */ - public function __construct(EntityManagerInterface $entity_manager, ConfigFactory $config_factory) { + public function __construct(EntityManagerInterface $entity_manager, ConfigFactoryInterface $config_factory) { parent::__construct($entity_manager); $this->configFactory = $config_factory; } diff --git a/core/modules/user/lib/Drupal/user/Form/UserMultipleCancelConfirm.php b/core/modules/user/lib/Drupal/user/Form/UserMultipleCancelConfirm.php index ba85502e9083..07295c5763a1 100644 --- a/core/modules/user/lib/Drupal/user/Form/UserMultipleCancelConfirm.php +++ b/core/modules/user/lib/Drupal/user/Form/UserMultipleCancelConfirm.php @@ -8,7 +8,7 @@ namespace Drupal\user\Form; use Drupal\Component\Utility\String; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Form\ConfirmFormBase; use Drupal\Core\Routing\UrlGeneratorInterface; @@ -32,7 +32,7 @@ class UserMultipleCancelConfirm extends ConfirmFormBase { /** * The config factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -55,14 +55,14 @@ class UserMultipleCancelConfirm extends ConfirmFormBase { * * @param \Drupal\user\TempStoreFactory $temp_store_factory * The temp store factory. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param \Drupal\user\UserStorageControllerInterface $user_storage * The user storage controller. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. */ - public function __construct(TempStoreFactory $temp_store_factory, ConfigFactory $config_factory, UserStorageControllerInterface $user_storage, EntityManagerInterface $entity_manager) { + public function __construct(TempStoreFactory $temp_store_factory, ConfigFactoryInterface $config_factory, UserStorageControllerInterface $user_storage, EntityManagerInterface $entity_manager) { $this->tempStoreFactory = $temp_store_factory; $this->configFactory = $config_factory; $this->userStorage = $user_storage; diff --git a/core/modules/user/lib/Drupal/user/Theme/AdminNegotiator.php b/core/modules/user/lib/Drupal/user/Theme/AdminNegotiator.php index faaeb40634a3..c9b44243fc65 100644 --- a/core/modules/user/lib/Drupal/user/Theme/AdminNegotiator.php +++ b/core/modules/user/lib/Drupal/user/Theme/AdminNegotiator.php @@ -7,7 +7,7 @@ namespace Drupal\user\Theme; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Session\AccountInterface; use Drupal\Core\Theme\ThemeNegotiatorInterface; @@ -28,7 +28,7 @@ class AdminNegotiator implements ThemeNegotiatorInterface { /** * The config factory. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -44,12 +44,12 @@ class AdminNegotiator implements ThemeNegotiatorInterface { * * @param \Drupal\Core\Session\AccountInterface $user * The current user. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager * The entity manager. */ - public function __construct(AccountInterface $user, ConfigFactory $config_factory, EntityManagerInterface $entity_manager) { + public function __construct(AccountInterface $user, ConfigFactoryInterface $config_factory, EntityManagerInterface $entity_manager) { $this->user = $user; $this->configFactory = $config_factory; $this->entityManager = $entity_manager; diff --git a/core/modules/user/lib/Drupal/user/UserAutocomplete.php b/core/modules/user/lib/Drupal/user/UserAutocomplete.php index 16c31d6e6a14..5f27aace4c72 100644 --- a/core/modules/user/lib/Drupal/user/UserAutocomplete.php +++ b/core/modules/user/lib/Drupal/user/UserAutocomplete.php @@ -8,7 +8,7 @@ namespace Drupal\user; use Drupal\Component\Utility\String; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Database\Connection; use Drupal\Core\Entity\EntityManager; use Drupal\Core\Entity\Query\QueryFactory; @@ -28,7 +28,7 @@ class UserAutocomplete { /** * The config factory to get the anonymous user name. * - * @var \Drupal\Core\Config\ConfigFactory + * @var \Drupal\Core\Config\ConfigFactoryInterface */ protected $configFactory; @@ -51,10 +51,10 @@ class UserAutocomplete { * * @param \Drupal\Core\Database\Connection $connection * The database connection to query for the user names. - * @param \Drupal\Core\Config\ConfigFactory $config_factory + * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. */ - public function __construct(Connection $connection, ConfigFactory $config_factory, EntityManager $entity_manager, QueryFactory $entity_query) { + public function __construct(Connection $connection, ConfigFactoryInterface $config_factory, EntityManager $entity_manager, QueryFactory $entity_query) { $this->connection = $connection; $this->configFactory = $config_factory; $this->entityQuery = $entity_query; diff --git a/core/modules/views/lib/Drupal/views/ViewsData.php b/core/modules/views/lib/Drupal/views/ViewsData.php index c297c0335a69..a1e2da420abc 100644 --- a/core/modules/views/lib/Drupal/views/ViewsData.php +++ b/core/modules/views/lib/Drupal/views/ViewsData.php @@ -8,7 +8,7 @@ namespace Drupal\views; use Drupal\Core\Cache\CacheBackendInterface; -use Drupal\Core\Config\ConfigFactory; +use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Language\Language; use Drupal\Core\Language\LanguageManagerInterface; @@ -84,14 +84,14 @@ class ViewsData { * * @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend * The cache backend to use. - * @param \Drupal\Core\Config\ConfigFactory $config + * @param \Drupal\Core\Config\ConfigFactoryInterface $config * The configuration factory object to use. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler class to use for invoking hooks. * @param \Drupal\Core\Language\LanguageManagerInterface $language_manager * The language manager. */ - public function __construct(CacheBackendInterface $cache_backend, ConfigFactory $config, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager) { + public function __construct(CacheBackendInterface $cache_backend, ConfigFactoryInterface $config, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager) { $this->cacheBackend = $cache_backend; $this->moduleHandler = $module_handler; $this->languageManager = $language_manager; diff --git a/core/modules/views/tests/Drupal/views/Tests/ViewsDataTest.php b/core/modules/views/tests/Drupal/views/Tests/ViewsDataTest.php index a0a1b4d44948..94c5c1dc6f11 100644 --- a/core/modules/views/tests/Drupal/views/Tests/ViewsDataTest.php +++ b/core/modules/views/tests/Drupal/views/Tests/ViewsDataTest.php @@ -37,7 +37,7 @@ class ViewsDataTest extends UnitTestCase { /** * The mocked config factory. * - * @var \Drupal\Core\Config\ConfigFactory|\PHPUnit_Framework_MockObject_MockObject + * @var \Drupal\Core\Config\ConfigFactoryInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $configFactory; diff --git a/core/tests/Drupal/Tests/Core/DrupalTest.php b/core/tests/Drupal/Tests/Core/DrupalTest.php index b37010fd4ba1..38c7a5fc629e 100644 --- a/core/tests/Drupal/Tests/Core/DrupalTest.php +++ b/core/tests/Drupal/Tests/Core/DrupalTest.php @@ -123,9 +123,7 @@ public function testLock() { * Tests the config() method. */ public function testConfig() { - $config = $this->getMockBuilder('Drupal\Core\Config\ConfigFactory') - ->disableOriginalConstructor() - ->getMock(); + $config = $this->getMock('Drupal\Core\Config\ConfigFactoryInterface'); $config->expects($this->once()) ->method('get') ->with('test_config') diff --git a/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php b/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php index 6efddf7a358a..2194990ac787 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ThemeHandlerTest.php @@ -46,7 +46,7 @@ class ThemeHandlerTest extends UnitTestCase { /** * The mocked config factory. * - * @var \Drupal\Core\Config\ConfigFactory|\PHPUnit_Framework_MockObject_MockObject + * @var \Drupal\Core\Config\ConfigFactoryInterface|\PHPUnit_Framework_MockObject_MockObject */ protected $configFactory; diff --git a/core/tests/Drupal/Tests/UnitTestCase.php b/core/tests/Drupal/Tests/UnitTestCase.php index a76611cf3c9a..ca0968d62e54 100644 --- a/core/tests/Drupal/Tests/UnitTestCase.php +++ b/core/tests/Drupal/Tests/UnitTestCase.php @@ -122,9 +122,7 @@ public function getConfigFactoryStub(array $configs = array()) { } // Construct a config factory with the array of configuration object stubs // as its return map. - $config_factory = $this->getMockBuilder('Drupal\Core\Config\ConfigFactory') - ->disableOriginalConstructor() - ->getMock(); + $config_factory = $this->getMock('Drupal\Core\Config\ConfigFactoryInterface'); $config_factory->expects($this->any()) ->method('get') ->will($this->returnValueMap($config_map)); -- GitLab