File: Fixed-some-PHP8.4-deprecations.patch

package info (click to toggle)
phing 3.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 9,868 kB
  • sloc: php: 59,850; xml: 9,713; sql: 78; makefile: 39; sh: 14
file content (44 lines) | stat: -rw-r--r-- 1,659 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
From: Juris Malinens <juris.malinens@inbox.lv>
Date: Mon, 16 Dec 2024 20:04:30 +0200
Subject: Fixed some PHP8.4 deprecations

Co-authored-by: Juris Malinens <juris.malinens@co.inbox.lv>

Origin: upstream
Forwarded: https://github.com/phingofficial/phing/commit/90bac4703258d1efd055cca8c03e4a7091f76c92
Acked-by: William Desportes <williamdes@wdes.fr>
---
 src/Phing/Io/FileUtils.php          | 2 +-
 src/Phing/Parser/ElementHandler.php | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Phing/Io/FileUtils.php b/src/Phing/Io/FileUtils.php
index 9456844..24f654b 100644
--- a/src/Phing/Io/FileUtils.php
+++ b/src/Phing/Io/FileUtils.php
@@ -462,7 +462,7 @@ class FileUtils
     public function createTempFile(
         $prefix,
         $suffix,
-        File $parentDir = null,
+        ?File $parentDir = null,
         $deleteOnExit = false,
         $createFile = false
     ): File {
diff --git a/src/Phing/Parser/ElementHandler.php b/src/Phing/Parser/ElementHandler.php
index e950196..9e0c37a 100644
--- a/src/Phing/Parser/ElementHandler.php
+++ b/src/Phing/Parser/ElementHandler.php
@@ -93,9 +93,9 @@ class ElementHandler extends AbstractHandler
         AbstractSAXParser $parser,
         AbstractHandler $parentHandler,
         ProjectConfigurator $configurator,
-        UnknownElement $parent = null,
-        RuntimeConfigurable $parentWrapper = null,
-        Target $target = null
+        ?UnknownElement $parent = null,
+        ?RuntimeConfigurable $parentWrapper = null,
+        ?Target $target = null
     ) {
         parent::__construct($parser, $parentHandler);
         $this->configurator = $configurator;