Fix xdebug setup

Co-authored-by: Owen Voke <development@voke.dev>
Co-authored-by: Shivam Mathur <shivam_jpr@hotmail.com>
This commit is contained in:
Shivam Mathur
2020-11-26 23:11:52 +05:30
parent 790a41a722
commit 5a40a5875d
5 changed files with 29 additions and 16 deletions

View File

@ -30,14 +30,7 @@ export async function addCoverageXdebug(
'Xdebug enabled as coverage driver',
os_version
);
switch (true) {
case /^xdebug3$/.test(extension):
case /^8\.\d$/.test(version):
return '\n' + xdebug + '\n' + ini + '\n' + log;
case /^xdebug$/.test(extension):
default:
return xdebug + '\n' + log;
}
return [xdebug, ini, log].join('\n');
}
/**

View File

@ -164,6 +164,9 @@ export async function addExtensionWindows(
);
break;
// match 5.3pcov to 7.0pcov
case /7\.2xdebug/.test(version_extension):
add_script += '\nAdd-Extension xdebug stable 2.9.8';
break;
case /(5\.[3-6]|7\.0)pcov/.test(version_extension):
add_script += await utils.getUnsupportedLog('pcov', version, 'win32');
break;
@ -269,6 +272,15 @@ export async function addExtensionLinux(
add_script +=
'\nadd_extension_from_source xdebug xdebug/xdebug master --enable-xdebug zend_extension';
return;
// match 7.2xdebug
case /^7\.2xdebug$/.test(version_extension):
add_script += await utils.joins(
'\nadd_pecl_extension',
ext_name,
'2.9.8',
ext_prefix
);
break;
// match 8.0xdebug3...8.9xdebug3
case /^8\.[0-9]xdebug3$/.test(version_extension):
extension = 'xdebug';