From 268175050184464b80d31bea8e04a228ce39b4e4 Mon Sep 17 00:00:00 2001 From: webchick Date: Fri, 18 Apr 2014 08:32:47 -0700 Subject: [PATCH] Issue #2208609 by sun, Jalandhar, damiankloip: Move Json utility class into Drupal\Component\Serialization. --- core/includes/common.inc | 6 +++--- .../Drupal/Component/{Utility => Serialization}/Json.php | 4 ++-- core/lib/Drupal/Core/Asset/JsCollectionRenderer.php | 2 +- core/lib/Drupal/Core/Utility/LinkGenerator.php | 2 +- core/modules/block/lib/Drupal/block/BlockListBuilder.php | 2 +- .../lib/Drupal/block/Tests/Views/DisplayBlockTest.php | 2 +- .../lib/Drupal/comment/Tests/CommentNewIndicatorTest.php | 2 +- .../config_translation/Tests/ConfigTranslationUiTest.php | 2 +- .../Tests/ContentTranslationContextualLinksTest.php | 2 +- core/modules/contextual/contextual.module | 2 +- .../contextual/Plugin/views/field/ContextualLinks.php | 2 +- .../contextual/Tests/ContextualDynamicContextTest.php | 2 +- .../editor/lib/Drupal/editor/Tests/EditorSecurityTest.php | 2 +- .../editor/Tests/QuickEditIntegrationLoadingTest.php | 2 +- .../lib/Drupal/editor/Tests/QuickEditIntegrationTest.php | 2 +- .../Tests/EntityReferenceAutocompleteTest.php | 2 +- .../history/lib/Drupal/history/Tests/HistoryTest.php | 2 +- core/modules/locale/locale.module | 2 +- .../modules/menu_ui/lib/Drupal/menu_ui/Tests/MenuTest.php | 2 +- .../Drupal/node/Tests/Views/NodeContextualLinksTest.php | 2 +- .../quickedit/Tests/QuickEditAutocompleteTermTest.php | 2 +- .../lib/Drupal/quickedit/Tests/QuickEditLoadingTest.php | 2 +- core/modules/rest/lib/Drupal/rest/Tests/CreateTest.php | 2 +- core/modules/rest/lib/Drupal/rest/Tests/DBLogTest.php | 2 +- core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php | 2 +- core/modules/rest/lib/Drupal/rest/Tests/UpdateTest.php | 2 +- .../simpletest/lib/Drupal/simpletest/WebTestBase.php | 2 +- .../lib/Drupal/system/Controller/SystemController.php | 2 +- .../lib/Drupal/system/Tests/Common/JavaScriptTest.php | 2 +- .../system/lib/Drupal/system/Tests/Common/RenderTest.php | 2 +- .../system/lib/Drupal/system/Tests/Form/EmailTest.php | 2 +- .../system/lib/Drupal/system/Tests/Form/FormTest.php | 2 +- .../system/Tests/Form/LanguageSelectElementTest.php | 2 +- .../lib/Drupal/system/Tests/Form/StateValuesCleanTest.php | 2 +- .../system/lib/Drupal/system/Tests/Form/UrlTest.php | 2 +- .../system/Tests/Controller/SystemControllerTest.php | 2 +- .../system/tests/modules/form_test/form_test.module | 2 +- .../taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php | 2 +- .../modules/views/lib/Drupal/views/Tests/ViewAjaxTest.php | 3 ++- .../views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php | 2 +- .../views_ui/lib/Drupal/views_ui/Tests/PreviewTest.php | 2 +- .../Component/{Utility => Serialization}/JsonTest.php | 8 ++++---- 42 files changed, 49 insertions(+), 48 deletions(-) rename core/lib/Drupal/Component/{Utility => Serialization}/Json.php (91%) rename core/tests/Drupal/Tests/Component/{Utility => Serialization}/JsonTest.php (95%) diff --git a/core/includes/common.inc b/core/includes/common.inc index b7f84cb40f4..d7cf3f09203 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -8,8 +8,8 @@ * a cached page are instead located in bootstrap.inc. */ +use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\Crypt; -use Drupal\Component\Utility\Json; use Drupal\Component\Utility\Number; use Drupal\Component\Utility\Settings; use Drupal\Component\Utility\SortArray; @@ -2824,7 +2824,7 @@ function drupal_clear_js_cache() { * @ingroup php_wrappers * * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0. - * Use \Drupal\Component\Utility\Json::encode(). + * Use \Drupal\Component\Serialization\Json::encode(). */ function drupal_json_encode($var) { return Json::encode($var); @@ -2838,7 +2838,7 @@ function drupal_json_encode($var) { * @ingroup php_wrappers * * @deprecated in Drupal 8.x-dev, will be removed before Drupal 8.0. - * Use \Drupal\Component\Utility\Json::decode(). + * Use \Drupal\Component\Serialization\Json::decode(). */ function drupal_json_decode($var) { return Json::decode($var); diff --git a/core/lib/Drupal/Component/Utility/Json.php b/core/lib/Drupal/Component/Serialization/Json.php similarity index 91% rename from core/lib/Drupal/Component/Utility/Json.php rename to core/lib/Drupal/Component/Serialization/Json.php index 8602d9bff7a..91081d7e46d 100644 --- a/core/lib/Drupal/Component/Utility/Json.php +++ b/core/lib/Drupal/Component/Serialization/Json.php @@ -2,10 +2,10 @@ /** * @file - * Contains \Drupal\Component\Utility\Json. + * Contains \Drupal\Component\Serialization\Json. */ -namespace Drupal\Component\Utility; +namespace Drupal\Component\Serialization; /** * Provides helpers for dealing with json. diff --git a/core/lib/Drupal/Core/Asset/JsCollectionRenderer.php b/core/lib/Drupal/Core/Asset/JsCollectionRenderer.php index 87647894e6d..807179f0d53 100644 --- a/core/lib/Drupal/Core/Asset/JsCollectionRenderer.php +++ b/core/lib/Drupal/Core/Asset/JsCollectionRenderer.php @@ -6,8 +6,8 @@ namespace Drupal\Core\Asset; +use Drupal\Component\Serialization\Json; use Drupal\Core\State\StateInterface; -use Drupal\Component\Utility\Json; /** * Renders JavaScript assets. diff --git a/core/lib/Drupal/Core/Utility/LinkGenerator.php b/core/lib/Drupal/Core/Utility/LinkGenerator.php index f8a2f90b59d..c29b332b7e9 100644 --- a/core/lib/Drupal/Core/Utility/LinkGenerator.php +++ b/core/lib/Drupal/Core/Utility/LinkGenerator.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Utility; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\String; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Path\AliasManagerInterface; diff --git a/core/modules/block/lib/Drupal/block/BlockListBuilder.php b/core/modules/block/lib/Drupal/block/BlockListBuilder.php index aa40a4edf8c..ddafc22aae8 100644 --- a/core/modules/block/lib/Drupal/block/BlockListBuilder.php +++ b/core/modules/block/lib/Drupal/block/BlockListBuilder.php @@ -8,7 +8,7 @@ namespace Drupal\block; use Drupal\Component\Plugin\PluginManagerInterface; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\String; use Drupal\Core\Cache\Cache; use Drupal\Core\Config\Entity\ConfigEntityListBuilder; diff --git a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php index ca906eaae5e..f54db910b62 100644 --- a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php +++ b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php @@ -7,7 +7,7 @@ namespace Drupal\block\Tests\Views; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\String; use Drupal\views\Views; use Drupal\views\Tests\ViewTestBase; diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentNewIndicatorTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentNewIndicatorTest.php index 2a3a957ee56..fbe36d2872c 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentNewIndicatorTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentNewIndicatorTest.php @@ -7,7 +7,7 @@ namespace Drupal\comment\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Core\Language\Language; use Drupal\comment\CommentInterface; diff --git a/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php b/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php index cb07cd4227b..551b7f2e345 100644 --- a/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUiTest.php @@ -7,7 +7,7 @@ namespace Drupal\config_translation\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\Unicode; use Drupal\Core\Config\FileStorage; use Drupal\Core\Language\Language; diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationContextualLinksTest.php b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationContextualLinksTest.php index 4b71a167d49..94972f210c8 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationContextualLinksTest.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationContextualLinksTest.php @@ -7,7 +7,7 @@ namespace Drupal\content_translation\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\node\Entity\NodeType; use Drupal\simpletest\WebTestBase; diff --git a/core/modules/contextual/contextual.module b/core/modules/contextual/contextual.module index 30017b01b6a..80e6b3f52b8 100644 --- a/core/modules/contextual/contextual.module +++ b/core/modules/contextual/contextual.module @@ -5,7 +5,7 @@ * Adds contextual links to perform actions related to elements on a page. */ -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\UrlHelper; use Drupal\Core\Template\Attribute; diff --git a/core/modules/contextual/lib/Drupal/contextual/Plugin/views/field/ContextualLinks.php b/core/modules/contextual/lib/Drupal/contextual/Plugin/views/field/ContextualLinks.php index f2d45a2df99..aff000c43ee 100644 --- a/core/modules/contextual/lib/Drupal/contextual/Plugin/views/field/ContextualLinks.php +++ b/core/modules/contextual/lib/Drupal/contextual/Plugin/views/field/ContextualLinks.php @@ -7,10 +7,10 @@ namespace Drupal\contextual\Plugin\views\field; +use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\UrlHelper; use Drupal\views\Plugin\views\field\FieldPluginBase; use Drupal\views\ResultRow; -use Drupal\Component\Utility\Json; /** * Provides a handler that adds contextual links. diff --git a/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php b/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php index 4e1e6d08798..fd9368a7c47 100644 --- a/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php +++ b/core/modules/contextual/lib/Drupal/contextual/Tests/ContextualDynamicContextTest.php @@ -7,7 +7,7 @@ namespace Drupal\contextual\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\simpletest\WebTestBase; use Drupal\Core\Template\Attribute; diff --git a/core/modules/editor/lib/Drupal/editor/Tests/EditorSecurityTest.php b/core/modules/editor/lib/Drupal/editor/Tests/EditorSecurityTest.php index 39670ccf4cb..ccac981a0fd 100644 --- a/core/modules/editor/lib/Drupal/editor/Tests/EditorSecurityTest.php +++ b/core/modules/editor/lib/Drupal/editor/Tests/EditorSecurityTest.php @@ -7,7 +7,7 @@ namespace Drupal\editor\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\simpletest\WebTestBase; use Drupal\Component\Utility\String; diff --git a/core/modules/editor/lib/Drupal/editor/Tests/QuickEditIntegrationLoadingTest.php b/core/modules/editor/lib/Drupal/editor/Tests/QuickEditIntegrationLoadingTest.php index 6a45b9d0b82..74ef6feb17f 100644 --- a/core/modules/editor/lib/Drupal/editor/Tests/QuickEditIntegrationLoadingTest.php +++ b/core/modules/editor/lib/Drupal/editor/Tests/QuickEditIntegrationLoadingTest.php @@ -7,7 +7,7 @@ namespace Drupal\editor\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\simpletest\WebTestBase; /** diff --git a/core/modules/editor/lib/Drupal/editor/Tests/QuickEditIntegrationTest.php b/core/modules/editor/lib/Drupal/editor/Tests/QuickEditIntegrationTest.php index e236714f407..881ee8ecd48 100644 --- a/core/modules/editor/lib/Drupal/editor/Tests/QuickEditIntegrationTest.php +++ b/core/modules/editor/lib/Drupal/editor/Tests/QuickEditIntegrationTest.php @@ -7,7 +7,7 @@ namespace Drupal\editor\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Core\Language\Language; use Drupal\quickedit\EditorSelector; use Drupal\quickedit\MetadataGenerator; diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutocompleteTest.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutocompleteTest.php index 7c7ba59d2b4..ff59b8b0491 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutocompleteTest.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Tests/EntityReferenceAutocompleteTest.php @@ -7,7 +7,7 @@ namespace Drupal\entity_reference\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\String; use Drupal\Component\Utility\Tags; use Drupal\entity_reference\EntityReferenceController; diff --git a/core/modules/history/lib/Drupal/history/Tests/HistoryTest.php b/core/modules/history/lib/Drupal/history/Tests/HistoryTest.php index 88d38667577..13b36ff2719 100644 --- a/core/modules/history/lib/Drupal/history/Tests/HistoryTest.php +++ b/core/modules/history/lib/Drupal/history/Tests/HistoryTest.php @@ -7,7 +7,7 @@ namespace Drupal\history\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\simpletest\WebTestBase; /** diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index f9e17ebf449..afb4047df22 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -10,7 +10,7 @@ * object files are supported. */ -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\UrlHelper; use Drupal\Component\Utility\Xss; use Drupal\Core\Cache\Cache; diff --git a/core/modules/menu_ui/lib/Drupal/menu_ui/Tests/MenuTest.php b/core/modules/menu_ui/lib/Drupal/menu_ui/Tests/MenuTest.php index 4ed747e1a2d..fba36912cb3 100644 --- a/core/modules/menu_ui/lib/Drupal/menu_ui/Tests/MenuTest.php +++ b/core/modules/menu_ui/lib/Drupal/menu_ui/Tests/MenuTest.php @@ -7,7 +7,7 @@ namespace Drupal\menu_ui\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; /** * Defines a test class for testing menu and menu link functionality. diff --git a/core/modules/node/lib/Drupal/node/Tests/Views/NodeContextualLinksTest.php b/core/modules/node/lib/Drupal/node/Tests/Views/NodeContextualLinksTest.php index ff390e6bac6..e8f679182f8 100644 --- a/core/modules/node/lib/Drupal/node/Tests/Views/NodeContextualLinksTest.php +++ b/core/modules/node/lib/Drupal/node/Tests/Views/NodeContextualLinksTest.php @@ -7,7 +7,7 @@ namespace Drupal\node\Tests\Views; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Symfony\Component\HttpFoundation\Request; /** diff --git a/core/modules/quickedit/lib/Drupal/quickedit/Tests/QuickEditAutocompleteTermTest.php b/core/modules/quickedit/lib/Drupal/quickedit/Tests/QuickEditAutocompleteTermTest.php index d679106e859..15d8ca99860 100644 --- a/core/modules/quickedit/lib/Drupal/quickedit/Tests/QuickEditAutocompleteTermTest.php +++ b/core/modules/quickedit/lib/Drupal/quickedit/Tests/QuickEditAutocompleteTermTest.php @@ -7,7 +7,7 @@ namespace Drupal\quickedit\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Language\Language; use Drupal\simpletest\WebTestBase; diff --git a/core/modules/quickedit/lib/Drupal/quickedit/Tests/QuickEditLoadingTest.php b/core/modules/quickedit/lib/Drupal/quickedit/Tests/QuickEditLoadingTest.php index d54efb405e8..d41738d6793 100644 --- a/core/modules/quickedit/lib/Drupal/quickedit/Tests/QuickEditLoadingTest.php +++ b/core/modules/quickedit/lib/Drupal/quickedit/Tests/QuickEditLoadingTest.php @@ -7,7 +7,7 @@ namespace Drupal\quickedit\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\simpletest\WebTestBase; use Drupal\quickedit\Ajax\MetadataCommand; use Drupal\Core\Ajax\AppendCommand; diff --git a/core/modules/rest/lib/Drupal/rest/Tests/CreateTest.php b/core/modules/rest/lib/Drupal/rest/Tests/CreateTest.php index e33aebcbcbc..3ac369a9774 100644 --- a/core/modules/rest/lib/Drupal/rest/Tests/CreateTest.php +++ b/core/modules/rest/lib/Drupal/rest/Tests/CreateTest.php @@ -7,7 +7,7 @@ namespace Drupal\rest\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; /** * Tests resource creation on user, node and test entities. diff --git a/core/modules/rest/lib/Drupal/rest/Tests/DBLogTest.php b/core/modules/rest/lib/Drupal/rest/Tests/DBLogTest.php index 53e5ed76023..b4f1779fd8e 100644 --- a/core/modules/rest/lib/Drupal/rest/Tests/DBLogTest.php +++ b/core/modules/rest/lib/Drupal/rest/Tests/DBLogTest.php @@ -7,7 +7,7 @@ namespace Drupal\rest\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\rest\Tests\RESTTestBase; /** diff --git a/core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php b/core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php index 44c5e154a59..15206f72c13 100644 --- a/core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php +++ b/core/modules/rest/lib/Drupal/rest/Tests/ReadTest.php @@ -7,7 +7,7 @@ namespace Drupal\rest\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Core\Language\Language; use Drupal\rest\Tests\RESTTestBase; diff --git a/core/modules/rest/lib/Drupal/rest/Tests/UpdateTest.php b/core/modules/rest/lib/Drupal/rest/Tests/UpdateTest.php index adff21d4fd9..15ef7f3730d 100644 --- a/core/modules/rest/lib/Drupal/rest/Tests/UpdateTest.php +++ b/core/modules/rest/lib/Drupal/rest/Tests/UpdateTest.php @@ -7,7 +7,7 @@ namespace Drupal\rest\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\rest\Tests\RESTTestBase; /** diff --git a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php index 23dcaec9ba8..50ba5c3fce7 100644 --- a/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php +++ b/core/modules/simpletest/lib/Drupal/simpletest/WebTestBase.php @@ -7,8 +7,8 @@ namespace Drupal\simpletest; +use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\Crypt; -use Drupal\Component\Utility\Json; use Drupal\Component\Utility\NestedArray; use Drupal\Component\Utility\String; use Drupal\Component\Utility\Xss; diff --git a/core/modules/system/lib/Drupal/system/Controller/SystemController.php b/core/modules/system/lib/Drupal/system/Controller/SystemController.php index 308701c5f97..eda620d8053 100644 --- a/core/modules/system/lib/Drupal/system/Controller/SystemController.php +++ b/core/modules/system/lib/Drupal/system/Controller/SystemController.php @@ -7,7 +7,7 @@ namespace Drupal\system\Controller; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Entity\Query\QueryFactory; use Drupal\Core\Extension\ThemeHandlerInterface; diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php index 937b83ccb90..f6f3da8bbd5 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/JavaScriptTest.php @@ -7,7 +7,7 @@ namespace Drupal\system\Tests\Common; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\simpletest\DrupalUnitTestBase; use Drupal\Component\Utility\Crypt; diff --git a/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php b/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php index 28528e17cad..349a14ef51a 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Common/RenderTest.php @@ -7,8 +7,8 @@ namespace Drupal\system\Tests\Common; +use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\Html; -use Drupal\Component\Utility\Json; use Drupal\Core\Render\Element; use Drupal\simpletest\DrupalUnitTestBase; diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/EmailTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/EmailTest.php index dd80f29ffaf..633d4d6722d 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Form/EmailTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Form/EmailTest.php @@ -7,7 +7,7 @@ namespace Drupal\system\Tests\Form; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\simpletest\WebTestBase; /** diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php index b0065918bf8..634b00409b5 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Form/FormTest.php @@ -7,7 +7,7 @@ namespace Drupal\system\Tests\Form; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\String; use Drupal\Core\Render\Element; use Drupal\simpletest\WebTestBase; diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/LanguageSelectElementTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/LanguageSelectElementTest.php index 021419a7603..f501ad199d4 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Form/LanguageSelectElementTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Form/LanguageSelectElementTest.php @@ -7,7 +7,7 @@ namespace Drupal\system\Tests\Form; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\simpletest\WebTestBase; use Drupal\Core\Language\Language; diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/StateValuesCleanTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/StateValuesCleanTest.php index e6f844f380e..da5cdeb8dbc 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Form/StateValuesCleanTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Form/StateValuesCleanTest.php @@ -7,7 +7,7 @@ namespace Drupal\system\Tests\Form; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\simpletest\WebTestBase; /** diff --git a/core/modules/system/lib/Drupal/system/Tests/Form/UrlTest.php b/core/modules/system/lib/Drupal/system/Tests/Form/UrlTest.php index a068adcd939..81d76d179df 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Form/UrlTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Form/UrlTest.php @@ -7,7 +7,7 @@ namespace Drupal\system\Tests\Form; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\simpletest\WebTestBase; /** diff --git a/core/modules/system/tests/Drupal/system/Tests/Controller/SystemControllerTest.php b/core/modules/system/tests/Drupal/system/Tests/Controller/SystemControllerTest.php index fb5dc888e23..a1cdfaf888f 100644 --- a/core/modules/system/tests/Drupal/system/Tests/Controller/SystemControllerTest.php +++ b/core/modules/system/tests/Drupal/system/Tests/Controller/SystemControllerTest.php @@ -7,8 +7,8 @@ namespace Drupal\system\Tests\Controller; +use Drupal\Component\Serialization\Json; use Symfony\Component\HttpFoundation\Request; -use Drupal\Component\Utility\Json; use Drupal\Core\Template\Attribute; use Drupal\system\Controller\SystemController; use Drupal\Tests\UnitTestCase; diff --git a/core/modules/system/tests/modules/form_test/form_test.module b/core/modules/system/tests/modules/form_test/form_test.module index 2c750ab85b4..42ef667a1ce 100644 --- a/core/modules/system/tests/modules/form_test/form_test.module +++ b/core/modules/system/tests/modules/form_test/form_test.module @@ -5,7 +5,7 @@ * Helper module for the form API tests. */ -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Core\Database\Database; use Drupal\Core\Language\Language; use Drupal\form_test\Callbacks; diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php index d07ab4a0375..966d45a5829 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php @@ -7,7 +7,7 @@ namespace Drupal\taxonomy\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\Tags; use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Component\Utility\String; diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewAjaxTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewAjaxTest.php index d8728d1b850..2217fac8b9d 100644 --- a/core/modules/views/lib/Drupal/views/Tests/ViewAjaxTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/ViewAjaxTest.php @@ -6,7 +6,8 @@ */ namespace Drupal\views\Tests; -use Drupal\Component\Utility\Json; + +use Drupal\Component\Serialization\Json; /** * Tests the ajax view functionality. diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php index b3edc9a72e7..a9db9f88f46 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php @@ -7,7 +7,7 @@ namespace Drupal\views_ui\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Component\Utility\String; use Drupal\views\Views; diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/PreviewTest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/PreviewTest.php index d8b6a6501d8..01feff62eda 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/PreviewTest.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/PreviewTest.php @@ -7,7 +7,7 @@ namespace Drupal\views_ui\Tests; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; /** * Tests the preview form in the UI. diff --git a/core/tests/Drupal/Tests/Component/Utility/JsonTest.php b/core/tests/Drupal/Tests/Component/Serialization/JsonTest.php similarity index 95% rename from core/tests/Drupal/Tests/Component/Utility/JsonTest.php rename to core/tests/Drupal/Tests/Component/Serialization/JsonTest.php index c1a8343f3d7..015a14aac3c 100644 --- a/core/tests/Drupal/Tests/Component/Utility/JsonTest.php +++ b/core/tests/Drupal/Tests/Component/Serialization/JsonTest.php @@ -2,18 +2,18 @@ /** * @file - * Contains \Drupal\Tests\Component\Utility\JsonTest. + * Contains \Drupal\Tests\Component\Serialization\JsonTest. */ -namespace Drupal\Tests\Component\Utility; +namespace Drupal\Tests\Component\Serialization; -use Drupal\Component\Utility\Json; +use Drupal\Component\Serialization\Json; use Drupal\Tests\UnitTestCase; /** * Tests the Json::encode() and Json::decode() functions. * - * @see \Drupal\Component\Utility\Json + * @see \Drupal\Component\Serialization\Json */ class JsonTest extends UnitTestCase {