Skip to content

fix: restore PHP config for occ subprocesses - #126

Merged
vitormattos merged 4 commits into
mainfrom
fix/restore-php-config-for-occ
Oct 7, 2026
Merged

vitormattos merged 4 commits into
mainfrom
fix/restore-php-config-for-occ

Conversation

@vitormattos

Copy link
Copy Markdown
Member

Summary

Behat 3.33 restarts itself through composer/xdebug-handler in persistent mode. The built-in server extension now restores PHP configuration for its child server, but NextcloudApiContext::runCommand() still starts php console.php directly under runuser while inheriting the persistent Behat environment.

In LibreSign integration tests this produced PHP_INI_SCAN_DIR='' for occ commands, so Redis/APCu were unavailable even though HTTP requests were fixed.

This PR restores the original PHPRC and PHP_INI_SCAN_DIR recorded by xdebug-handler for occ subprocesses and sets XDEBUG_MODE=off. It also shell-quotes the target run user and adds regression coverage.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
vitormattos merged commit b003bb2 into main Oct 7, 2026
11 checks passed
@vitormattos
vitormattos deleted the fix/restore-php-config-for-occ branch October 7, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant