File: 0007-Upgrade-symfony-dependencies.patch

package info (click to toggle)
matomo 5.3.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 72,652 kB
  • sloc: php: 230,070; javascript: 103,748; python: 196; xml: 188; sh: 156; makefile: 13; sql: 10
file content (85 lines) | stat: -rw-r--r-- 3,399 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
From: William Desportes <williamdes@wdes.fr>
Date: Sun, 15 Dec 2024 11:52:25 +0100
Subject: Upgrade symfony/* dependencies

https://github.com/symfony/monolog-bridge/compare/5.4...6.4
https://github.com/symfony/console/compare/5.4...6.4
https://github.com/symfony/event-dispatcher/compare/5.4...6.4

Most probably there is more code to patch before upstreaming this.

The event-dispatcher Changelog seems okay.

Origin: vendor
Forwarded: no
---
 composer.json                                  | 8 ++++----
 core/Plugin/ConsoleCommand.php                 | 6 +++---
 plugins/Monolog/Formatter/ConsoleFormatter.php | 2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/composer.json b/composer.json
index cd897b2..0963a9d 100644
--- a/composer.json
+++ b/composer.json
@@ -60,12 +60,12 @@
         "php-di/php-di": "^6.0.0",
         "phpmailer/phpmailer": "^6.1",
         "psr/log": "~1.0",
-        "symfony/console": "~5.4.0",
-        "symfony/event-dispatcher": "~5.4.0",
-        "symfony/monolog-bridge": "~5.4.0",
+        "symfony/console": "^6.4",
+        "symfony/event-dispatcher": "^6.4",
+        "symfony/monolog-bridge": "^6.4",
         "symfony/polyfill-iconv": "^1.20",
         "symfony/polyfill-mbstring": "^1.20",
-        "symfony/process": "~5.4.0",
+        "symfony/process": "^6.4",
         "szymach/c-pchart": "~3.0.13",
         "tecnickcom/tcpdf": "~6.0",
         "tedivm/jshrink": "^1.7.0",
diff --git a/core/Plugin/ConsoleCommand.php b/core/Plugin/ConsoleCommand.php
index 369c665..3f55c0f 100644
--- a/core/Plugin/ConsoleCommand.php
+++ b/core/Plugin/ConsoleCommand.php
@@ -295,7 +295,7 @@ class ConsoleCommand extends SymfonyCommand implements SignalableCommandInterfac
         ?int $mode = null,
         string $description = '',
         $default = null
-    ) {
+    ): static {
         throw new \LogicException('addOption should not be used.');
     }
 
@@ -342,7 +342,7 @@ class ConsoleCommand extends SymfonyCommand implements SignalableCommandInterfac
      *
      * @see addOptionalArgument, addRequiredArgument
      */
-    public function addArgument(string $name, ?int $mode = null, string $description = '', $default = null)
+    public function addArgument(string $name, ?int $mode = null, string $description = '', $default = null): static
     {
         throw new \LogicException('addArgument can not be used.');
     }
@@ -434,7 +434,7 @@ class ConsoleCommand extends SymfonyCommand implements SignalableCommandInterfac
      *
      * @see askAndValidate(), askForConfirmation(), ask(), initProgressBar(), startProgressBar(), advanceProgressBar(), finishProgressBar(), renderTable()
      */
-    public function getHelper(string $name)
+    public function getHelper(string $name): mixed
     {
         throw new \LogicException('getHelper can not be used');
     }
diff --git a/plugins/Monolog/Formatter/ConsoleFormatter.php b/plugins/Monolog/Formatter/ConsoleFormatter.php
index a32a7bf..be194be 100644
--- a/plugins/Monolog/Formatter/ConsoleFormatter.php
+++ b/plugins/Monolog/Formatter/ConsoleFormatter.php
@@ -13,7 +13,7 @@ use Symfony\Bridge\Monolog\Formatter\ConsoleFormatter as SymfonyConsoleFormatter
 
 class ConsoleFormatter extends SymfonyConsoleFormatter
 {
-    public function format(array $record)
+    public function format(array $record): mixed
     {
         $formatted = parent::format($record);