From 268175050184464b80d31bea8e04a228ce39b4e4 Mon Sep 17 00:00:00 2001 From: webchick <webchick@24967.no-reply.drupal.org> 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 b7f84cb40f4c..d7cf3f092037 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 8602d9bff7af..91081d7e46dc 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 87647894e6de..807179f0d53b 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 f8a2f90b59d9..c29b332b7e95 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 aa40a4edf8c1..ddafc22aae80 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 ca906eaae5e5..f54db910b62a 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 2a3a957ee564..fbe36d2872cb 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 cb07cd4227b8..551b7f2e345d 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 4b71a167d491..94972f210c81 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 30017b01b6a7..80e6b3f52b81 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 f2d45a2df99c..aff000c43eef 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 4e1e6d08798a..fd9368a7c47b 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 39670ccf4cbb..ccac981a0fd1 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 6a45b9d0b82a..74ef6feb17fe 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 e236714f4073..881ee8ecd48e 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 7c7ba59d2b41..ff59b8b04910 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 88d386675775..13b36ff2719a 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 f9e17ebf4498..afb4047df228 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 4ed747e1a2d8..fba36912cb3c 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 ff390e6bac69..e8f679182f8b 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 d679106e859e..15d8ca99860c 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 d54efb405e81..d41738d67938 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 e33aebcbcbc2..3ac369a97742 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 53e5ed760232..b4f1779fd8e0 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 44c5e154a59b..15206f72c13b 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 adff21d4fd91..15ef7f3730d7 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 23dcaec9ba84..50ba5c3fce73 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 308701c5f976..eda620d8053d 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 937b83ccb90d..f6f3da8bbd51 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 28528e17cada..349a14ef51ae 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 dd80f29ffaf3..633d4d6722df 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 b0065918bf8d..634b00409b57 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 021419a7603e..f501ad199d41 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 e6f844f380e6..da5cdeb8dbcd 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 a068adcd939d..81d76d179df3 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 fb5dc888e23e..a1cdfaf888f2 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 2c750ab85b41..42ef667a1ced 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 d07ab4a03753..966d45a58295 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 d8728d1b8501..2217fac8b9d9 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 b3edc9a72e71..a9db9f88f460 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 d8b6a6501d8d..01feff62eda2 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 c1a8343f3d74..015a14aac3c9 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 { -- GitLab