diff --git a/src/Composer/EventDispatcher/EventDispatcher.php b/src/Composer/EventDispatcher/EventDispatcher.php index 63ef134aa..cd815112b 100644 --- a/src/Composer/EventDispatcher/EventDispatcher.php +++ b/src/Composer/EventDispatcher/EventDispatcher.php @@ -257,9 +257,11 @@ class EventDispatcher throw new \RuntimeException('Failed to locate PHP binary to execute '.$scriptName); } - $memoryFlag = ' -d memory_limit='.ini_get('memory_limit'); + $allowUrlFOpenFlag = ' -d allow_url_fopen=' . ini_get('allow_url_fopen'); + $disableFunctionsFlag = ' -d disable_functions="' . ini_get('disable_functions') . '"'; + $memoryLimitFlag = ' -d memory_limit=' . ini_get('memory_limit'); - return ProcessExecutor::escape($phpPath) . $memoryFlag; + return ProcessExecutor::escape($phpPath) . $allowUrlFOpenFlag . $disableFunctionsFlag . $memoryLimitFlag; } /** diff --git a/src/Composer/XdebugHandler.php b/src/Composer/XdebugHandler.php index dae3ee840..f7fd8c2a1 100644 --- a/src/Composer/XdebugHandler.php +++ b/src/Composer/XdebugHandler.php @@ -174,6 +174,8 @@ class XdebugHandler $content .= $data.PHP_EOL; } + $content .= 'allow_url_fopen='.ini_get('allow_url_fopen').PHP_EOL; + $content .= 'disable_functions="'.ini_get('disable_functions').'"'.PHP_EOL; $content .= 'memory_limit='.ini_get('memory_limit').PHP_EOL; if (defined('PHP_WINDOWS_VERSION_BUILD')) {