Why:
- TextPassDumper may spawn PHP subprocesses via proc_open() when invoked
with --spawn.
- The script uses pclose() to try and close these, which is incorrect,
because the resource returned by proc_open() should be closed via
proc_close().[1]
- This causes a TypeError on PHP 8.1 and newer.
What:
- Use proc_close() to close the resource instead of pclose().
Test Plan:
- Run `php maintenance/dumpBackup.php --current --stub | php maintenance/dumpTextPass.php --spawn`
on a local test wiki using PHP 8.1 or newer. It should succeed.
[1] https://www.php.net/manual/en/function.proc-open.php
Bug: T382484
Change-Id: I66cd733cdbc1b8bc1470c14851a0700401c36d1e
(cherry picked from commit 8b9c3ab08eddc86032166f5b9dc208e51c2aaebb)