mirror of
https://github.com/shivammathur/setup-php.git
synced 2025-07-24 07:39:09 +07:00
Simplify win32 script
- Always specify the PHP install dir - Use default PhpManager functions - Fix CA Authorities (so that HTTPS calls work) - Don't handle the special xdebug case (it's bundled in PhpManager)
This commit is contained in:
25
dist/index.js
vendored
25
dist/index.js
vendored
@ -1648,31 +1648,8 @@ function addExtensionWindows(extension_csv, version) {
|
||||
let script = '\n';
|
||||
yield utils.asyncForEach(extensions, function (extension) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
extension = extension.toLowerCase();
|
||||
// add script to enable extension is already installed along with php
|
||||
let install_command = '';
|
||||
switch (version + extension) {
|
||||
case '7.4xdebug': {
|
||||
const extension_url = 'https://xdebug.org/files/php_xdebug-2.8.0-7.4-vc15.dll';
|
||||
install_command =
|
||||
'Invoke-WebRequest -Uri ' +
|
||||
extension_url +
|
||||
' -OutFile C:\\tools\\php\\ext\\php_xdebug.dll\n';
|
||||
install_command += 'Enable-PhpExtension xdebug';
|
||||
break;
|
||||
}
|
||||
case '7.2xdebug':
|
||||
default:
|
||||
install_command = 'Install-PhpExtension ' + extension;
|
||||
break;
|
||||
}
|
||||
script +=
|
||||
'\nAdd-Extension ' +
|
||||
extension +
|
||||
' "' +
|
||||
install_command +
|
||||
'" ' +
|
||||
(yield utils.getExtensionPrefix(extension));
|
||||
script += '\nAdd-Extension ' + extension;
|
||||
});
|
||||
});
|
||||
return script;
|
||||
|
Reference in New Issue
Block a user