setup-php 2.13.0 → 2.17.0
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.
- package/LICENSE +21 -21
- package/README.md +990 -922
- package/lib/config.d.ts +3 -0
- package/lib/config.js +71 -71
- package/lib/config.js.map +1 -1
- package/lib/coverage.d.ts +5 -0
- package/lib/coverage.js +97 -87
- package/lib/coverage.js.map +1 -1
- package/lib/extensions.d.ts +4 -0
- package/lib/extensions.js +214 -200
- package/lib/extensions.js.map +1 -1
- package/lib/fetch.d.ts +1 -0
- package/lib/fetch.js +63 -0
- package/lib/fetch.js.map +1 -0
- package/lib/install.d.ts +2 -0
- package/lib/install.js +75 -81
- package/lib/install.js.map +1 -1
- package/lib/tools.d.ts +23 -0
- package/lib/tools.js +367 -386
- package/lib/tools.js.map +1 -1
- package/lib/utils.d.ts +21 -0
- package/lib/utils.js +261 -291
- package/lib/utils.js.map +1 -1
- package/package.json +67 -56
- package/src/config.ts +82 -82
- package/src/configs/brew_extensions +31 -0
- package/src/configs/composer.env +2 -0
- package/src/configs/ini/jit.ini +3 -0
- package/src/configs/ini/php.ini +2 -0
- package/src/configs/ini/xdebug.ini +1 -0
- package/src/configs/os_releases.csv +19 -17
- package/src/configs/php-versions.json +6 -5
- package/src/configs/php_packages +12 -0
- package/src/configs/{php.json → pm/php.json} +29 -29
- package/src/configs/{phpunit.json → pm/phpunit.json} +24 -24
- package/src/configs/tools.json +278 -235
- package/src/configs/tools_schema.json +125 -114
- package/src/coverage.ts +144 -142
- package/src/extensions.ts +367 -349
- package/src/fetch.ts +54 -0
- package/src/install.ts +66 -82
- package/src/scripts/darwin.sh +285 -249
- package/src/scripts/extensions/add_extensions.ps1 +194 -0
- package/src/scripts/extensions/add_extensions.sh +184 -0
- package/src/scripts/{ext → extensions}/blackfire.ps1 +32 -32
- package/src/scripts/{ext → extensions}/blackfire.sh +22 -21
- package/src/scripts/{ext → extensions}/couchbase.sh +43 -43
- package/src/scripts/{ext → extensions}/cubrid.sh +60 -60
- package/src/scripts/extensions/extension_map.php +132 -0
- package/src/scripts/{ext → extensions}/firebird.ps1 +19 -19
- package/src/scripts/{ext → extensions}/firebird.sh +39 -35
- package/src/scripts/{ext → extensions}/gearman.sh +22 -22
- package/src/scripts/{ext → extensions}/geos.sh +17 -17
- package/src/scripts/{ext → extensions}/http.ps1 +54 -54
- package/src/scripts/{ext → extensions}/http.sh +109 -120
- package/src/scripts/{ext → extensions}/intl.sh +23 -23
- package/src/scripts/{ext → extensions}/ioncube.ps1 +33 -32
- package/src/scripts/{ext → extensions}/ioncube.sh +21 -19
- package/src/scripts/{ext → extensions}/oci.ps1 +85 -60
- package/src/scripts/{ext → extensions}/oci.sh +65 -63
- package/src/scripts/{ext → extensions}/patches/firebird.sh +11 -11
- package/src/scripts/{ext → extensions}/patches/geos.sh +7 -7
- package/src/scripts/{ext → extensions}/patches/http.sh +11 -11
- package/src/scripts/{ext → extensions}/patches/pdo_oci.sh +6 -6
- package/src/scripts/{ext → extensions}/patches/phpize.sh +26 -26
- package/src/scripts/{ext → extensions}/patches/protobuf.sh +4 -4
- package/src/scripts/{ext → extensions}/phalcon.ps1 +54 -54
- package/src/scripts/{ext → extensions}/phalcon.sh +58 -58
- package/src/scripts/{ext → extensions}/source.sh +145 -144
- package/src/scripts/extensions/sqlsrv.sh +15 -0
- package/src/scripts/linux.sh +269 -256
- package/src/scripts/tools/add_tools.ps1 +239 -26
- package/src/scripts/tools/add_tools.sh +175 -20
- package/src/scripts/tools/blackfire.ps1 +19 -19
- package/src/scripts/tools/blackfire.sh +40 -39
- package/src/scripts/tools/grpc_php_plugin.ps1 +21 -21
- package/src/scripts/tools/grpc_php_plugin.sh +58 -58
- package/src/scripts/tools/ppa.sh +192 -151
- package/src/scripts/tools/protoc.ps1 +38 -38
- package/src/scripts/tools/protoc.sh +28 -28
- package/src/scripts/tools/symfony.ps1 +14 -0
- package/src/scripts/tools/symfony.sh +13 -0
- package/src/scripts/unix.sh +186 -0
- package/src/scripts/win32.ps1 +352 -494
- package/src/tools.ts +512 -538
- package/src/utils.ts +415 -500
- package/.eslintrc.json +0 -16
- package/.github/CODE_OF_CONDUCT.md +0 -76
- package/.github/CONTRIBUTING.md +0 -70
- package/.github/FUNDING.yml +0 -7
- package/.github/ISSUE_TEMPLATE/bug_report.md +0 -42
- package/.github/ISSUE_TEMPLATE/feature_request.md +0 -26
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -37
- package/.github/SECURITY.md +0 -29
- package/.github/workflows/docs.yml +0 -77
- package/.github/workflows/node-workflow.yml +0 -51
- package/.github/workflows/workflow.yml +0 -78
- package/.idea/workspace.xml +0 -113
- package/.prettierrc.json +0 -12
- package/__tests__/config.test.ts +0 -52
- package/__tests__/coverage.test.ts +0 -110
- package/__tests__/extensions.test.ts +0 -263
- package/__tests__/install.test.ts +0 -175
- package/__tests__/tools.test.ts +0 -524
- package/__tests__/utils.test.ts +0 -307
- package/action.yml +0 -29
- package/dist/index.js +0 -3051
- package/examples/bedrock.yml +0 -32
- package/examples/blackfire-player.yml +0 -31
- package/examples/blackfire.yml +0 -31
- package/examples/cakephp-mysql.yml +0 -114
- package/examples/cakephp-postgres.yml +0 -112
- package/examples/cakephp.yml +0 -92
- package/examples/codeigniter.yml +0 -34
- package/examples/laravel-mysql.yml +0 -74
- package/examples/laravel-postgres.yml +0 -74
- package/examples/laravel.yml +0 -42
- package/examples/lumen-mysql.yml +0 -74
- package/examples/lumen-postgres.yml +0 -74
- package/examples/lumen.yml +0 -38
- package/examples/phalcon-mysql.yml +0 -74
- package/examples/phalcon-postgres.yml +0 -73
- package/examples/sage.yml +0 -57
- package/examples/slim-framework.yml +0 -34
- package/examples/symfony-mysql.yml +0 -57
- package/examples/symfony-postgres.yml +0 -55
- package/examples/symfony.yml +0 -39
- package/examples/yii2-mysql.yml +0 -73
- package/examples/yii2-postgres.yml +0 -71
- package/examples/zend-framework.yml +0 -36
- package/jest.config.js +0 -12
- package/lib/sapi.js +0 -64
- package/src/scripts/common.sh +0 -314
- package/tsconfig.json +0 -18
package/src/scripts/win32.ps1
CHANGED
|
@@ -1,494 +1,352 @@
|
|
|
1
|
-
param (
|
|
2
|
-
[Parameter(Position = 0, Mandatory = $true)]
|
|
3
|
-
[ValidateNotNull()]
|
|
4
|
-
[ValidateLength(1, [int]::MaxValue)]
|
|
5
|
-
[string]
|
|
6
|
-
$version = '8.
|
|
7
|
-
[Parameter(Position = 1, Mandatory = $true)]
|
|
8
|
-
[ValidateNotNull()]
|
|
9
|
-
[ValidateLength(1, [int]::MaxValue)]
|
|
10
|
-
[string]
|
|
11
|
-
$
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
# Function to log start of a operation.
|
|
15
|
-
Function Step-Log($message) {
|
|
16
|
-
printf "\n\033[90;1m==> \033[0m\033[37;1m%s \033[0m\n" $message
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
# Function to log result of a operation.
|
|
20
|
-
Function Add-Log($mark, $subject, $message) {
|
|
21
|
-
if ($mark -eq $tick) {
|
|
22
|
-
printf "\033[32;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" $mark $subject $message
|
|
23
|
-
} else {
|
|
24
|
-
printf "\033[31;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" $mark $subject $message
|
|
25
|
-
if($env:fail_fast -eq 'true') {
|
|
26
|
-
exit 1;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
# Function to
|
|
32
|
-
Function
|
|
33
|
-
param(
|
|
34
|
-
[Parameter(Position = 0, Mandatory = $true)]
|
|
35
|
-
[ValidateNotNull()]
|
|
36
|
-
[ValidateLength(1, [int]::MaxValue)]
|
|
37
|
-
[string]
|
|
38
|
-
$
|
|
39
|
-
[Parameter(Position = 1, Mandatory = $true)]
|
|
40
|
-
[ValidateNotNull()]
|
|
41
|
-
[ValidateLength(1, [int]::MaxValue)]
|
|
42
|
-
[string]
|
|
43
|
-
$
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
[
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
Function
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if(
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
$
|
|
103
|
-
[
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
$
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
if(
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
$
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
$
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
# Function to
|
|
218
|
-
Function
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
)
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
} else {
|
|
333
|
-
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
[string]
|
|
354
|
-
$prefix
|
|
355
|
-
)
|
|
356
|
-
if($tool -match "prestissimo|composer-prefetcher" -and $composer_version.split('.')[0] -ne "1") {
|
|
357
|
-
Write-Output "::warning:: Skipping $tool, as it does not support Composer $composer_version. Specify composer:v1 in tools to use $tool"
|
|
358
|
-
Add-Log $cross $tool "Skipped"
|
|
359
|
-
Return
|
|
360
|
-
}
|
|
361
|
-
if(Test-Path $composer_lock) {
|
|
362
|
-
Remove-Item -Path $composer_lock -Force
|
|
363
|
-
}
|
|
364
|
-
(composer global require $prefix$release 2>&1 | Tee-Object -FilePath $env:APPDATA\Composer\composer.log) >$null 2>&1
|
|
365
|
-
$json = findstr $prefix$tool $env:APPDATA\Composer\composer.json
|
|
366
|
-
$log = findstr $prefix$tool $env:APPDATA\Composer\composer.log
|
|
367
|
-
if(Test-Path $composer_bin\composer) {
|
|
368
|
-
Copy-Item -Path "$bin_dir\composer" -Destination "$composer_bin\composer" -Force
|
|
369
|
-
}
|
|
370
|
-
Add-ToolsHelper $tool
|
|
371
|
-
if($json) {
|
|
372
|
-
$tool_version = Get-ToolVersion "Write-Output" "$log"
|
|
373
|
-
Add-Log $tick $tool "Added $tool $tool_version"
|
|
374
|
-
} else {
|
|
375
|
-
Add-Log $cross $tool "Could not setup $tool"
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
# Function to handle request to add PECL.
|
|
380
|
-
Function Add-Pecl() {
|
|
381
|
-
Add-Log $tick "PECL" "Use extensions input to setup PECL extensions on windows"
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
# Variables
|
|
385
|
-
$tick = ([char]8730)
|
|
386
|
-
$cross = ([char]10007)
|
|
387
|
-
$php_dir = 'C:\tools\php'
|
|
388
|
-
$ext_dir = "$php_dir\ext"
|
|
389
|
-
$bin_dir = $php_dir
|
|
390
|
-
$github = 'https://github.com'
|
|
391
|
-
$php_builder = "$github/shivammathur/php-builder-windows"
|
|
392
|
-
$composer_bin = "$env:APPDATA\Composer\vendor\bin"
|
|
393
|
-
$composer_json = "$env:APPDATA\Composer\composer.json"
|
|
394
|
-
$composer_lock = "$env:APPDATA\Composer\composer.lock"
|
|
395
|
-
$current_profile = "$env:TEMP\setup-php.ps1"
|
|
396
|
-
$ProgressPreference = 'SilentlyContinue'
|
|
397
|
-
$jit_versions = '8.[0-9]'
|
|
398
|
-
$nightly_versions = '8.[1-9]'
|
|
399
|
-
$cert_source='CurrentUser'
|
|
400
|
-
$enable_extensions = ('openssl', 'curl', 'mbstring')
|
|
401
|
-
|
|
402
|
-
$arch = 'x64'
|
|
403
|
-
if(-not([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') {
|
|
404
|
-
$arch = 'x86'
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
$ts = $env:PHPTS -eq 'ts'
|
|
408
|
-
if($env:PHPTS -ne 'ts') {
|
|
409
|
-
$env:PHPTS = 'nts'
|
|
410
|
-
}
|
|
411
|
-
if($env:RUNNER -eq 'self-hosted') {
|
|
412
|
-
$bin_dir = 'C:\tools\bin'
|
|
413
|
-
$php_dir = "$php_dir$version"
|
|
414
|
-
$ext_dir = "$php_dir\ext"
|
|
415
|
-
$cert_source='Curl'
|
|
416
|
-
Get-CleanPSProfile >$null 2>&1
|
|
417
|
-
New-Item $bin_dir -Type Directory 2>&1 | Out-Null
|
|
418
|
-
Add-Path -PathItem $bin_dir
|
|
419
|
-
if($version -lt 5.6) {
|
|
420
|
-
Add-Log $cross "PHP" "PHP $version is not supported on self-hosted runner"
|
|
421
|
-
Start-Sleep 1
|
|
422
|
-
exit 1
|
|
423
|
-
}
|
|
424
|
-
if ((Get-InstalledModule).Name -notcontains 'VcRedist') {
|
|
425
|
-
Install-Module -Name VcRedist -Force
|
|
426
|
-
}
|
|
427
|
-
New-Item $php_dir -Type Directory 2>&1 | Out-Null
|
|
428
|
-
Add-Path -PathItem $php_dir
|
|
429
|
-
setx PHPROOT $php_dir >$null 2>&1
|
|
430
|
-
} else {
|
|
431
|
-
$current_profile = "$PSHOME\Profile.ps1"
|
|
432
|
-
if(-not(Test-Path -LiteralPath $current_profile)) {
|
|
433
|
-
New-Item -Path $current_profile -ItemType "file" -Force >$null 2>&1
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
. $dist\..\src\scripts\tools\add_tools.ps1
|
|
438
|
-
|
|
439
|
-
Add-Printf >$null 2>&1
|
|
440
|
-
Step-Log "Setup PhpManager"
|
|
441
|
-
Install-PSPackage PhpManager PhpManager\PhpManager "$github/mlocati/powershell-phpmanager/releases/latest/download/PhpManager.zip" Get-Php >$null 2>&1
|
|
442
|
-
Add-Log $tick "PhpManager" "Installed"
|
|
443
|
-
|
|
444
|
-
Step-Log "Setup PHP"
|
|
445
|
-
$installed = $null
|
|
446
|
-
if (Test-Path -LiteralPath $php_dir -PathType Container) {
|
|
447
|
-
try {
|
|
448
|
-
$installed = Get-Php -Path $php_dir
|
|
449
|
-
} catch { }
|
|
450
|
-
}
|
|
451
|
-
$status = "Installed"
|
|
452
|
-
$extra_version = ""
|
|
453
|
-
if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version -replace '^(\d+(\.\d+)*).*', '$1.'))) -or $ts -ne $installed.ThreadSafe) {
|
|
454
|
-
if ($version -lt '7.0' -and (Get-InstalledModule).Name -notcontains 'VcRedist') {
|
|
455
|
-
Install-PSPackage VcRedist VcRedist-main\VcRedist\VcRedist "$github/aaronparker/VcRedist/archive/main.zip" Get-VcList >$null 2>&1
|
|
456
|
-
}
|
|
457
|
-
try {
|
|
458
|
-
if ($version -match $nightly_versions) {
|
|
459
|
-
Invoke-WebRequest -UseBasicParsing -Uri $php_builder/releases/latest/download/Get-PhpNightly.ps1 -OutFile $php_dir\Get-PhpNightly.ps1 > $null 2>&1
|
|
460
|
-
& $php_dir\Get-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir > $null 2>&1
|
|
461
|
-
$extra_version = " ($(Get-Content $php_dir\COMMIT))"
|
|
462
|
-
} else {
|
|
463
|
-
Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni Production -Force > $null 2>&1
|
|
464
|
-
}
|
|
465
|
-
} catch { }
|
|
466
|
-
} else {
|
|
467
|
-
if($version -match $jit_versions) {
|
|
468
|
-
('opcache.enable=1', 'opcache.jit_buffer_size=256M', 'opcache.jit=1235') | ForEach-Object { $p=$_.split('='); Set-PhpIniKey -Key $p[0] -Value $p[1] -Path $php_dir }
|
|
469
|
-
}
|
|
470
|
-
if($env:update -eq 'true') {
|
|
471
|
-
Update-Php $php_dir >$null 2>&1
|
|
472
|
-
$status = "Updated to"
|
|
473
|
-
} else {
|
|
474
|
-
$status = "Found"
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
$installed = Get-Php -Path $php_dir
|
|
479
|
-
if($installed.MajorMinorVersion -ne $version) {
|
|
480
|
-
Add-Log $cross "PHP" "Could not setup PHP $version"
|
|
481
|
-
exit 1
|
|
482
|
-
}
|
|
483
|
-
('date.timezone=UTC', 'memory_limit=-1', 'xdebug.mode=coverage') | ForEach-Object { $p=$_.split('='); Set-PhpIniKey -Key $p[0] -Value $p[1] -Path $php_dir }
|
|
484
|
-
if($version -lt "5.5") {
|
|
485
|
-
('libeay32.dll', 'ssleay32.dll') | ForEach-Object { Invoke-WebRequest -Uri "$php_builder/releases/download/openssl-1.0.2u/$_" -OutFile $php_dir\$_ >$null 2>&1 }
|
|
486
|
-
} else {
|
|
487
|
-
$enable_extensions += ('opcache')
|
|
488
|
-
}
|
|
489
|
-
Enable-PhpExtension -Extension $enable_extensions -Path $php_dir
|
|
490
|
-
Update-PhpCAInfo -Path $php_dir -Source $cert_source
|
|
491
|
-
Copy-Item -Path $dist\..\src\configs\*.json -Destination $env:RUNNER_TOOL_CACHE
|
|
492
|
-
New-Item -ItemType Directory -Path $composer_bin -Force 2>&1 | Out-Null
|
|
493
|
-
Write-Output "::set-output name=php-version::$($installed.FullVersion)"
|
|
494
|
-
Add-Log $tick "PHP" "$status PHP $($installed.FullVersion)$extra_version"
|
|
1
|
+
param (
|
|
2
|
+
[Parameter(Position = 0, Mandatory = $true)]
|
|
3
|
+
[ValidateNotNull()]
|
|
4
|
+
[ValidateLength(1, [int]::MaxValue)]
|
|
5
|
+
[string]
|
|
6
|
+
$version = '8.1',
|
|
7
|
+
[Parameter(Position = 1, Mandatory = $true)]
|
|
8
|
+
[ValidateNotNull()]
|
|
9
|
+
[ValidateLength(1, [int]::MaxValue)]
|
|
10
|
+
[string]
|
|
11
|
+
$ini = 'production'
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
# Function to log start of a operation.
|
|
15
|
+
Function Step-Log($message) {
|
|
16
|
+
printf "\n\033[90;1m==> \033[0m\033[37;1m%s \033[0m\n" $message
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
# Function to log result of a operation.
|
|
20
|
+
Function Add-Log($mark, $subject, $message) {
|
|
21
|
+
if ($mark -eq $tick) {
|
|
22
|
+
printf "\033[32;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" $mark $subject $message
|
|
23
|
+
} else {
|
|
24
|
+
printf "\033[31;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" $mark $subject $message
|
|
25
|
+
if($env:fail_fast -eq 'true') {
|
|
26
|
+
exit 1;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
# Function to set output on GitHub Actions.
|
|
32
|
+
Function Set-Output() {
|
|
33
|
+
param(
|
|
34
|
+
[Parameter(Position = 0, Mandatory = $true)]
|
|
35
|
+
[ValidateNotNull()]
|
|
36
|
+
[ValidateLength(1, [int]::MaxValue)]
|
|
37
|
+
[string]
|
|
38
|
+
$output,
|
|
39
|
+
[Parameter(Position = 1, Mandatory = $true)]
|
|
40
|
+
[ValidateNotNull()]
|
|
41
|
+
[ValidateLength(1, [int]::MaxValue)]
|
|
42
|
+
[string]
|
|
43
|
+
$value
|
|
44
|
+
)
|
|
45
|
+
if ($env:GITHUB_ACTIONS -eq 'true') {
|
|
46
|
+
Write-Output "::set-output name=$output::$value"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
# Function to add a line to a powershell profile safely.
|
|
51
|
+
Function Add-ToProfile {
|
|
52
|
+
param(
|
|
53
|
+
[Parameter(Position = 0, Mandatory = $true)]
|
|
54
|
+
[ValidateNotNull()]
|
|
55
|
+
[ValidateLength(1, [int]::MaxValue)]
|
|
56
|
+
[string]
|
|
57
|
+
$input_profile,
|
|
58
|
+
[Parameter(Position = 1, Mandatory = $true)]
|
|
59
|
+
[ValidateNotNull()]
|
|
60
|
+
[ValidateLength(1, [int]::MaxValue)]
|
|
61
|
+
[string]
|
|
62
|
+
$search,
|
|
63
|
+
[Parameter(Position = 2, Mandatory = $true)]
|
|
64
|
+
[ValidateNotNull()]
|
|
65
|
+
[ValidateLength(1, [int]::MaxValue)]
|
|
66
|
+
[string]
|
|
67
|
+
$value
|
|
68
|
+
)
|
|
69
|
+
if($null -eq (Get-Content $input_profile | findstr $search)) {
|
|
70
|
+
Add-Content -Path $input_profile -Value $value
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
# Function to fetch PATH from the registry.
|
|
75
|
+
Function Get-PathFromRegistry {
|
|
76
|
+
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","User") + ";" +
|
|
77
|
+
[System.Environment]::GetEnvironmentVariable("Path","Machine")
|
|
78
|
+
Add-ToProfile $current_profile 'Get-PathFromRegistry' 'Function Get-PathFromRegistry { $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "User") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "Machine") }; Get-PathFromRegistry'
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
# Function to add a location to PATH.
|
|
82
|
+
Function Add-Path {
|
|
83
|
+
param(
|
|
84
|
+
[string]$PathItem
|
|
85
|
+
)
|
|
86
|
+
if(-not(Test-Path $PathItem) -or "$env:PATH;".contains("$PathItem;")) {
|
|
87
|
+
return
|
|
88
|
+
}
|
|
89
|
+
if ($env:GITHUB_PATH) {
|
|
90
|
+
Add-Content $PathItem -Path $env:GITHUB_PATH -Encoding utf8
|
|
91
|
+
} else {
|
|
92
|
+
$newPath = (Get-ItemProperty -Path 'hkcu:\Environment' -Name PATH).Path.replace("$PathItem;", '')
|
|
93
|
+
$newPath = $PathItem + ';' + $newPath
|
|
94
|
+
Set-ItemProperty -Path 'hkcu:\Environment' -Name Path -Value $newPath
|
|
95
|
+
Get-PathFromRegistry
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
# Function to add an environment variable.
|
|
100
|
+
Function Add-Env {
|
|
101
|
+
param(
|
|
102
|
+
[string]$EnvName,
|
|
103
|
+
[string]$EnvValue
|
|
104
|
+
)
|
|
105
|
+
if ($env:GITHUB_ENV) {
|
|
106
|
+
Add-Content "$EnvName=$EnvValue" -Path $env:GITHUB_ENV -Encoding utf8
|
|
107
|
+
} else {
|
|
108
|
+
Set-ItemProperty -Path 'hkcu:\Environment' -Name $EnvName -Value $EnvValue
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
# Function to add environment variables using a PATH.
|
|
113
|
+
Function Add-EnvPATH {
|
|
114
|
+
param(
|
|
115
|
+
[string]$EnvPATH
|
|
116
|
+
)
|
|
117
|
+
if(-not(Test-Path $EnvPATH)) {
|
|
118
|
+
return
|
|
119
|
+
}
|
|
120
|
+
$env_file = $current_profile
|
|
121
|
+
if ($env:GITHUB_ENV) {
|
|
122
|
+
$env_file = $env:GITHUB_ENV
|
|
123
|
+
}
|
|
124
|
+
Get-Content -Path $EnvPATH | Add-Content -Path $env_file -Encoding utf8
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
# Function to make sure printf is in PATH.
|
|
128
|
+
Function Add-Printf {
|
|
129
|
+
if (-not(Test-Path "C:\Program Files\Git\usr\bin\printf.exe")) {
|
|
130
|
+
if(Test-Path "C:\msys64\usr\bin\printf.exe") {
|
|
131
|
+
New-Item -Path $bin_dir\printf.exe -ItemType SymbolicLink -Value C:\msys64\usr\bin\printf.exe -Force > $null 2>&1
|
|
132
|
+
} else {
|
|
133
|
+
Invoke-WebRequest -Uri "$github/shivammathur/printf/releases/latest/download/printf-x64.zip" -OutFile "$bin_dir\printf.zip"
|
|
134
|
+
Expand-Archive -Path $bin_dir\printf.zip -DestinationPath $bin_dir -Force
|
|
135
|
+
}
|
|
136
|
+
} else {
|
|
137
|
+
New-Item -Path $bin_dir\printf.exe -ItemType SymbolicLink -Value "C:\Program Files\Git\usr\bin\printf.exe" -Force > $null 2>&1
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
# Function to get a clean Powershell profile.
|
|
142
|
+
Function Get-CleanPSProfile {
|
|
143
|
+
if(-not(Test-Path -LiteralPath $profile)) {
|
|
144
|
+
New-Item -Path $profile -ItemType "file" -Force > $null 2>&1
|
|
145
|
+
}
|
|
146
|
+
Set-Content $current_profile -Value ''
|
|
147
|
+
Add-ToProfile $profile $current_profile.replace('\', '\\') ". $current_profile"
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
# Function to install a powershell package from GitHub.
|
|
151
|
+
Function Install-PSPackage() {
|
|
152
|
+
param(
|
|
153
|
+
[Parameter(Position = 0, Mandatory = $true)]
|
|
154
|
+
$package,
|
|
155
|
+
[Parameter(Position = 1, Mandatory = $true)]
|
|
156
|
+
$psm1_path,
|
|
157
|
+
[Parameter(Position = 2, Mandatory = $true)]
|
|
158
|
+
$url,
|
|
159
|
+
[Parameter(Position = 3, Mandatory = $true)]
|
|
160
|
+
$cmdlet
|
|
161
|
+
)
|
|
162
|
+
$module_path = "$bin_dir\$psm1_path.psm1"
|
|
163
|
+
if(-not (Test-Path $module_path -PathType Leaf)) {
|
|
164
|
+
$zip_file = "$bin_dir\$package.zip"
|
|
165
|
+
Invoke-WebRequest -Uri $url -OutFile $zip_file
|
|
166
|
+
Expand-Archive -Path $zip_file -DestinationPath $bin_dir -Force
|
|
167
|
+
}
|
|
168
|
+
Import-Module $module_path
|
|
169
|
+
if($null -eq (Get-Command $cmdlet -ErrorAction SilentlyContinue)) {
|
|
170
|
+
Install-Module -Name $package -Force
|
|
171
|
+
} else {
|
|
172
|
+
Add-ToProfile $current_profile "$package-search" "Import-Module $module_path"
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
# Function to add CA certificates to PHP.
|
|
177
|
+
Function Add-PhpCAInfo {
|
|
178
|
+
try {
|
|
179
|
+
Update-PhpCAInfo -Path $php_dir -Source Curl
|
|
180
|
+
} catch {
|
|
181
|
+
Add-Log $cross PHP "Could not fetch CA certificate bundle from Curl"
|
|
182
|
+
Update-PhpCAInfo -Path $php_dir -Source CurrentUser
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
# Function to set PHP config.
|
|
187
|
+
Function Add-PhpConfig {
|
|
188
|
+
$current = Get-Content -Path $php_dir\php.ini-current -ErrorAction SilentlyContinue
|
|
189
|
+
if($ini -eq 'development' -or ($ini -eq 'production' -and $current -and $current -ne 'production')) {
|
|
190
|
+
Copy-Item -Path $php_dir\php.ini-$ini -Destination $php_dir\php.ini -Force
|
|
191
|
+
} elseif ($ini -eq 'none') {
|
|
192
|
+
Set-Content -Path $php_dir\php.ini -Value ''
|
|
193
|
+
}
|
|
194
|
+
Set-Content -Path $php_dir\php.ini-current -Value $ini
|
|
195
|
+
$ini_config_dir = "$src\configs\ini"
|
|
196
|
+
$ini_files = @("$ini_config_dir\php.ini")
|
|
197
|
+
$version -match $jit_versions -and ($ini_files += ("$ini_config_dir\jit.ini")) > $null 2>&1
|
|
198
|
+
$version -match $xdebug3_versions -and ($ini_files += ("$ini_config_dir\xdebug.ini")) > $null 2>&1
|
|
199
|
+
Add-Content -Path $ini_config_dir\php.ini -Value extension_dir=$ext_dir
|
|
200
|
+
Get-Content -Path $ini_files | Add-Content -Path $php_dir\php.ini
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
# Function to get PHP from GitHub releases cache
|
|
204
|
+
Function Set-PhpCache {
|
|
205
|
+
try {
|
|
206
|
+
$release = Invoke-RestMethod https://api.github.com/repos/shivammathur/php-builder-windows/releases/tags/php$version
|
|
207
|
+
$asset = $release.assets | ForEach-Object {
|
|
208
|
+
if($_.name -match "php-$version.[0-9]+$env:PHPTS-Win32-.*-$arch.zip") {
|
|
209
|
+
return $_.name
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
Invoke-WebRequest -UseBasicParsing -Uri $php_builder/releases/download/php$version/$asset -OutFile $php_dir\$asset
|
|
213
|
+
Set-PhpDownloadCache -Path $php_dir CurrentUser
|
|
214
|
+
} catch { }
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
# Function to install nightly version of PHP
|
|
218
|
+
Function Install-PhpNightly {
|
|
219
|
+
Invoke-WebRequest -UseBasicParsing -Uri $php_builder/releases/latest/download/Get-PhpNightly.ps1 -OutFile $php_dir\Get-PhpNightly.ps1 > $null 2>&1
|
|
220
|
+
& $php_dir\Get-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir -Version $version > $null 2>&1
|
|
221
|
+
if(Test-Path $php_dir\COMMIT) {
|
|
222
|
+
return " ($( Get-Content $php_dir\COMMIT ))"
|
|
223
|
+
}
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
# Variables
|
|
228
|
+
$tick = ([char]8730)
|
|
229
|
+
$cross = ([char]10007)
|
|
230
|
+
$php_dir = 'C:\tools\php'
|
|
231
|
+
$ext_dir = "$php_dir\ext"
|
|
232
|
+
$bin_dir = $php_dir
|
|
233
|
+
$github = 'https://github.com'
|
|
234
|
+
$php_builder = "$github/shivammathur/php-builder-windows"
|
|
235
|
+
$current_profile = "$env:TEMP\setup-php.ps1"
|
|
236
|
+
$ProgressPreference = 'SilentlyContinue'
|
|
237
|
+
$jit_versions = '8.[0-9]'
|
|
238
|
+
$nightly_versions = '8.[2-9]'
|
|
239
|
+
$xdebug3_versions = "7.[2-4]|8.[0-9]"
|
|
240
|
+
$enable_extensions = ('openssl', 'curl', 'mbstring')
|
|
241
|
+
|
|
242
|
+
$arch = 'x64'
|
|
243
|
+
if(-not([Environment]::Is64BitOperatingSystem) -or $version -lt '7.0') {
|
|
244
|
+
$arch = 'x86'
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
$ts = $env:PHPTS -eq 'ts'
|
|
248
|
+
if($env:PHPTS -ne 'ts') {
|
|
249
|
+
$env:PHPTS = '-nts'
|
|
250
|
+
} else {
|
|
251
|
+
$env:PHPTS = ''
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if ( $env:GITHUB_ACTIONS -eq 'true') {
|
|
255
|
+
$env:GROUP = '::group::'
|
|
256
|
+
$env:END_GROUP = '::endgroup::'
|
|
257
|
+
} else {
|
|
258
|
+
$env:GROUP = ''
|
|
259
|
+
$env:END_GROUP = ''
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if(-not($env:ImageOS) -and -not($env:ImageVersion)) {
|
|
263
|
+
if($env:RUNNER -eq 'github') {
|
|
264
|
+
Add-Log $cross "Runner" "Runner set as github in self-hosted environment"
|
|
265
|
+
exit 1
|
|
266
|
+
}
|
|
267
|
+
$bin_dir = 'C:\tools\bin'
|
|
268
|
+
$php_dir = "$php_dir$version"
|
|
269
|
+
$ext_dir = "$php_dir\ext"
|
|
270
|
+
Get-CleanPSProfile >$null 2>&1
|
|
271
|
+
New-Item $bin_dir -Type Directory -Force > $null 2>&1
|
|
272
|
+
Add-Path -PathItem $bin_dir
|
|
273
|
+
if($version -lt 5.6) {
|
|
274
|
+
Add-Log $cross "PHP" "PHP $version is not supported on self-hosted runner"
|
|
275
|
+
Start-Sleep 1
|
|
276
|
+
exit 1
|
|
277
|
+
}
|
|
278
|
+
if ($null -eq (Get-Module -ListAvailable -Name VcRedist)) {
|
|
279
|
+
Install-Module -Name VcRedist -Force
|
|
280
|
+
}
|
|
281
|
+
New-Item $php_dir -Type Directory -Force > $null 2>&1
|
|
282
|
+
Add-Path -PathItem $php_dir
|
|
283
|
+
setx PHPROOT $php_dir >$null 2>&1
|
|
284
|
+
} else {
|
|
285
|
+
$current_profile = "$PSHOME\Profile.ps1"
|
|
286
|
+
if(-not(Test-Path -LiteralPath $current_profile)) {
|
|
287
|
+
New-Item -Path $current_profile -ItemType "file" -Force >$null 2>&1
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
$src = Join-Path -Path $PSScriptRoot -ChildPath \..
|
|
292
|
+
. $src\scripts\tools\add_tools.ps1
|
|
293
|
+
. $src\scripts\extensions\add_extensions.ps1
|
|
294
|
+
|
|
295
|
+
Add-Printf >$null 2>&1
|
|
296
|
+
Step-Log "Setup PhpManager"
|
|
297
|
+
Install-PSPackage PhpManager PhpManager\PhpManager "$github/mlocati/powershell-phpmanager/releases/latest/download/PhpManager.zip" Get-Php >$null 2>&1
|
|
298
|
+
Add-Log $tick "PhpManager" "Installed"
|
|
299
|
+
|
|
300
|
+
Step-Log "Setup PHP"
|
|
301
|
+
$installed = $null
|
|
302
|
+
if (Test-Path -LiteralPath $php_dir -PathType Container) {
|
|
303
|
+
try {
|
|
304
|
+
if(Test-Path $php_dir\php.ini) {
|
|
305
|
+
Rename-Item -Path $php_dir\php.ini -NewName 'php.ini.bak'
|
|
306
|
+
}
|
|
307
|
+
$installed = Get-Php -Path $php_dir -ErrorAction SilentlyContinue 2>$null 3>$null
|
|
308
|
+
if(Test-Path $php_dir\php.ini.bak) {
|
|
309
|
+
Rename-Item -Path $php_dir\php.ini.bak -NewName 'php.ini'
|
|
310
|
+
}
|
|
311
|
+
} catch { }
|
|
312
|
+
}
|
|
313
|
+
$status = "Installed"
|
|
314
|
+
$extra_version = ""
|
|
315
|
+
if ($null -eq $installed -or -not("$($installed.Version).".StartsWith(($version -replace '^(\d+(\.\d+)*).*', '$1.'))) -or $ts -ne $installed.ThreadSafe) {
|
|
316
|
+
if ($version -lt '7.0' -and ($null -eq (Get-Module -ListAvailable -Name VcRedist))) {
|
|
317
|
+
Install-PSPackage VcRedist VcRedist-main\VcRedist\VcRedist "$github/aaronparker/VcRedist/archive/main.zip" Get-VcList >$null 2>&1
|
|
318
|
+
}
|
|
319
|
+
try {
|
|
320
|
+
if ($version -match $nightly_versions) {
|
|
321
|
+
$extra_version = Install-PhpNightly
|
|
322
|
+
} else {
|
|
323
|
+
Set-PhpCache
|
|
324
|
+
Install-Php -Version $version -Architecture $arch -ThreadSafe $ts -InstallVC -Path $php_dir -TimeZone UTC -InitialPhpIni production -Force > $null 2>&1
|
|
325
|
+
}
|
|
326
|
+
Add-PhpConfig
|
|
327
|
+
} catch { }
|
|
328
|
+
} else {
|
|
329
|
+
if($env:update -eq 'true') {
|
|
330
|
+
Update-Php $php_dir >$null 2>&1
|
|
331
|
+
$status = "Updated to"
|
|
332
|
+
} else {
|
|
333
|
+
$status = "Found"
|
|
334
|
+
}
|
|
335
|
+
Add-PhpConfig
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
$installed = Get-Php -Path $php_dir
|
|
339
|
+
if($installed.MajorMinorVersion -ne $version) {
|
|
340
|
+
Add-Log $cross "PHP" "Could not setup PHP $version"
|
|
341
|
+
exit 1
|
|
342
|
+
}
|
|
343
|
+
if($version -lt "5.5") {
|
|
344
|
+
('libeay32.dll', 'ssleay32.dll') | ForEach-Object -Parallel { Invoke-WebRequest -Uri "$using:php_builder/releases/download/openssl-1.0.2u/$_" -OutFile $using:php_dir\$_ >$null 2>&1 }
|
|
345
|
+
} else {
|
|
346
|
+
$enable_extensions += ('opcache')
|
|
347
|
+
}
|
|
348
|
+
Enable-PhpExtension -Extension $enable_extensions -Path $php_dir
|
|
349
|
+
Add-PhpCAInfo
|
|
350
|
+
Copy-Item -Path $src\configs\pm\*.json -Destination $env:RUNNER_TOOL_CACHE
|
|
351
|
+
Set-Output php-version $($installed.FullVersion)
|
|
352
|
+
Add-Log $tick "PHP" "$status PHP $($installed.FullVersion)$extra_version"
|