Skip to content

Quote PHP_BINARY and CRUNZ_BIN in closure shell commands#127

Merged
PabloKowalczyk merged 1 commit into
crunzphp:3.9from
eyupcanakman:fix/php-binary-spaces-windows
Mar 9, 2026
Merged

Quote PHP_BINARY and CRUNZ_BIN in closure shell commands#127
PabloKowalczyk merged 1 commit into
crunzphp:3.9from
eyupcanakman:fix/php-binary-spaces-windows

Conversation

@eyupcanakman

Copy link
Copy Markdown
Contributor
Q A
Fixed tickets #109

On Windows, when PHP is installed under a path that contains spaces (e.g.
C:\Program Files\PHP\php.exe), closure-based tasks fail silently.
serializeClosure() in Event.php concatenates PHP_BINARY and CRUNZ_BIN
directly into the shell command string without quoting, so the OS splits the
path at the first space and tries to execute a truncated binary name.

Both values are now wrapped with escapeshellarg(), which adds the appropriate
quoting on every platform. The existing serializeClosure test is updated to
expect the quoted form.

@eyupcanakman eyupcanakman force-pushed the fix/php-binary-spaces-windows branch from f069338 to caa2a86 Compare March 7, 2026 18:11
@PabloKowalczyk

Copy link
Copy Markdown
Member

Thanks @eyupcanakman, since it's a bug fix please target 3.9 branch

@eyupcanakman eyupcanakman changed the base branch from 3.10 to 3.9 March 8, 2026 09:44
@eyupcanakman

Copy link
Copy Markdown
Contributor Author

Rebased onto 3.9, thanks.

@PabloKowalczyk PabloKowalczyk added this to the v3.9 milestone Mar 9, 2026
@PabloKowalczyk PabloKowalczyk added the bug Something isn't working label Mar 9, 2026
@PabloKowalczyk PabloKowalczyk merged commit 80c7433 into crunzphp:3.9 Mar 9, 2026
22 checks passed
@PabloKowalczyk

Copy link
Copy Markdown
Member

Thanks @eyupcanakman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants