setup-php 2.35.5 → 2.37.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.
Files changed (58) hide show
  1. package/README.md +103 -90
  2. package/lib/core.d.ts +8 -0
  3. package/lib/core.js +55 -0
  4. package/lib/core.js.map +1 -0
  5. package/lib/extensions.js +17 -16
  6. package/lib/extensions.js.map +1 -1
  7. package/lib/fetch.js +25 -70
  8. package/lib/fetch.js.map +1 -1
  9. package/lib/install.js +1 -1
  10. package/lib/install.js.map +1 -1
  11. package/lib/tools.d.ts +48 -21
  12. package/lib/tools.js +175 -154
  13. package/lib/tools.js.map +1 -1
  14. package/lib/utils.js +5 -5
  15. package/lib/utils.js.map +1 -1
  16. package/package.json +23 -22
  17. package/src/configs/brew_extensions +20 -0
  18. package/src/configs/darwin_libs +22 -0
  19. package/src/configs/linux_libs +22 -0
  20. package/src/configs/php-versions.json +5 -4
  21. package/src/configs/tools.json +2 -1
  22. package/src/core.ts +112 -0
  23. package/src/extensions.ts +39 -32
  24. package/src/fetch.ts +28 -42
  25. package/src/install.ts +1 -1
  26. package/src/scripts/darwin.sh +45 -19
  27. package/src/scripts/extensions/add_extensions.sh +5 -3
  28. package/src/scripts/extensions/couchbase.sh +13 -2
  29. package/src/scripts/extensions/firebird.sh +6 -23
  30. package/src/scripts/extensions/gearman.sh +3 -1
  31. package/src/scripts/extensions/http.ps1 +7 -5
  32. package/src/scripts/extensions/ibm.ps1 +56 -0
  33. package/src/scripts/extensions/ibm.sh +106 -0
  34. package/src/scripts/extensions/oci.sh +2 -1
  35. package/src/scripts/extensions/patches/amqp.sh +5 -0
  36. package/src/scripts/extensions/patches/common.sh +31 -8
  37. package/src/scripts/extensions/patches/geos.sh +1 -5
  38. package/src/scripts/extensions/patches/pdo_oci.sh +3 -0
  39. package/src/scripts/extensions/patches/pdo_sqlsrv.sh +5 -0
  40. package/src/scripts/extensions/patches/phpize.sh +2 -1
  41. package/src/scripts/extensions/relay.sh +25 -35
  42. package/src/scripts/extensions/source.sh +26 -6
  43. package/src/scripts/extensions/sqlsrv.ps1 +2 -0
  44. package/src/scripts/extensions/sqlsrv.sh +2 -0
  45. package/src/scripts/linux.sh +50 -10
  46. package/src/scripts/tools/add_tools.ps1 +52 -26
  47. package/src/scripts/tools/add_tools.sh +41 -19
  48. package/src/scripts/tools/blackfire.sh +1 -1
  49. package/src/scripts/tools/brew.sh +130 -0
  50. package/src/scripts/tools/grpc_php_plugin.sh +2 -2
  51. package/src/scripts/tools/ppa.sh +201 -28
  52. package/src/scripts/tools/symfony.ps1 +28 -14
  53. package/src/scripts/tools/symfony.sh +34 -31
  54. package/src/scripts/unix.sh +8 -4
  55. package/src/scripts/win32.ps1 +9 -4
  56. package/src/tools.ts +312 -203
  57. package/src/utils.ts +6 -7
  58. package/src/scripts/extensions/patches/gearman.sh +0 -5
package/src/utils.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import fs from 'fs';
2
2
  import * as path from 'path';
3
- import * as core from '@actions/core';
3
+ import * as core from './core';
4
4
  import * as fetch from './fetch';
5
5
 
6
6
  /**
@@ -62,7 +62,7 @@ export async function getManifestURLS(): Promise<string[]> {
62
62
  */
63
63
  export async function parseVersion(version: string): Promise<string> {
64
64
  switch (true) {
65
- case /^(latest|lowest|highest|nightly|\d+\.x)$/.test(version):
65
+ case /^(latest|lowest|highest|nightly|master|\d+\.x)$/.test(version):
66
66
  for (const manifestURL of await getManifestURLS()) {
67
67
  const fetchResult = await fetch.fetch(manifestURL);
68
68
  if (fetchResult['data'] ?? false) {
@@ -97,9 +97,8 @@ export async function parseIniFile(ini_file: string): Promise<string> {
97
97
  }
98
98
 
99
99
  /**
100
- * Async foreach loop
100
+ * Async foreach loop using modern for...of pattern
101
101
  *
102
- * @author https://github.com/Atinux
103
102
  * @param array
104
103
  * @param callback
105
104
  */
@@ -111,8 +110,8 @@ export async function asyncForEach(
111
110
  array: Array<string>
112
111
  ) => Promise<void>
113
112
  ): Promise<void> {
114
- for (let index = 0; index < array.length; index++) {
115
- await callback(array[index], index, array);
113
+ for (const [index, element] of array.entries()) {
114
+ await callback(element, index, array);
116
115
  }
117
116
  }
118
117
 
@@ -400,7 +399,7 @@ export async function customPackage(
400
399
  version: string,
401
400
  os: string
402
401
  ): Promise<string> {
403
- const pkg_name: string = pkg.replace(/\d+|(pdo|pecl)[_-]/, '');
402
+ const pkg_name: string = pkg.replace(/\d+|(pdo|pecl)[_-]|[_-]db2/, '');
404
403
  const script_extension: string = await scriptExtension(os);
405
404
  const script: string = path.join(
406
405
  __dirname,
@@ -1,5 +0,0 @@
1
- patch_gearman() {
2
- if [[ "${version:?}" =~ ${nightly_versions:?} ]]; then
3
- sed -i~ -e "s/zend_exception_get_default()/zend_ce_exception/" php_gearman.c
4
- fi
5
- }