mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 20:01:06 +07:00
Add support for PHP 8.1 on par with PHP 8.0
This commit is contained in:
parent
8816b6ff48
commit
96d8c1e901
@ -53,6 +53,18 @@ describe('Config tests', () => {
|
|||||||
expect(linux).toContain('echo "xdebug.mode=coverage"');
|
expect(linux).toContain('echo "xdebug.mode=coverage"');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('checking addCoverage with Xdebug3 on linux', async () => {
|
||||||
|
const linux: string = await coverage.addCoverage('xdebug3', '8.1', 'linux');
|
||||||
|
expect(linux).toContain('add_extension xdebug');
|
||||||
|
expect(linux).toContain('echo "xdebug.mode=coverage"');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('checking addCoverage with Xdebug on linux', async () => {
|
||||||
|
const linux: string = await coverage.addCoverage('xdebug', '8.1', 'linux');
|
||||||
|
expect(linux).toContain('add_extension xdebug');
|
||||||
|
expect(linux).toContain('echo "xdebug.mode=coverage"');
|
||||||
|
});
|
||||||
|
|
||||||
it('checking addCoverage with Xdebug on darwin', async () => {
|
it('checking addCoverage with Xdebug on darwin', async () => {
|
||||||
const darwin: string = await coverage.addCoverage(
|
const darwin: string = await coverage.addCoverage(
|
||||||
'xdebug',
|
'xdebug',
|
||||||
|
@ -165,5 +165,11 @@ describe('Install', () => {
|
|||||||
script = '' + (await install.run());
|
script = '' + (await install.run());
|
||||||
expect(script).toContain('initial script');
|
expect(script).toContain('initial script');
|
||||||
expect(script).toContain('bash darwin.sh 8.0 ' + __dirname);
|
expect(script).toContain('bash darwin.sh 8.0 ' + __dirname);
|
||||||
|
|
||||||
|
setEnv(8.1, 'darwin', '', '', '', '');
|
||||||
|
|
||||||
|
script = '' + (await install.run());
|
||||||
|
expect(script).toContain('initial script');
|
||||||
|
expect(script).toContain('bash darwin.sh 8.1 ' + __dirname);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
25
dist/index.js
vendored
25
dist/index.js
vendored
@ -2314,7 +2314,7 @@ async function addCoverageXdebug(extension, version, os_version, pipe) {
|
|||||||
const log = await utils.addLog('$tick', extension, 'Xdebug enabled as coverage driver', os_version);
|
const log = await utils.addLog('$tick', extension, 'Xdebug enabled as coverage driver', os_version);
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case /^xdebug3$/.test(extension):
|
case /^xdebug3$/.test(extension):
|
||||||
case /^8\.0$/.test(version):
|
case /^8\.\d$/.test(version):
|
||||||
return '\n' + xdebug + '\n' + ini + '\n' + log;
|
return '\n' + xdebug + '\n' + ini + '\n' + log;
|
||||||
case /^xdebug$/.test(extension):
|
case /^xdebug$/.test(extension):
|
||||||
default:
|
default:
|
||||||
@ -2844,9 +2844,8 @@ const utils = __importStar(__webpack_require__(163));
|
|||||||
*
|
*
|
||||||
* @param extension_csv
|
* @param extension_csv
|
||||||
* @param version
|
* @param version
|
||||||
* @param pipe
|
|
||||||
*/
|
*/
|
||||||
async function addExtensionDarwin(extension_csv, version, pipe) {
|
async function addExtensionDarwin(extension_csv, version) {
|
||||||
const extensions = await utils.extensionArray(extension_csv);
|
const extensions = await utils.extensionArray(extension_csv);
|
||||||
let add_script = '\n';
|
let add_script = '\n';
|
||||||
let remove_script = '';
|
let remove_script = '';
|
||||||
@ -2862,7 +2861,7 @@ async function addExtensionDarwin(extension_csv, version, pipe) {
|
|||||||
remove_script += '\nremove_extension ' + ext_name.slice(1);
|
remove_script += '\nremove_extension ' + ext_name.slice(1);
|
||||||
return;
|
return;
|
||||||
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
||||||
// match 5.3blackfire-1.31.0...5.6blackfire-1.31.0, 7.0blackfire-1.31.0...7.4blackfire-1.31.0
|
// match 5.3blackfire-(semver)...5.6blackfire-(semver), 7.0blackfire-(semver)...7.4blackfire-(semver)
|
||||||
// match pdo_oci and oci8
|
// match pdo_oci and oci8
|
||||||
// match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube
|
// match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube
|
||||||
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
||||||
@ -2884,9 +2883,9 @@ async function addExtensionDarwin(extension_csv, version, pipe) {
|
|||||||
case /(5\.[3-6]|7\.0)pcov/.test(version_extension):
|
case /(5\.[3-6]|7\.0)pcov/.test(version_extension):
|
||||||
add_script += await utils.getUnsupportedLog('pcov', version, 'darwin');
|
add_script += await utils.getUnsupportedLog('pcov', version, 'darwin');
|
||||||
return;
|
return;
|
||||||
// match 5.6xdebug to 8.0xdebug, 5.6swoole to 8.0swoole
|
// match 5.6xdebug to 8.9xdebug, 5.6swoole to 7.4swoole
|
||||||
// match 5.6grpc to 7.4grpc, 5.6protobuf to 7.4protobuf
|
// match 5.6grpc to 7.4grpc, 5.6protobuf to 7.4protobuf
|
||||||
// match 7.1pcov to 8.0pcov
|
// match 7.1pcov to 8.9pcov
|
||||||
case /(5\.6|7\.[0-4]|8\.[0-9])xdebug/.test(version_extension):
|
case /(5\.6|7\.[0-4]|8\.[0-9])xdebug/.test(version_extension):
|
||||||
case /(5\.6|7\.[0-4])(grpc|protobuf|swoole)/.test(version_extension):
|
case /(5\.6|7\.[0-4])(grpc|protobuf|swoole)/.test(version_extension):
|
||||||
case /(7\.[1-4]|8\.[0-9])pcov/.test(version_extension):
|
case /(7\.[1-4]|8\.[0-9])pcov/.test(version_extension):
|
||||||
@ -2934,7 +2933,7 @@ async function addExtensionWindows(extension_csv, version) {
|
|||||||
remove_script += '\nRemove-Extension ' + ext_name.slice(1);
|
remove_script += '\nRemove-Extension ' + ext_name.slice(1);
|
||||||
break;
|
break;
|
||||||
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
||||||
// match 5.3blackfire-1.31.0...5.6blackfire-1.31.0, 7.0blackfire-1.31.0...7.4blackfire-1.31.0
|
// match 5.3blackfire-(semver)...5.6blackfire-(semver), 7.0blackfire-(semver)...7.4blackfire-(semver)
|
||||||
// match pdo_oci and oci8
|
// match pdo_oci and oci8
|
||||||
// match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube
|
// match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube
|
||||||
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
||||||
@ -2968,9 +2967,9 @@ async function addExtensionWindows(extension_csv, version) {
|
|||||||
add_script +=
|
add_script +=
|
||||||
'\nAdd-Extension mysql\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
|
'\nAdd-Extension mysql\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
|
||||||
break;
|
break;
|
||||||
// match 7.0mysql..8.0mysql
|
// match 7.0mysql..8.9mysql
|
||||||
// match 7.0mysqli..8.0mysqli
|
// match 7.0mysqli..8.9mysqli
|
||||||
// match 7.0mysqlnd..8.0mysqlnd
|
// match 7.0mysqlnd..8.9mysqlnd
|
||||||
case /[7-8]\.\d(mysql|mysqli|mysqlnd)$/.test(version_extension):
|
case /[7-8]\.\d(mysql|mysqli|mysqlnd)$/.test(version_extension):
|
||||||
add_script += '\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
|
add_script += '\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
|
||||||
break;
|
break;
|
||||||
@ -3010,7 +3009,7 @@ async function addExtensionLinux(extension_csv, version, pipe) {
|
|||||||
remove_script += '\nremove_extension ' + ext_name.slice(1);
|
remove_script += '\nremove_extension ' + ext_name.slice(1);
|
||||||
return;
|
return;
|
||||||
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
||||||
// match 5.3blackfire-1.31.0...5.6blackfire-1.31.0, 7.0blackfire-1.31.0...7.4blackfire-1.31.0
|
// match 5.3blackfire-(semver)...5.6blackfire-(semver), 7.0blackfire-(semver)...7.4blackfire-(semver)
|
||||||
// match 5.3pdo_cubrid...7.2php_cubrid, 5.3cubrid...7.4cubrid
|
// match 5.3pdo_cubrid...7.2php_cubrid, 5.3cubrid...7.4cubrid
|
||||||
// match pdo_oci and oci8
|
// match pdo_oci and oci8
|
||||||
// match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube
|
// match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube
|
||||||
@ -3042,7 +3041,7 @@ async function addExtensionLinux(extension_csv, version, pipe) {
|
|||||||
add_script +=
|
add_script +=
|
||||||
'\nadd_extension_from_source xdebug xdebug/xdebug master --enable-xdebug zend_extension';
|
'\nadd_extension_from_source xdebug xdebug/xdebug master --enable-xdebug zend_extension';
|
||||||
return;
|
return;
|
||||||
// match 8.0xdebug3
|
// match 8.0xdebug3...8.9xdebug3
|
||||||
case /^8\.[0-9]xdebug3$/.test(version_extension):
|
case /^8\.[0-9]xdebug3$/.test(version_extension):
|
||||||
extension = 'xdebug';
|
extension = 'xdebug';
|
||||||
command = command_prefix + version + '-' + extension + pipe;
|
command = command_prefix + version + '-' + extension + pipe;
|
||||||
@ -3094,7 +3093,7 @@ async function addExtension(extension_csv, version, os_version, no_step = false)
|
|||||||
case 'win32':
|
case 'win32':
|
||||||
return script + (await addExtensionWindows(extension_csv, version));
|
return script + (await addExtensionWindows(extension_csv, version));
|
||||||
case 'darwin':
|
case 'darwin':
|
||||||
return script + (await addExtensionDarwin(extension_csv, version, pipe));
|
return script + (await addExtensionDarwin(extension_csv, version));
|
||||||
case 'linux':
|
case 'linux':
|
||||||
return script + (await addExtensionLinux(extension_csv, version, pipe));
|
return script + (await addExtensionLinux(extension_csv, version, pipe));
|
||||||
default:
|
default:
|
||||||
|
@ -32,7 +32,7 @@ export async function addCoverageXdebug(
|
|||||||
);
|
);
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case /^xdebug3$/.test(extension):
|
case /^xdebug3$/.test(extension):
|
||||||
case /^8\.0$/.test(version):
|
case /^8\.\d$/.test(version):
|
||||||
return '\n' + xdebug + '\n' + ini + '\n' + log;
|
return '\n' + xdebug + '\n' + ini + '\n' + log;
|
||||||
case /^xdebug$/.test(extension):
|
case /^xdebug$/.test(extension):
|
||||||
default:
|
default:
|
||||||
|
@ -5,12 +5,10 @@ import * as utils from './utils';
|
|||||||
*
|
*
|
||||||
* @param extension_csv
|
* @param extension_csv
|
||||||
* @param version
|
* @param version
|
||||||
* @param pipe
|
|
||||||
*/
|
*/
|
||||||
export async function addExtensionDarwin(
|
export async function addExtensionDarwin(
|
||||||
extension_csv: string,
|
extension_csv: string,
|
||||||
version: string,
|
version: string
|
||||||
pipe: string
|
|
||||||
): Promise<string> {
|
): Promise<string> {
|
||||||
const extensions: Array<string> = await utils.extensionArray(extension_csv);
|
const extensions: Array<string> = await utils.extensionArray(extension_csv);
|
||||||
let add_script = '\n';
|
let add_script = '\n';
|
||||||
@ -27,7 +25,7 @@ export async function addExtensionDarwin(
|
|||||||
remove_script += '\nremove_extension ' + ext_name.slice(1);
|
remove_script += '\nremove_extension ' + ext_name.slice(1);
|
||||||
return;
|
return;
|
||||||
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
||||||
// match 5.3blackfire-1.31.0...5.6blackfire-1.31.0, 7.0blackfire-1.31.0...7.4blackfire-1.31.0
|
// match 5.3blackfire-(semver)...5.6blackfire-(semver), 7.0blackfire-(semver)...7.4blackfire-(semver)
|
||||||
// match pdo_oci and oci8
|
// match pdo_oci and oci8
|
||||||
// match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube
|
// match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube
|
||||||
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
||||||
@ -66,9 +64,9 @@ export async function addExtensionDarwin(
|
|||||||
case /(5\.[3-6]|7\.0)pcov/.test(version_extension):
|
case /(5\.[3-6]|7\.0)pcov/.test(version_extension):
|
||||||
add_script += await utils.getUnsupportedLog('pcov', version, 'darwin');
|
add_script += await utils.getUnsupportedLog('pcov', version, 'darwin');
|
||||||
return;
|
return;
|
||||||
// match 5.6xdebug to 8.0xdebug, 5.6swoole to 8.0swoole
|
// match 5.6xdebug to 8.9xdebug, 5.6swoole to 7.4swoole
|
||||||
// match 5.6grpc to 7.4grpc, 5.6protobuf to 7.4protobuf
|
// match 5.6grpc to 7.4grpc, 5.6protobuf to 7.4protobuf
|
||||||
// match 7.1pcov to 8.0pcov
|
// match 7.1pcov to 8.9pcov
|
||||||
case /(5\.6|7\.[0-4]|8\.[0-9])xdebug/.test(version_extension):
|
case /(5\.6|7\.[0-4]|8\.[0-9])xdebug/.test(version_extension):
|
||||||
case /(5\.6|7\.[0-4])(grpc|protobuf|swoole)/.test(version_extension):
|
case /(5\.6|7\.[0-4])(grpc|protobuf|swoole)/.test(version_extension):
|
||||||
case /(7\.[1-4]|8\.[0-9])pcov/.test(version_extension):
|
case /(7\.[1-4]|8\.[0-9])pcov/.test(version_extension):
|
||||||
@ -127,7 +125,7 @@ export async function addExtensionWindows(
|
|||||||
remove_script += '\nRemove-Extension ' + ext_name.slice(1);
|
remove_script += '\nRemove-Extension ' + ext_name.slice(1);
|
||||||
break;
|
break;
|
||||||
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
||||||
// match 5.3blackfire-1.31.0...5.6blackfire-1.31.0, 7.0blackfire-1.31.0...7.4blackfire-1.31.0
|
// match 5.3blackfire-(semver)...5.6blackfire-(semver), 7.0blackfire-(semver)...7.4blackfire-(semver)
|
||||||
// match pdo_oci and oci8
|
// match pdo_oci and oci8
|
||||||
// match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube
|
// match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube
|
||||||
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
// match 7.0phalcon3...7.3phalcon3 and 7.2phalcon4...7.4phalcon4
|
||||||
@ -186,9 +184,9 @@ export async function addExtensionWindows(
|
|||||||
add_script +=
|
add_script +=
|
||||||
'\nAdd-Extension mysql\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
|
'\nAdd-Extension mysql\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
|
||||||
break;
|
break;
|
||||||
// match 7.0mysql..8.0mysql
|
// match 7.0mysql..8.9mysql
|
||||||
// match 7.0mysqli..8.0mysqli
|
// match 7.0mysqli..8.9mysqli
|
||||||
// match 7.0mysqlnd..8.0mysqlnd
|
// match 7.0mysqlnd..8.9mysqlnd
|
||||||
case /[7-8]\.\d(mysql|mysqli|mysqlnd)$/.test(version_extension):
|
case /[7-8]\.\d(mysql|mysqli|mysqlnd)$/.test(version_extension):
|
||||||
add_script += '\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
|
add_script += '\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
|
||||||
break;
|
break;
|
||||||
@ -232,7 +230,7 @@ export async function addExtensionLinux(
|
|||||||
remove_script += '\nremove_extension ' + ext_name.slice(1);
|
remove_script += '\nremove_extension ' + ext_name.slice(1);
|
||||||
return;
|
return;
|
||||||
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
// match 5.3blackfire...5.6blackfire, 7.0blackfire...7.4blackfire
|
||||||
// match 5.3blackfire-1.31.0...5.6blackfire-1.31.0, 7.0blackfire-1.31.0...7.4blackfire-1.31.0
|
// match 5.3blackfire-(semver)...5.6blackfire-(semver), 7.0blackfire-(semver)...7.4blackfire-(semver)
|
||||||
// match 5.3pdo_cubrid...7.2php_cubrid, 5.3cubrid...7.4cubrid
|
// match 5.3pdo_cubrid...7.2php_cubrid, 5.3cubrid...7.4cubrid
|
||||||
// match pdo_oci and oci8
|
// match pdo_oci and oci8
|
||||||
// match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube
|
// match 5.3ioncube...7.4ioncube, 7.0ioncube...7.4ioncube
|
||||||
@ -285,7 +283,7 @@ export async function addExtensionLinux(
|
|||||||
add_script +=
|
add_script +=
|
||||||
'\nadd_extension_from_source xdebug xdebug/xdebug master --enable-xdebug zend_extension';
|
'\nadd_extension_from_source xdebug xdebug/xdebug master --enable-xdebug zend_extension';
|
||||||
return;
|
return;
|
||||||
// match 8.0xdebug3
|
// match 8.0xdebug3...8.9xdebug3
|
||||||
case /^8\.[0-9]xdebug3$/.test(version_extension):
|
case /^8\.[0-9]xdebug3$/.test(version_extension):
|
||||||
extension = 'xdebug';
|
extension = 'xdebug';
|
||||||
command = command_prefix + version + '-' + extension + pipe;
|
command = command_prefix + version + '-' + extension + pipe;
|
||||||
@ -348,7 +346,7 @@ export async function addExtension(
|
|||||||
case 'win32':
|
case 'win32':
|
||||||
return script + (await addExtensionWindows(extension_csv, version));
|
return script + (await addExtensionWindows(extension_csv, version));
|
||||||
case 'darwin':
|
case 'darwin':
|
||||||
return script + (await addExtensionDarwin(extension_csv, version, pipe));
|
return script + (await addExtensionDarwin(extension_csv, version));
|
||||||
case 'linux':
|
case 'linux':
|
||||||
return script + (await addExtensionLinux(extension_csv, version, pipe));
|
return script + (await addExtensionLinux(extension_csv, version, pipe));
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user