From 43f35cc46bfb1129ce55f5bbbcd1dabbfa8efc73 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Tue, 28 Mar 2023 07:23:11 +0000
Subject: [PATCH] update symfony/yaml to 5.4.21 and use correct method, fixes
 #2468

Closes #2468

Merge request studip/studip!1665
---
 composer.json             |  2 +-
 composer.lock             | 28 ++++++++++++++++------------
 tests/unit/_bootstrap.php |  2 +-
 3 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/composer.json b/composer.json
index 70725412420..d1a839062ed 100644
--- a/composer.json
+++ b/composer.json
@@ -25,7 +25,7 @@
         "tuupola/cors-middleware": "1.2.1",
         "tecnickcom/tcpdf": "^6.3",
         "scssphp/scssphp": "^1.4",
-        "symfony/yaml": "^3.4",
+        "symfony/yaml": "^5.0",
         "mishal/iless": "^2.2",
         "ezyang/htmlpurifier": "^4.13",
         "davefx/phplot": "^6.2",
diff --git a/composer.lock b/composer.lock
index d9dc6237935..0b652cba573 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "4b5b02516381975e2210afd87a34a165",
+    "content-hash": "898310dd65d7d84440e4e3c0c133c763",
     "packages": [
         {
             "name": "algo26-matthias/idna-convert",
@@ -3883,31 +3883,35 @@
         },
         {
             "name": "symfony/yaml",
-            "version": "v3.4.47",
+            "version": "v5.4.21",
             "source": {
                 "type": "git",
                 "url": "https://github.com/symfony/yaml.git",
-                "reference": "88289caa3c166321883f67fe5130188ebbb47094"
+                "reference": "3713e20d93e46e681e51605d213027e48dab3469"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/symfony/yaml/zipball/88289caa3c166321883f67fe5130188ebbb47094",
-                "reference": "88289caa3c166321883f67fe5130188ebbb47094",
+                "url": "https://api.github.com/repos/symfony/yaml/zipball/3713e20d93e46e681e51605d213027e48dab3469",
+                "reference": "3713e20d93e46e681e51605d213027e48dab3469",
                 "shasum": ""
             },
             "require": {
-                "php": "^5.5.9|>=7.0.8",
-                "symfony/polyfill-ctype": "~1.8"
+                "php": ">=7.2.5",
+                "symfony/deprecation-contracts": "^2.1|^3",
+                "symfony/polyfill-ctype": "^1.8"
             },
             "conflict": {
-                "symfony/console": "<3.4"
+                "symfony/console": "<5.3"
             },
             "require-dev": {
-                "symfony/console": "~3.4|~4.0"
+                "symfony/console": "^5.3|^6.0"
             },
             "suggest": {
                 "symfony/console": "For validating YAML files using the lint command"
             },
+            "bin": [
+                "Resources/bin/yaml-lint"
+            ],
             "type": "library",
             "autoload": {
                 "psr-4": {
@@ -3931,10 +3935,10 @@
                     "homepage": "https://symfony.com/contributors"
                 }
             ],
-            "description": "Symfony Yaml Component",
+            "description": "Loads and dumps YAML files",
             "homepage": "https://symfony.com",
             "support": {
-                "source": "https://github.com/symfony/yaml/tree/v3.4.47"
+                "source": "https://github.com/symfony/yaml/tree/v5.4.21"
             },
             "funding": [
                 {
@@ -3950,7 +3954,7 @@
                     "type": "tidelift"
                 }
             ],
-            "time": "2020-10-24T10:57:07+00:00"
+            "time": "2023-02-21T19:46:44+00:00"
         },
         {
             "name": "tecnickcom/tcpdf",
diff --git a/tests/unit/_bootstrap.php b/tests/unit/_bootstrap.php
index 068ba58cf0d..7332094bb55 100644
--- a/tests/unit/_bootstrap.php
+++ b/tests/unit/_bootstrap.php
@@ -81,7 +81,7 @@ StudipFileloader::load(
     true
 );
 
-$config = Symfony\Component\Yaml\Yaml::parse(file_get_contents(__DIR__ .'/../unit.suite.yml'));
+$config = Symfony\Component\Yaml\Yaml::parseFile(__DIR__ .'/../unit.suite.yml');
 
 // connect to database if configured
 if (isset($config['modules']['config']['Db'])) {
-- 
GitLab