Repository: pimcore/pimcore (language: php)

Issue:
[Bug]: `Pimcore\Tool\Console::execInBackgroundWindows` - incorrect typehint for `$ouputFile`
### Pimcore version

11.3.0

### Steps to reproduce

1. run command through Process Manager on Windows (I understand the Process Manager is a 3rd party bundle, but the issue is in the typehint in the Pimcore itself)

### Actual Behavior

`Pimcore\Tool\Console::execInBackgroundWindows(): Argument #2 ($outputFile) must be of type string, null given, called in C:\dev\app\vendor\pimcore\pimcore\lib\Tool\Console.php on line 238`

### Expected Behavior

no error

---

Here is a nullable string argument  `$outputFile`
https://github.com/pimcore/pimcore/blob/a96a60244d7d9bb26a0d69500a7075efc6fac686/lib/Tool/Console.php#L239-L243

passed to a method where it is non-nullable:
https://github.com/pimcore/pimcore/blob/a96a60244d7d9bb26a0d69500a7075efc6fac686/lib/Tool/Console.php#L291

Also, it is nullable here:
https://github.com/pimcore/pimcore/blob/a96a60244d7d9bb26a0d69500a7075efc6fac686/lib/Tool/Console.php#L251
[Bug]: `Pimcore\Tool\Console::execInBackgroundWindows` - incorrect typehint for `$ouputFile`
### Pimcore version

11.3.0

### Steps to reproduce

1. run command through Process Manager on Windows (I understand the Process Manager is a 3rd party bundle, but the issue is in the typehint in the Pimcore itself)

### Actual Behavior

`Pimcore\Tool\Console::execInBackgroundWindows(): Argument #2 ($outputFile) must be of type string, null given, called in C:\dev\app\vendor\pimcore\pimcore\lib\Tool\Console.php on line 238`

### Expected Behavior

no error

---

Here is a nullable string argument  `$outputFile`
https://github.com/pimcore/pimcore/blob/a96a60244d7d9bb26a0d69500a7075efc6fac686/lib/Tool/Console.php#L239-L243

passed to a method where it is non-nullable:
https://github.com/pimcore/pimcore/blob/a96a60244d7d9bb26a0d69500a7075efc6fac686/lib/Tool/Console.php#L291

Also, it is nullable here:
https://github.com/pimcore/pimcore/blob/a96a60244d7d9bb26a0d69500a7075efc6fac686/lib/Tool/Console.php#L251


Discussion / hints:
In `execInBackgroundUnix` it is nullable due to `?string`, so only `execInBackgroundWindows` is affected, could you please provide a PR for it so that's "credited" to you?
In `execInBackgroundUnix` it is nullable due to `?string`, so only `execInBackgroundWindows` is affected, could you please provide a PR for it so that's "credited" to you?

Fix patch:
diff --git a/lib/Tool/Console.php b/lib/Tool/Console.php
index 42c5ec5674e..c7d69e398fa 100644
--- a/lib/Tool/Console.php
+++ b/lib/Tool/Console.php
@@ -283,7 +283,7 @@ private static function execInBackgroundUnix(string $cmd, ?string $outputFile, b
         return (int)$pid;
     }
 
-    private static function execInBackgroundWindows(string $cmd, string $outputFile): int
+    private static function execInBackgroundWindows(string $cmd, ?string $outputFile): int
     {
         if (!$outputFile) {
             $outputFile = 'NUL';


Test patch: