Windows task execution fix and refactored system task registry - #2429
Open
elcreator wants to merge 2 commits into
Open
Windows task execution fix and refactored system task registry#2429elcreator wants to merge 2 commits into
elcreator wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#2428 should be merged first
Fix 1 — Composer detection on Windows
Turned out to need three parts, not one. The third only surfaced because I tested instead of assuming:
needs php in front, and this list feeds a directly-executed command.
is_executable()=false). Without this, every Windows candidate would be rejected no matter which paths I added, and fix 2 of 3 would have been silently useless.
One design change mid-way: I first made composerBinaryCandidates() switch on platform, which broke the existing test site updater checks user local composer path as a fallback (it asserts the POSIX path is present, and passed
on Windows before). Candidates are filtered by existence anyway, so I made the list a superset instead — an impossible entry costs one is_file() call, and a platform branch is just a new way to guess wrong under WSL.
Fix 2 — PostgreSQL backup on Windows
PGPASSWORD=… pg_dump … >> file via exec() replaced with Symfony Process taking an argument list and ['PGPASSWORD' => $password] as env. Verified the old form fails here: 'PGPASSWORD' is not recognized as an internal or
external command.
I kept it streaming. The shell redirect it replaces streamed to disk; getOutput() would have buffered an entire database dump in memory, which would have been a regression on exactly the databases worth backing up. The run
callback writes each chunk to an append handle. Also added clearstatcache() before the filesize() check, which the shell version didn't need.