From 8b4d973cd3ff32940287c8e66f99059f5d78230a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tobias=20St=C3=B6ckler?= <tobiasstoeckler@googlemail.com>
Date: Fri, 13 Nov 2015 19:30:00 +0100
Subject: [PATCH] by tstoeckler: Revert the decision to switch from YAML to
 JSON

---
 libraries.services.yml                              |  3 +--
 tests/library_definitions/test_asset_library.json   | 13 -------------
 tests/library_definitions/test_asset_library.yml    |  8 ++++++++
 .../library_definitions/test_php_file_library.json  |  7 -------
 tests/library_definitions/test_php_file_library.yml |  3 +++
 5 files changed, 12 insertions(+), 22 deletions(-)
 delete mode 100644 tests/library_definitions/test_asset_library.json
 create mode 100644 tests/library_definitions/test_asset_library.yml
 delete mode 100644 tests/library_definitions/test_php_file_library.json
 create mode 100644 tests/library_definitions/test_php_file_library.yml

diff --git a/libraries.services.yml b/libraries.services.yml
index 6da6e3a..ffa6bbb 100644
--- a/libraries.services.yml
+++ b/libraries.services.yml
@@ -7,8 +7,7 @@ services:
       - '@libraries.php_file_loader'
   libraries.registry:
     class: Drupal\libraries\ExternalLibrary\Registry\ExternalLibraryRegistry
-    # @todo Reconsider the decision to go with JSON instead of YAML.
-    arguments: ['@serialization.json', '@plugin.manager.libraries.locator']
+    arguments: ['@serialization.yaml', '@plugin.manager.libraries.locator']
   plugin.manager.libraries.locator:
     class: Drupal\libraries\ExternalLibrary\Local\LocatorManager
     parent: default_plugin_manager
diff --git a/tests/library_definitions/test_asset_library.json b/tests/library_definitions/test_asset_library.json
deleted file mode 100644
index da7eeee..0000000
--- a/tests/library_definitions/test_asset_library.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
-  "id": "test_asset_library",
-  "class": "Drupal\\libraries\\ExternalLibrary\\Asset\\AssetLibrary",
-  "remote_url": "http://example.com",
-  "css": {
-    "base": {
-      "example.css": []
-    }
-  },
-  "js": {
-    "example.js": []
-  }
-}
diff --git a/tests/library_definitions/test_asset_library.yml b/tests/library_definitions/test_asset_library.yml
new file mode 100644
index 0000000..e00036e
--- /dev/null
+++ b/tests/library_definitions/test_asset_library.yml
@@ -0,0 +1,8 @@
+id: test_asset_library
+class: Drupal\libraries\ExternalLibrary\Asset\AssetLibrary
+remote_url: http://example.com
+css:
+  base:
+    example.css: {  }
+js:
+  example.js: {  }
diff --git a/tests/library_definitions/test_php_file_library.json b/tests/library_definitions/test_php_file_library.json
deleted file mode 100644
index 7301a04..0000000
--- a/tests/library_definitions/test_php_file_library.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-  "id": "test_php_file_library",
-  "class": "Drupal\\libraries\\ExternalLibrary\\PhpFile\\PhpFileLibrary",
-  "files": [
-    "test_php_file_library.php"
-  ]
-}
diff --git a/tests/library_definitions/test_php_file_library.yml b/tests/library_definitions/test_php_file_library.yml
new file mode 100644
index 0000000..4d1e423
--- /dev/null
+++ b/tests/library_definitions/test_php_file_library.yml
@@ -0,0 +1,3 @@
+id: test_php_file_library
+class: Drupal\libraries\ExternalLibrary\PhpFile\PhpFileLibrary
+files: [test_php_file_library.php]
-- 
GitLab