From e81872b9f437de3a1d3cb91fc44a329cd88f450f Mon Sep 17 00:00:00 2001 From: Lars Strojny Date: Sat, 18 Mar 2023 13:20:34 +0100 Subject: [PATCH] Set PHP_INI_SCAN_DIR only if not set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only set PHP_INI_SCAN_DIR if it isn’t set yet. This is so that users can provide there own PHP_INI_SCAN_DIR, e.g. to restart the current PHP process without xdebug. For example, composer/xdebug-handler uses this mechanism to turn off xdebug (https://github.com/composer/xdebug-handler/blob/cf19e3380ffd84cea4a2cbfcc599ea07ef01f18a/src/XdebugHandler.php#L441) --- pkgs/development/interpreters/php/generic.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/interpreters/php/generic.nix b/pkgs/development/interpreters/php/generic.nix index 74dedcfe2d1..eb75606273b 100644 --- a/pkgs/development/interpreters/php/generic.nix +++ b/pkgs/development/interpreters/php/generic.nix @@ -170,19 +170,19 @@ let ln -s ${extraInit} $out/lib/php.ini if test -e $out/bin/php; then - wrapProgram $out/bin/php --set PHP_INI_SCAN_DIR $out/lib + wrapProgram $out/bin/php --set-default PHP_INI_SCAN_DIR $out/lib fi if test -e $out/bin/php-fpm; then - wrapProgram $out/bin/php-fpm --set PHP_INI_SCAN_DIR $out/lib + wrapProgram $out/bin/php-fpm --set-default PHP_INI_SCAN_DIR $out/lib fi if test -e $out/bin/phpdbg; then - wrapProgram $out/bin/phpdbg --set PHP_INI_SCAN_DIR $out/lib + wrapProgram $out/bin/phpdbg --set-default PHP_INI_SCAN_DIR $out/lib fi if test -e $out/bin/php-cgi; then - wrapProgram $out/bin/php-cgi --set PHP_INI_SCAN_DIR $out/lib + wrapProgram $out/bin/php-cgi --set-default PHP_INI_SCAN_DIR $out/lib fi ''; };