setup-php 1.11.2 → 1.11.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +433 -458
  3. package/lib/config.d.ts +3 -0
  4. package/lib/config.js +71 -71
  5. package/lib/config.js.map +1 -1
  6. package/lib/coverage.d.ts +4 -0
  7. package/lib/coverage.js +97 -87
  8. package/lib/coverage.js.map +1 -1
  9. package/lib/extensions.d.ts +4 -0
  10. package/lib/extensions.js +188 -200
  11. package/lib/extensions.js.map +1 -1
  12. package/lib/install.d.ts +2 -0
  13. package/lib/install.js +96 -81
  14. package/lib/install.js.map +1 -1
  15. package/lib/tools.d.ts +18 -0
  16. package/lib/tools.js +306 -386
  17. package/lib/tools.js.map +1 -1
  18. package/lib/utils.d.ts +15 -0
  19. package/lib/utils.js +205 -291
  20. package/lib/utils.js.map +1 -1
  21. package/package.json +66 -56
  22. package/src/config.ts +82 -82
  23. package/src/configs/brew_extensions +28 -0
  24. package/src/configs/php-versions.json +5 -5
  25. package/src/configs/phpunit.json +24 -24
  26. package/src/coverage.ts +146 -146
  27. package/src/extensions.ts +235 -233
  28. package/src/install.ts +104 -104
  29. package/src/scripts/darwin.sh +341 -339
  30. package/src/scripts/ext/gearman.sh +22 -22
  31. package/src/scripts/ext/phalcon.ps1 +55 -55
  32. package/src/scripts/ext/phalcon.sh +70 -70
  33. package/src/scripts/linux.sh +361 -361
  34. package/src/scripts/win32.ps1 +326 -333
  35. package/src/tools.ts +472 -469
  36. package/src/utils.ts +319 -316
  37. package/.eslintrc.json +0 -16
  38. package/.github/CODE_OF_CONDUCT.md +0 -76
  39. package/.github/CONTRIBUTING.md +0 -69
  40. package/.github/FUNDING.yml +0 -7
  41. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -23
  42. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  43. package/.github/PULL_REQUEST_TEMPLATE.md +0 -38
  44. package/.github/SECURITY.md +0 -29
  45. package/.github/workflows/main-workflow.yml +0 -56
  46. package/.github/workflows/node-workflow.yml +0 -47
  47. package/.idea/workspace.xml +0 -113
  48. package/.prettierrc.json +0 -12
  49. package/__tests__/config.test.ts +0 -52
  50. package/__tests__/coverage.test.ts +0 -110
  51. package/__tests__/extensions.test.ts +0 -120
  52. package/__tests__/install.test.ts +0 -181
  53. package/__tests__/tools.test.ts +0 -476
  54. package/__tests__/utils.test.ts +0 -213
  55. package/action.yml +0 -38
  56. package/dist/index.js +0 -2854
  57. package/examples/bedrock.yml +0 -32
  58. package/examples/cakephp-mysql.yml +0 -114
  59. package/examples/cakephp-postgres.yml +0 -112
  60. package/examples/cakephp.yml +0 -92
  61. package/examples/codeigniter.yml +0 -34
  62. package/examples/laravel-mysql.yml +0 -74
  63. package/examples/laravel-postgres.yml +0 -74
  64. package/examples/laravel.yml +0 -42
  65. package/examples/lumen-mysql.yml +0 -74
  66. package/examples/lumen-postgres.yml +0 -74
  67. package/examples/lumen.yml +0 -38
  68. package/examples/phalcon-mysql.yml +0 -74
  69. package/examples/phalcon-postgres.yml +0 -73
  70. package/examples/sage.yml +0 -57
  71. package/examples/slim-framework.yml +0 -34
  72. package/examples/symfony-mysql.yml +0 -56
  73. package/examples/symfony-postgres.yml +0 -54
  74. package/examples/symfony.yml +0 -39
  75. package/examples/yii2-mysql.yml +0 -73
  76. package/examples/yii2-postgres.yml +0 -71
  77. package/examples/zend-framework.yml +0 -36
  78. package/jest.config.js +0 -12
  79. package/lib/sapi.js +0 -64
  80. package/tsconfig.json +0 -18
package/package.json CHANGED
@@ -1,56 +1,66 @@
1
- {
2
- "name": "setup-php",
3
- "version": "1.11.2",
4
- "private": false,
5
- "description": "Setup PHP for use with GitHub Actions",
6
- "main": "lib/install.js",
7
- "scripts": {
8
- "build": "tsc",
9
- "lint": "eslint **/*.ts --cache --fix",
10
- "format": "prettier --write **/*.ts && git add .",
11
- "format-check": "prettier --check **/*.ts",
12
- "release": "ncc build -o dist && git add -f dist/",
13
- "test": "jest"
14
- },
15
- "repository": {
16
- "type": "git",
17
- "url": "git+https://github.com/shivammathur/setup-php.git"
18
- },
19
- "keywords": [
20
- "actions",
21
- "php",
22
- "setup"
23
- ],
24
- "author": "shivammathur",
25
- "license": "MIT",
26
- "dependencies": {
27
- "@actions/core": "^1.4.0",
28
- "@actions/exec": "^1.1.0",
29
- "@actions/io": "^1.1.1",
30
- "fs": "0.0.1-security"
31
- },
32
- "devDependencies": {
33
- "@types/jest": "^26.0.24",
34
- "@types/node": "^16.3.1",
35
- "@typescript-eslint/eslint-plugin": "^4.28.3",
36
- "@typescript-eslint/parser": "^4.28.3",
37
- "@vercel/ncc": "^0.28.6",
38
- "eslint": "^7.30.0",
39
- "eslint-config-prettier": "^8.3.0",
40
- "eslint-plugin-import": "^2.23.4",
41
- "eslint-plugin-jest": "^24.3.6",
42
- "eslint-plugin-prettier": "^3.4.0",
43
- "husky": "^4.3.8",
44
- "jest": "^27.0.6",
45
- "jest-circus": "^27.0.6",
46
- "prettier": "^2.3.2",
47
- "ts-jest": "^27.0.3",
48
- "typescript": "^4.3.5"
49
- },
50
- "husky": {
51
- "skipCI": true,
52
- "hooks": {
53
- "pre-commit": "npm run format && npm run lint && npm run test && npm run build && npm run release"
54
- }
55
- }
56
- }
1
+ {
2
+ "name": "setup-php",
3
+ "version": "1.11.6",
4
+ "private": false,
5
+ "description": "Setup PHP for use with GitHub Actions",
6
+ "main": "lib/install.js",
7
+ "types": "lib/install.d.ts",
8
+ "directories": {
9
+ "lib": "lib",
10
+ "test": "__tests__",
11
+ "src": "src"
12
+ },
13
+ "files": [
14
+ "lib",
15
+ "src"
16
+ ],
17
+ "scripts": {
18
+ "build": "tsc",
19
+ "lint": "eslint **/src/*.ts --cache --fix",
20
+ "format": "prettier --write **/src/*.ts && git add .",
21
+ "format-check": "prettier --check **/src/*.ts",
22
+ "release": "ncc build -o dist && git add -f dist/",
23
+ "test": "jest"
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/shivammathur/setup-php.git"
28
+ },
29
+ "keywords": [
30
+ "actions",
31
+ "php",
32
+ "setup"
33
+ ],
34
+ "author": "shivammathur",
35
+ "license": "MIT",
36
+ "dependencies": {
37
+ "@actions/core": "^1.6.0",
38
+ "@actions/exec": "^1.1.0",
39
+ "@actions/io": "^1.1.1",
40
+ "fs": "0.0.1-security"
41
+ },
42
+ "devDependencies": {
43
+ "@types/jest": "^27.4.0",
44
+ "@types/node": "^17.0.16",
45
+ "@typescript-eslint/eslint-plugin": "^5.11.0",
46
+ "@typescript-eslint/parser": "^5.11.0",
47
+ "@vercel/ncc": "^0.33.1",
48
+ "eslint": "^8.8.0",
49
+ "eslint-config-prettier": "^8.3.0",
50
+ "eslint-plugin-import": "^2.25.4",
51
+ "eslint-plugin-jest": "^26.1.0",
52
+ "eslint-plugin-prettier": "^4.0.0",
53
+ "jest": "^27.5.1",
54
+ "jest-circus": "^27.5.1",
55
+ "prettier": "^2.5.1",
56
+ "simple-git-hooks": "^2.7.0",
57
+ "ts-jest": "^27.1.3",
58
+ "typescript": "^4.5.5"
59
+ },
60
+ "bugs": {
61
+ "url": "https://github.com/shivammathur/setup-php/issues"
62
+ },
63
+ "simple-git-hooks": {
64
+ "pre-commit": "npm run format && npm run lint && npm run test && npm run build && npm run release"
65
+ }
66
+ }
package/src/config.ts CHANGED
@@ -1,82 +1,82 @@
1
- import * as utils from './utils';
2
-
3
- /**
4
- * Add script to set custom ini values for unix
5
- *
6
- * @param ini_values_csv
7
- */
8
- export async function addINIValuesUnix(
9
- ini_values_csv: string
10
- ): Promise<string> {
11
- const ini_values: Array<string> = await utils.CSVArray(ini_values_csv);
12
- let script = '\n';
13
- await utils.asyncForEach(ini_values, async function (line: string) {
14
- script +=
15
- (await utils.addLog('$tick', line, 'Added to php.ini', 'linux')) + '\n';
16
- });
17
- return (
18
- 'echo "' + ini_values.join('\n') + '" >> ${pecl_file:-$ini_file}' + script
19
- );
20
- }
21
-
22
- /**
23
- * Add script to set custom ini values for windows
24
- *
25
- * @param ini_values_csv
26
- */
27
- export async function addINIValuesWindows(
28
- ini_values_csv: string
29
- ): Promise<string> {
30
- const ini_values: Array<string> = await utils.CSVArray(ini_values_csv);
31
- let script = '\n';
32
- await utils.asyncForEach(ini_values, async function (line: string) {
33
- script +=
34
- (await utils.addLog('$tick', line, 'Added to php.ini', 'win32')) + '\n';
35
- });
36
- return (
37
- 'Add-Content C:\\tools\\php\\php.ini "' +
38
- ini_values.join('\n') +
39
- '"' +
40
- script
41
- );
42
- }
43
-
44
- /**
45
- * Function to add custom ini values
46
- *
47
- * @param ini_values_csv
48
- * @param os_version
49
- * @param no_step
50
- */
51
- export async function addINIValues(
52
- ini_values_csv: string,
53
- os_version: string,
54
- no_step = false
55
- ): Promise<string> {
56
- let script = '\n';
57
- switch (no_step) {
58
- case true:
59
- script +=
60
- (await utils.stepLog('Add php.ini values', os_version)) +
61
- (await utils.suppressOutput(os_version)) +
62
- '\n';
63
- break;
64
- case false:
65
- default:
66
- script += (await utils.stepLog('Add php.ini values', os_version)) + '\n';
67
- break;
68
- }
69
- switch (os_version) {
70
- case 'win32':
71
- return script + (await addINIValuesWindows(ini_values_csv));
72
- case 'darwin':
73
- case 'linux':
74
- return script + (await addINIValuesUnix(ini_values_csv));
75
- default:
76
- return await utils.log(
77
- 'Platform ' + os_version + ' is not supported',
78
- os_version,
79
- 'error'
80
- );
81
- }
82
- }
1
+ import * as utils from './utils';
2
+
3
+ /**
4
+ * Add script to set custom ini values for unix
5
+ *
6
+ * @param ini_values_csv
7
+ */
8
+ export async function addINIValuesUnix(
9
+ ini_values_csv: string
10
+ ): Promise<string> {
11
+ const ini_values: Array<string> = await utils.CSVArray(ini_values_csv);
12
+ let script = '\n';
13
+ await utils.asyncForEach(ini_values, async function (line: string) {
14
+ script +=
15
+ (await utils.addLog('$tick', line, 'Added to php.ini', 'linux')) + '\n';
16
+ });
17
+ return (
18
+ 'echo "' + ini_values.join('\n') + '" >> ${pecl_file:-$ini_file}' + script
19
+ );
20
+ }
21
+
22
+ /**
23
+ * Add script to set custom ini values for windows
24
+ *
25
+ * @param ini_values_csv
26
+ */
27
+ export async function addINIValuesWindows(
28
+ ini_values_csv: string
29
+ ): Promise<string> {
30
+ const ini_values: Array<string> = await utils.CSVArray(ini_values_csv);
31
+ let script = '\n';
32
+ await utils.asyncForEach(ini_values, async function (line: string) {
33
+ script +=
34
+ (await utils.addLog('$tick', line, 'Added to php.ini', 'win32')) + '\n';
35
+ });
36
+ return (
37
+ 'Add-Content C:\\tools\\php\\php.ini "' +
38
+ ini_values.join('\n') +
39
+ '"' +
40
+ script
41
+ );
42
+ }
43
+
44
+ /**
45
+ * Function to add custom ini values
46
+ *
47
+ * @param ini_values_csv
48
+ * @param os_version
49
+ * @param no_step
50
+ */
51
+ export async function addINIValues(
52
+ ini_values_csv: string,
53
+ os_version: string,
54
+ no_step = false
55
+ ): Promise<string> {
56
+ let script = '\n';
57
+ switch (no_step) {
58
+ case true:
59
+ script +=
60
+ (await utils.stepLog('Add php.ini values', os_version)) +
61
+ (await utils.suppressOutput(os_version)) +
62
+ '\n';
63
+ break;
64
+ case false:
65
+ default:
66
+ script += (await utils.stepLog('Add php.ini values', os_version)) + '\n';
67
+ break;
68
+ }
69
+ switch (os_version) {
70
+ case 'win32':
71
+ return script + (await addINIValuesWindows(ini_values_csv));
72
+ case 'darwin':
73
+ case 'linux':
74
+ return script + (await addINIValuesUnix(ini_values_csv));
75
+ default:
76
+ return await utils.log(
77
+ 'Platform ' + os_version + ' is not supported',
78
+ os_version,
79
+ 'error'
80
+ );
81
+ }
82
+ }
@@ -0,0 +1,28 @@
1
+ amqp=amqp
2
+ apcu=apcu
3
+ expect=expect
4
+ grpc=grpc
5
+ igbinary=igbinary
6
+ imagick=imagick
7
+ imap=imap
8
+ memcache=memcache
9
+ memcached=memcached
10
+ mongodb=mongodb
11
+ msgpack=msgpack
12
+ pcov=pcov
13
+ pecl_http=http
14
+ phalcon3=phalcon
15
+ phalcon4=phalcon
16
+ propro=propro
17
+ protobuf=protobuf
18
+ psr=psr
19
+ raphf=raphf
20
+ rdkafka=rdkafka
21
+ redis=redis
22
+ ssh2=ssh2
23
+ swoole=swoole
24
+ vips=vips
25
+ xdebug=xdebug
26
+ xdebug2=xdebug
27
+ yaml=yaml
28
+ zmq=zmq
@@ -1,6 +1,6 @@
1
- {
2
- "latest": "8.0",
3
- "5.x": "5.6",
4
- "7.x": "7.4",
5
- "8.x": "8.0"
1
+ {
2
+ "latest": "8.0",
3
+ "5.x": "5.6",
4
+ "7.x": "7.4",
5
+ "8.x": "8.0"
6
6
  }
@@ -1,24 +1,24 @@
1
- {
2
- "problemMatcher": [
3
- {
4
- "owner": "phpunit",
5
- "pattern": [
6
- {
7
- "regexp": "^\\d+\\)\\s.*$"
8
- },
9
- {
10
- "regexp": "^(.*Failed\\sasserting\\sthat.*)$",
11
- "message": 1
12
- },
13
- {
14
- "regexp": "^\\s*$"
15
- },
16
- {
17
- "regexp": "^(.*):(\\d+)$",
18
- "file": 1,
19
- "line": 2
20
- }
21
- ]
22
- }
23
- ]
24
- }
1
+ {
2
+ "problemMatcher": [
3
+ {
4
+ "owner": "phpunit",
5
+ "pattern": [
6
+ {
7
+ "regexp": "^\\d+\\)\\s.*$"
8
+ },
9
+ {
10
+ "regexp": "^(.*Failed\\sasserting\\sthat.*)$",
11
+ "message": 1
12
+ },
13
+ {
14
+ "regexp": "^\\s*$"
15
+ },
16
+ {
17
+ "regexp": "^(.*):(\\d+)$",
18
+ "file": 1,
19
+ "line": 2
20
+ }
21
+ ]
22
+ }
23
+ ]
24
+ }
package/src/coverage.ts CHANGED
@@ -1,146 +1,146 @@
1
- import * as utils from './utils';
2
- import * as extensions from './extensions';
3
- import * as config from './config';
4
-
5
- export async function addCoverageXdebug(
6
- extension: string,
7
- version: string,
8
- os_version: string,
9
- pipe: string
10
- ): Promise<string> {
11
- const xdebug =
12
- (await extensions.addExtension(extension, version, os_version, true)) +
13
- pipe;
14
- const log = await utils.addLog(
15
- '$tick',
16
- extension,
17
- 'Xdebug enabled as coverage driver',
18
- os_version
19
- );
20
- return xdebug + '\n' + log;
21
- }
22
-
23
- /**
24
- * Function to setup PCOV
25
- *
26
- * @param version
27
- * @param os_version
28
- * @param pipe
29
- */
30
- export async function addCoveragePCOV(
31
- version: string,
32
- os_version: string,
33
- pipe: string
34
- ): Promise<string> {
35
- let script = '\n';
36
- switch (version) {
37
- default:
38
- script +=
39
- (await extensions.addExtension('pcov', version, os_version, true)) +
40
- pipe +
41
- '\n';
42
- script +=
43
- (await config.addINIValues('pcov.enabled=1', os_version, true)) + '\n';
44
-
45
- // add command to disable xdebug and enable pcov
46
- switch (os_version) {
47
- case 'linux':
48
- case 'darwin':
49
- script += 'remove_extension xdebug' + pipe + '\n';
50
- break;
51
- case 'win32':
52
- script += 'Remove-Extension xdebug' + pipe + '\n';
53
- break;
54
- }
55
-
56
- // success
57
- script += await utils.addLog(
58
- '$tick',
59
- 'coverage: pcov',
60
- 'PCOV enabled as coverage driver',
61
- os_version
62
- );
63
- // version is not supported
64
- break;
65
- case '5.6':
66
- case '7.0':
67
- script += await utils.addLog(
68
- '$cross',
69
- 'pcov',
70
- 'PHP 7.1 or newer is required',
71
- os_version
72
- );
73
- break;
74
- }
75
-
76
- return script;
77
- }
78
-
79
- /**
80
- * Function to disable Xdebug and PCOV
81
- *
82
- * @param version
83
- * @param os_version
84
- * @param pipe
85
- */
86
- export async function disableCoverage(
87
- version: string,
88
- os_version: string,
89
- pipe: string
90
- ): Promise<string> {
91
- let script = '\n';
92
- switch (os_version) {
93
- case 'linux':
94
- case 'darwin':
95
- script += 'remove_extension xdebug' + pipe + '\n';
96
- script += 'remove_extension pcov' + pipe + '\n';
97
- break;
98
- case 'win32':
99
- script += 'Remove-Extension xdebug' + pipe + '\n';
100
- script += 'Remove-Extension pcov' + pipe + '\n';
101
- break;
102
- }
103
- script += await utils.addLog(
104
- '$tick',
105
- 'none',
106
- 'Disabled Xdebug and PCOV',
107
- os_version
108
- );
109
-
110
- return script;
111
- }
112
-
113
- /**
114
- * Function to set coverage driver
115
- *
116
- * @param coverage_driver
117
- * @param version
118
- * @param os_version
119
- */
120
- export async function addCoverage(
121
- coverage_driver: string,
122
- version: string,
123
- os_version: string
124
- ): Promise<string> {
125
- coverage_driver = coverage_driver.toLowerCase();
126
- const script: string =
127
- '\n' + (await utils.stepLog('Setup Coverage', os_version));
128
- const pipe: string = await utils.suppressOutput(os_version);
129
- switch (coverage_driver) {
130
- case 'pcov':
131
- return script + (await addCoveragePCOV(version, os_version, pipe));
132
- case 'xdebug':
133
- case 'xdebug3':
134
- return (
135
- script + (await addCoverageXdebug('xdebug', version, os_version, pipe))
136
- );
137
- case 'xdebug2':
138
- return (
139
- script + (await addCoverageXdebug('xdebug2', version, os_version, pipe))
140
- );
141
- case 'none':
142
- return script + (await disableCoverage(version, os_version, pipe));
143
- default:
144
- return '';
145
- }
146
- }
1
+ import * as utils from './utils';
2
+ import * as extensions from './extensions';
3
+ import * as config from './config';
4
+
5
+ export async function addCoverageXdebug(
6
+ extension: string,
7
+ version: string,
8
+ os_version: string,
9
+ pipe: string
10
+ ): Promise<string> {
11
+ const xdebug =
12
+ (await extensions.addExtension(extension, version, os_version, true)) +
13
+ pipe;
14
+ const log = await utils.addLog(
15
+ '$tick',
16
+ extension,
17
+ 'Xdebug enabled as coverage driver',
18
+ os_version
19
+ );
20
+ return xdebug + '\n' + log;
21
+ }
22
+
23
+ /**
24
+ * Function to setup PCOV
25
+ *
26
+ * @param version
27
+ * @param os_version
28
+ * @param pipe
29
+ */
30
+ export async function addCoveragePCOV(
31
+ version: string,
32
+ os_version: string,
33
+ pipe: string
34
+ ): Promise<string> {
35
+ let script = '\n';
36
+ switch (version) {
37
+ default:
38
+ script +=
39
+ (await extensions.addExtension('pcov', version, os_version, true)) +
40
+ pipe +
41
+ '\n';
42
+ script +=
43
+ (await config.addINIValues('pcov.enabled=1', os_version, true)) + '\n';
44
+
45
+ // add command to disable xdebug and enable pcov
46
+ switch (os_version) {
47
+ case 'linux':
48
+ case 'darwin':
49
+ script += 'remove_extension xdebug' + pipe + '\n';
50
+ break;
51
+ case 'win32':
52
+ script += 'Remove-Extension xdebug' + pipe + '\n';
53
+ break;
54
+ }
55
+
56
+ // success
57
+ script += await utils.addLog(
58
+ '$tick',
59
+ 'coverage: pcov',
60
+ 'PCOV enabled as coverage driver',
61
+ os_version
62
+ );
63
+ // version is not supported
64
+ break;
65
+ case '5.6':
66
+ case '7.0':
67
+ script += await utils.addLog(
68
+ '$cross',
69
+ 'pcov',
70
+ 'PHP 7.1 or newer is required',
71
+ os_version
72
+ );
73
+ break;
74
+ }
75
+
76
+ return script;
77
+ }
78
+
79
+ /**
80
+ * Function to disable Xdebug and PCOV
81
+ *
82
+ * @param version
83
+ * @param os_version
84
+ * @param pipe
85
+ */
86
+ export async function disableCoverage(
87
+ version: string,
88
+ os_version: string,
89
+ pipe: string
90
+ ): Promise<string> {
91
+ let script = '\n';
92
+ switch (os_version) {
93
+ case 'linux':
94
+ case 'darwin':
95
+ script += 'remove_extension xdebug' + pipe + '\n';
96
+ script += 'remove_extension pcov' + pipe + '\n';
97
+ break;
98
+ case 'win32':
99
+ script += 'Remove-Extension xdebug' + pipe + '\n';
100
+ script += 'Remove-Extension pcov' + pipe + '\n';
101
+ break;
102
+ }
103
+ script += await utils.addLog(
104
+ '$tick',
105
+ 'none',
106
+ 'Disabled Xdebug and PCOV',
107
+ os_version
108
+ );
109
+
110
+ return script;
111
+ }
112
+
113
+ /**
114
+ * Function to set coverage driver
115
+ *
116
+ * @param coverage_driver
117
+ * @param version
118
+ * @param os_version
119
+ */
120
+ export async function addCoverage(
121
+ coverage_driver: string,
122
+ version: string,
123
+ os_version: string
124
+ ): Promise<string> {
125
+ coverage_driver = coverage_driver.toLowerCase();
126
+ const script: string =
127
+ '\n' + (await utils.stepLog('Setup Coverage', os_version));
128
+ const pipe: string = await utils.suppressOutput(os_version);
129
+ switch (coverage_driver) {
130
+ case 'pcov':
131
+ return script + (await addCoveragePCOV(version, os_version, pipe));
132
+ case 'xdebug':
133
+ case 'xdebug3':
134
+ return (
135
+ script + (await addCoverageXdebug('xdebug', version, os_version, pipe))
136
+ );
137
+ case 'xdebug2':
138
+ return (
139
+ script + (await addCoverageXdebug('xdebug2', version, os_version, pipe))
140
+ );
141
+ case 'none':
142
+ return script + (await disableCoverage(version, os_version, pipe));
143
+ default:
144
+ return '';
145
+ }
146
+ }