Compare commits

...

1468 Commits
1.5.8 ... main

Author SHA1 Message Date
Shivam Mathur
a33066c001
Merge pull request #1065 from shivammathur/dependabot/github_actions/develop/actions/download-artifact-8
Bump actions/download-artifact from 7 to 8
2026-03-09 17:10:54 +05:30
Shivam Mathur
f1643fd598
Merge pull request #1066 from shivammathur/dependabot/github_actions/develop/actions/upload-artifact-7
Bump actions/upload-artifact from 6 to 7
2026-03-09 17:10:45 +05:30
dependabot[bot]
e167f5c259
Bump actions/upload-artifact from 6 to 7
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 11:18:10 +00:00
dependabot[bot]
45158d762a
Bump actions/download-artifact from 7 to 8
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 7 to 8.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '8'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-09 11:18:07 +00:00
Shivam Mathur
8724c1dcc1
Add macos-26-intel to the README [skip ci] 2026-03-09 01:03:00 +05:30
Shivam Mathur
a1e0f566a8
Revert to old brew linking behaviour 2026-03-08 17:23:40 +05:30
Shivam Mathur
650d05dc41
Merge pull request #1064 from theluckystrike/main
fix: use latest in URL when version is empty
2026-03-04 21:05:48 +05:30
theluckystrike
746e1a46d1 fix: use latest in URL when version is empty
When version is not specified (empty string), the getUrl function
was generating invalid URLs like /releases/download/cs2pr without
any version, which returned 404.

This fix ensures that when version is empty or 'latest', the URL
includes '/latest/' which GitHub handles correctly with a redirect
to the actual latest release.

Fixes #1063
2026-03-04 22:03:38 +07:00
Shivam Mathur
a8ca9e3783
Fix npm audit 2026-02-28 11:55:28 +05:30
Shivam Mathur
769a4a81fd
Update sqlsrv and pdo_sqlsrv versions [skip ci] 2026-02-28 02:22:42 +05:30
Shivam Mathur
d042aafd13
Add retry and timeout for stuck brew calls 2026-02-23 15:42:41 +05:30
Shivam Mathur
f97ca00780
Bump dependencies 2026-02-23 15:42:41 +05:30
Shivam Mathur
3aeeb03660
Update PHP version and OS support in README [skip ci] 2026-02-17 03:59:36 +05:30
Shivam Mathur
57e8183dae
Switch to brew formula for pdo_firebird on macos [skip ci] 2026-02-08 11:29:04 +05:30
Shivam Mathur
5e98c022f7
Update dependencies 2026-02-08 09:13:03 +05:30
Shivam Mathur
f0b3fd9afe
Update brew extensions 2026-02-08 07:56:22 +05:30
Shivam Mathur
1eee54fe48
Fix paths for bin tools and scoped tools [skip ci] 2026-01-23 01:04:38 +05:30
Shivam Mathur
341bc9e176
Improve cache for tools 2026-01-21 17:02:28 +05:30
Shivam Mathur
185f9de395
Fix linking tools 2026-01-21 15:54:25 +05:30
Shivam Mathur
46cb5030ab
Replace generic record interfaces with specific ones 2026-01-21 02:46:20 +05:30
Shivam Mathur
6300a313a9
Remove unused @actions/io 2026-01-20 08:15:36 +05:30
Shivam Mathur
b7741bd785
Fix eslint config for imports 2026-01-20 07:47:37 +05:30
Shivam Mathur
109ae4d1c0
Reduce bundle size
Replace @actions/core with local functions

@actions/core is unmaintained and poorly designed for projects that just need basic functions
2026-01-20 07:47:23 +05:30
Shivam Mathur
871ff01b2b
Refactor to use ES2024+ features for Node 24
Use Set for O(1) redirect status code lookup in fetch.ts

Use at(-1) and Object.hasOwn() in tools.ts

Use for...of with entries() in utils.ts
2026-01-20 06:46:28 +05:30
Shivam Mathur
f0e37f9e90
Update Node version in node workflow 2026-01-20 06:30:53 +05:30
Shivam Mathur
46ae35f333
Update to Node 24
Update fetch.ts to use native fetch() API

Use immutable sort in tools.ts
2026-01-20 06:29:00 +05:30
Shivam Mathur
f89a301251
Override undici version 2026-01-17 03:15:23 +05:30
Shivam Mathur
5efa2a774e
Fix support to parse master in php-version input 2025-12-18 21:36:10 +05:30
Shivam Mathur
f72fc99524
Merge pull request #1045 from shivammathur/dependabot/github_actions/develop/actions/download-artifact-7
Bump actions/download-artifact from 6 to 7
2025-12-15 15:54:23 +05:30
Shivam Mathur
c84edb415f
Merge pull request #1047 from shivammathur/dependabot/github_actions/develop/actions/upload-artifact-6
Bump actions/upload-artifact from 5 to 6
2025-12-15 15:54:03 +05:30
Shivam Mathur
4dda6da925
Merge pull request #1046 from shivammathur/dependabot/github_actions/develop/actions/cache-5
Bump actions/cache from 4 to 5
2025-12-15 15:53:27 +05:30
dependabot[bot]
c14319add5
Bump actions/upload-artifact from 5 to 6
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 10:02:24 +00:00
dependabot[bot]
5ba12107fc
Bump actions/cache from 4 to 5
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 10:02:21 +00:00
dependabot[bot]
8bd624e171
Bump actions/download-artifact from 6 to 7
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6 to 7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-15 10:02:16 +00:00
Shivam Mathur
3dfaca4ee1
Rename nightly_versions -> php_builder_versions 2025-11-26 22:22:06 +05:30
Shivam Mathur
44454db4f0
Fix check_lists in ppa.sh 2025-11-26 20:43:34 +05:30
Shivam Mathur
9d7558f1af
Revert to using php-builder for PHP 8.3 and above for self-hosted 2025-11-26 20:05:44 +05:30
Shivam Mathur
7bf05c6b70
Update README 2025-11-26 16:10:58 +05:30
Shivam Mathur
5daa53ffa1
Fix shellcheck in darwin.sh 2025-11-26 11:29:16 +05:30
Shivam Mathur
e8f032a051
Fix linking 2025-11-26 11:29:07 +05:30
Shivam Mathur
f96e84adbb
Bump version to 2.36.0
Update Node.js dependencies
2025-11-26 11:08:00 +05:30
Shivam Mathur
4abbbd6075
Fix build pdo_oci on macos for PHP 7.0
Minor shellcheck fix
2025-11-26 09:36:49 +05:30
Shivam Mathur
a19278e75f
Update actions/checkout to v6 2025-11-26 07:43:52 +05:30
Shivam Mathur
4364ed4a15
Merge pull request #1030 from shivammathur/dependabot/github_actions/develop/actions/checkout-6
Bump actions/checkout from 5 to 6
2025-11-26 07:42:55 +05:30
Shivam Mathur
8dcd37f7d4
Improve macos php setup
Run dependency install as a seperate command.

Remove chown command as it is not required anymore it seems

Fix add_brew_tap call
2025-11-26 07:42:08 +05:30
Shivam Mathur
a909b43232
Fix gearman versions 2025-11-26 06:25:09 +05:30
Shivam Mathur
be556f8879
Add 8.5 for backfire in extensions.ts 2025-11-26 06:25:09 +05:30
Shivam Mathur
91d37511e3
Fix fallback to latest version in tools.ts 2025-11-26 06:25:09 +05:30
Shivam Mathur
3961404d06
Fix phpize patch on arm64 macos [skip ci] 2025-11-25 16:35:22 +05:30
Shivam Mathur
43e4e008cc
Add support for ibm extensions [skip ci] 2025-11-25 16:23:49 +05:30
Shivam Mathur
b010fa7c8f
Fix typo in geos patch [skip ci] 2025-11-25 15:46:15 +05:30
dependabot[bot]
aaed46225e
Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 11:06:15 +00:00
Shivam Mathur
cc78f4c7f9
Improve library support when building from source 2025-11-24 05:11:08 +05:30
Shivam Mathur
7662a9b5f4
Update common patches 2025-11-24 04:18:57 +05:30
Shivam Mathur
865d4645a1
Fallback to upgrading macos formula 2025-11-21 03:55:33 +05:30
Shivam Mathur
248e3ca37a
Mark PHP 8.5 as stable 2025-11-21 02:36:26 +05:30
Shivam Mathur
2c40db3599
Fix getcomposer fallback url for specific versions 2025-11-21 01:02:19 +05:30
Shivam Mathur
4eb1b49da1
Bump dependencies 2025-11-18 01:36:59 +05:30
Shivam Mathur
5eda055652
Improve and refactor ppa.sh 2025-11-10 05:02:29 +05:30
Shivam Mathur
04e773ea40
Fix redis formula in brew_extensions 2025-11-09 18:28:01 +05:30
Shivam Mathur
53bf167847
Merge pull request #1020 from nicolas-grekas/patch-1
Update flex link to the GitHub repository
2025-10-31 23:34:00 +05:30
Nicolas Grekas
355aade280
Update flex link to the GitHub repository 2025-10-31 16:30:42 +01:00
Shivam Mathur
74d4e20179
Merge pull request #1018 from shivammathur/dependabot/github_actions/develop/actions/download-artifact-6
Bump actions/download-artifact from 5 to 6
2025-10-27 19:25:54 +05:30
Shivam Mathur
ae0a50642d
Fix pecl support for extensions with uppercase packages 2025-10-27 19:17:28 +05:30
dependabot[bot]
5187d97121
Bump actions/download-artifact from 5 to 6
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 12:47:32 +00:00
Shivam Mathur
eddb855af9
Merge pull request #1016 from shivammathur/dependabot/github_actions/develop/actions/upload-artifact-5
Bump actions/upload-artifact from 4 to 5
2025-10-27 17:04:51 +05:30
dependabot[bot]
eec99716ef
Bump actions/upload-artifact from 4 to 5
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-27 11:01:07 +00:00
Shivam Mathur
788275d42c
Improve support for deb822 source files 2025-10-23 18:43:49 +05:30
dependabot[bot]
be38e7a127
Bump actions/setup-node from 5 to 6
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-22 14:32:05 +05:30
Shivam Mathur
47ac2e221b
Add support for relay-nightly in extensions.ts 2025-10-19 00:27:14 +05:30
Shivam Mathur
36338985e2
Merge pull request #1012 from tillkruss/patch-2
Add support for nightly version of Relay
2025-10-19 00:17:48 +05:30
Till Krüss
185b391822
Add support for nightly version of relay 2025-10-18 09:50:20 -07:00
Shivam Mathur
f210bb3904
Improve installing php on macOS 2025-10-18 09:53:32 +05:30
Shivam Mathur
6f153798c8
Mark macOS x86_64 not supported for relay [skip ci] 2025-10-18 08:12:58 +05:30
Shivam Mathur
f7b7badb27
Add support to show error on add_extension_log 2025-10-18 07:55:37 +05:30
Shivam Mathur
8473b2327f
Fix warning in getting relay version 2025-10-17 08:05:22 +05:30
Shivam Mathur
3efd894d72
Merge pull request #1011 from tillkruss/patch-2
Remove PHP 7.4 lock to Relay `0.7.0`
2025-10-17 07:44:57 +05:30
Till Krüss
1e8cc75dad
print version number 2025-10-16 18:31:56 -07:00
Till Krüss
2e18086d64
switch to latest stable when it's available 2025-10-16 17:05:25 -07:00
Till Krüss
9cf252c302
remove more 0.7.0 logic 2025-10-16 16:44:22 -07:00
Till Krüss
aa0de4323f
remove php 7.4 lock to relay 0.7.0 2025-10-16 15:38:53 -07:00
Shivam Mathur
00242b5fc2
Fix symfony-cli config [skip ci] 2025-10-15 09:17:20 +05:30
Shivam Mathur
319ac00da8
Improve symfony-cli support
Fingers crossed symfony-cli keeps the artifact format in their releases
2025-10-15 08:46:18 +05:30
Shivam Mathur
38e8065d61
Merge pull request #1008 from shyim/fix/flaky-symfony-cli-install
fix: directly download linux archive from symfony-cli releases
2025-10-15 07:52:14 +05:30
Shivam Mathur
91a018aa46
Update SECURITY.md [skip ci] 2025-10-15 07:50:28 +05:30
Shivam Mathur
bdaf698d5d
Merge pull request #1009 from shivammathur/dependabot/github_actions/develop/github/codeql-action-4
Bump github/codeql-action from 3 to 4
2025-10-13 22:43:48 +00:00
dependabot[bot]
ab68d9f583
Bump github/codeql-action from 3 to 4
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-13 10:36:25 +00:00
Shivam Mathur
d65cf8f3f2
Update sponsors [skip ci] 2025-10-12 12:49:03 +05:30
Shivam Mathur
6beaa7dc34
Update actions in examples 2025-10-12 11:05:16 +05:30
Soner Sayakci
79ab6fe269
ci: use direct link instead of api call 2025-10-07 11:02:25 +02:00
Soner Sayakci
4cbbb6d82c
fix: directly download linux archive from symfony-cli releases 2025-10-07 09:50:11 +02:00
Shivam Mathur
4cba65b8c5
Improve workflows 2025-09-25 22:11:11 +05:30
Shivam Mathur
7fea117d1c
Add support for PHP 8.6.0-dev 2025-09-25 20:38:18 +05:30
Shivam Mathur
bf6b4fbd49
Improve sorting in tools.getSemverVersion 2025-09-18 16:30:57 +05:30
Shivam Mathur
8f8196743c
Fix sorting in tools.getSemverVersion 2025-09-17 19:06:59 +05:30
Shivam Mathur
06512d94ed
Update macos-latest in README [skip ci] 2025-09-15 13:08:41 +05:30
Shivam Mathur
1c302aed34
Mark macOS 26 as supported [skip ci] 2025-09-15 13:05:52 +05:30
Shivam Mathur
dcffe28928
Fix jit config on arm 2025-09-11 18:38:04 +05:30
Shivam Mathur
6ffdb3d118
Bump version to 2.35.5
Update Node.js dependencies
2025-09-09 05:57:14 +05:30
Shivam Mathur
c97dacbacf
Merge pull request #995 from shivammathur/dependabot/github_actions/develop/actions/setup-node-5
Bump actions/setup-node from 4 to 5
2025-09-08 15:51:50 +05:30
dependabot[bot]
34f574e7aa
Bump actions/setup-node from 4 to 5
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 10:18:19 +00:00
Shivam Mathur
317a051dea
Add fallback cache for keys in ppa.sh 2025-09-07 11:58:20 +05:30
Shivam Mathur
dfcda83968
Add fallback url for composer 2025-09-04 20:26:04 +05:30
Shivam Mathur
96d7cf331d
Fix warning on chmod on failure in get 2025-09-02 14:42:11 +05:30
Shivam Mathur
baed2d33b8
Provide better error in tools' setup 2025-09-01 12:27:19 +05:30
Shivam Mathur
1398cb4c9f
Fix using new github-input for tools.ts 2025-08-27 17:12:07 +05:30
Shivam Mathur
462e7103e4
Add fallback to github api for adding intl 2025-08-27 09:12:14 +05:30
Shivam Mathur
8582cb12d5
Use seperate releases for shivammathur/icu-intl 2025-08-27 07:36:01 +05:30
Shivam Mathur
ec406be512
Bump version to 2.35.4
Update Node.js dependencies
2025-08-25 14:45:11 +05:30
Shivam Mathur
36a27b0262
Move to main branch for protoc 2025-08-25 14:39:29 +05:30
Shivam Mathur
ea2f858afe
Move to main branch for brew 2025-08-25 14:39:29 +05:30
Shivam Mathur
507ff06e8d
Merge pull request #989 from shivammathur/dependabot/github_actions/develop/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-08-18 22:32:57 +05:30
dependabot[bot]
629475b7b3
Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-18 16:21:04 +00:00
Shivam Mathur
521f2e5b93
Merge pull request #986 from shivammathur/dependabot/github_actions/develop/actions/download-artifact-5
Bump actions/download-artifact from 4 to 5
2025-08-11 21:32:18 +05:30
dependabot[bot]
259d177178
Bump actions/download-artifact from 4 to 5
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-11 14:51:06 +00:00
Shivam Mathur
20529878ed
Bump version to 2.35.3
Bump Node.js dependencies
2025-08-10 12:03:22 +05:30
Shivam Mathur
68634e7bca
Fix relay for PHP 7.4 [skip ci] 2025-08-10 12:03:22 +05:30
Shivam Mathur
0ac4874a14
Merge pull request #982 from jrfnl/feature/ghactions-dont-run-cronjobs-on-forks
GH Actions: don't run cron jobs on forks
2025-08-04 20:07:42 +05:30
jrfnl
c9735bcc02
GH Actions: don't run cron jobs on forks
While workflows are disabled by default in forks, it is quite common for contributors to enable them to verify CI will pass before submitting a pull request.

When enabling workflow runs in forks, it's "all or nothing".
This means that:
* All workflows which are only intended to be run on the canonical repo will also be enabled.
    These workflows will also often need access to repo-specific secrets and will typically fail when run from a fork.
* Workflows which contain cron jobs will also be enabled.
    Depending on the type of account the contributor has, this can burn through their "CI minutes".

This commit is based on a review of workflows containing cron jobs and disables running the jobs when a cron job is triggered in a fork.
2025-08-04 16:23:49 +02:00
Shivam Mathur
89b2566bb0
Check github-token on enterprise
On GitHub enterprise we may get a Personal Access token or a default token generated by GitHub that maybe not have the permissions required to access public GitHub, so we check and add it only if it can authenticate with the public GitHub API
2025-08-02 12:12:58 +05:30
Shivam Mathur
dcec1cf0b4
Override GITHUB_TOKEN if COMPOSER_TOKEN is set 2025-07-30 22:30:05 +05:30
Shivam Mathur
ccf2c627fe
Bump version to 2.35.2 2025-07-29 19:08:58 +05:30
Shivam Mathur
2a597f617d
Fix race condition 2025-07-29 02:08:56 +05:30
Shivam Mathur
2282b6a082
Bump version to 2.35.1 2025-07-28 20:33:43 +05:30
Shivam Mathur
11373c6dce
Fix shellcheck in add_tools.sh [skip ci] 2025-07-28 20:13:02 +05:30
Shivam Mathur
50ad25710d
Use auth.json for composer authentication 2025-07-28 20:11:02 +05:30
Shivam Mathur
c1c6c51867
Update geos patch [skip ci] 2025-07-28 17:22:40 +05:30
Shivam Mathur
34a5396826
Bump node.js dependencies 2025-07-28 14:49:02 +05:30
Shivam Mathur
a0d5abedf1
Revert hiredis patch 2025-07-28 14:49:02 +05:30
Shivam Mathur
102ffdc294
Add patch for gearman [skip ci] 2025-07-28 14:47:16 +05:30
Shivam Mathur
97cf0581e3
Filter shared extensions to enable on Windows 2025-07-28 13:30:51 +05:30
Shivam Mathur
bac87fed32
Cleanup in cubrid.sh 2025-07-20 02:01:02 +05:30
Shivam Mathur
b9341130b4
Fix mirror setup in ppa.sh 2025-07-20 02:00:10 +05:30
Shivam Mathur
e1dc734412
Remove ondrej/pkg-gearman ppa [skip ci] 2025-07-20 01:48:35 +05:30
copilot-swe-agent[bot]
20169f80b7 Add -Force to Move-Item in mago.ps1 to handle workflow reruns
Co-authored-by: shivammathur <1571086+shivammathur@users.noreply.github.com>
2025-07-17 11:52:44 +00:00
copilot-swe-agent[bot]
ec1e2c6601 Fix mago extraction paths for binary location in subdirectories
Co-authored-by: shivammathur <1571086+shivammathur@users.noreply.github.com>
2025-07-17 11:44:09 +00:00
copilot-swe-agent[bot]
5581e61575 Update test and README for mago tool - remove 'latest' from test and add to README
Co-authored-by: shivammathur <1571086+shivammathur@users.noreply.github.com>
2025-07-17 11:27:31 +00:00
copilot-swe-agent[bot]
de4f59c442 Address PR review feedback - simplify validation and remove license display
Co-authored-by: shivammathur <1571086+shivammathur@users.noreply.github.com>
2025-07-17 11:16:20 +00:00
copilot-swe-agent[bot]
26dc9b4fed Add mago tool support as custom package
Co-authored-by: shivammathur <1571086+shivammathur@users.noreply.github.com>
2025-07-17 10:57:30 +00:00
copilot-swe-agent[bot]
8d11cf02d2 Initial plan 2025-07-17 10:44:21 +00:00
Shivam Mathur
8aee7c58b7
Sort tools.json [skip ci] 2025-07-17 15:05:00 +05:30
Shivam Mathur
725b40730f
Merge pull request #974 from shivammathur/copilot/fix-d6851e4e-e860-4989-8c53-4391e7116ea7
Add support for roave/backward-compatibility-check tool
2025-07-17 14:59:25 +05:30
Shivam Mathur
b8f4bf011c
Merge branch 'develop' into copilot/fix-d6851e4e-e860-4989-8c53-4391e7116ea7 2025-07-17 14:58:44 +05:30
copilot-swe-agent[bot]
f9fbb516a6 Address review feedback: revert src/tools.ts, remove run.sh, rename tool to backward-compatibility-check
Co-authored-by: shivammathur <1571086+shivammathur@users.noreply.github.com>
2025-07-17 08:54:16 +00:00
copilot-swe-agent[bot]
987ba5bfe9 Add support for roave/backward-compatibility-check tool
Co-authored-by: shivammathur <1571086+shivammathur@users.noreply.github.com>
2025-07-17 08:37:06 +00:00
copilot-swe-agent[bot]
9dffd40113 Add roave/backward-compatibility-check tool support
Co-authored-by: shivammathur <1571086+shivammathur@users.noreply.github.com>
2025-07-17 08:34:50 +00:00
copilot-swe-agent[bot]
2dfe351907 Initial plan 2025-07-17 08:22:49 +00:00
Shivam Mathur
1897d72bb4
Merge pull request #973 from shivammathur/copilot/fix-74435ef3-8c22-4393-8d87-090d0d41f7fa
Add support for shipmonk/name-collision-detector tool
2025-07-17 13:42:50 +05:30
copilot-swe-agent[bot]
879090af77 Add link for name-collision-detector tool in README
Co-authored-by: shivammathur <1571086+shivammathur@users.noreply.github.com>
2025-07-17 08:07:21 +00:00
copilot-swe-agent[bot]
a3845d84ae Add name-collision-detector to README tools section
Co-authored-by: shivammathur <1571086+shivammathur@users.noreply.github.com>
2025-07-17 08:01:28 +00:00
copilot-swe-agent[bot]
24d382d1f8 Add support for shipmonk/name-collision-detector tool
Co-authored-by: shivammathur <1571086+shivammathur@users.noreply.github.com>
2025-07-17 07:25:13 +00:00
copilot-swe-agent[bot]
7a5da9d8dc Initial plan 2025-07-17 07:15:57 +00:00
Shivam Mathur
011ab6e363
Update sponsors section 2025-07-17 07:32:30 +05:30
Shivam Mathur
545bc26d45
Minor fix in README 2025-07-17 07:32:30 +05:30
Shivam Mathur
55463ffe4f
Add support for github-token input 2025-07-17 07:32:24 +05:30
Shivam Mathur
2a3befd7ab
Do not fallback extension to default version on fail-fast 2025-07-17 05:07:54 +05:30
Shivam Mathur
7cc4441283
Use ppa.setup-php.com [skip ci] 2025-07-17 04:49:47 +05:30
Shivam Mathur
4a4c5a48bb
Update dependencies 2025-07-09 05:18:20 +05:30
Shivam Mathur
3514a658eb
Update branch references to main 2025-07-09 04:36:51 +05:30
Shivam Mathur
7aefaa0b54
Merge pull request #967 from jrfnl/feature/readme-fix-broken-link
README: fix broken link
2025-06-25 05:04:51 +05:30
jrfnl
048eb79ef3
README: fix broken link 2025-06-25 01:31:29 +02:00
Shivam Mathur
29247235f0
Merge pull request #966 from OskarStark/patch-1
⚙ Improvement: Update docs
2025-06-24 20:41:11 +05:30
Oskar Stark
e84efebd6e
Update docs
As version 2 is the standard right now, make it clear by setting the v1 manually.
2025-06-24 17:39:04 +03:00
Shivam Mathur
0f7f1d08e3
Upgrade to Jest 30 2025-06-13 02:06:31 +05:30
Shivam Mathur
433bdeeaf0
Bump version to 2.34.1 2025-06-12 03:52:26 +05:30
Shivam Mathur
1c5378302c
Update node.js dependencies 2025-06-11 15:17:10 +05:30
Shivam Mathur
c251c791ff
Fix pipe in get_sha256 2025-06-11 15:00:38 +05:30
Shivam Mathur
36fada6981
Fix tool-cache directory on self-hosted runners 2025-06-11 14:57:09 +05:30
Shivam Mathur
27853eb8b4
Cleanup up PPA fallback mirror 2025-06-10 15:33:24 +05:30
Shivam Mathur
18b776ee45
Update ppa filename to match apt-add-repository 2025-06-10 04:51:11 +05:30
Shivam Mathur
2ec652d38d
Fix locking permissions in get function 2025-06-10 03:20:10 +05:30
Shivam Mathur
8d8f975af3
Pin hiredis version to 1.1 for relay [skip ci] 2025-06-09 20:03:18 +05:30
Shivam Mathur
12b910a04d
Add support for COMPOSER_ALLOW_PLUGINS 2025-06-09 17:30:41 +05:30
Shivam Mathur
962fc445e2
Bump version to 2.34.0
Bump Node.js dependencies
2025-06-09 15:52:38 +05:30
Shivam Mathur
6ba658ae8d
Merge pull request #957 from cmb69/cmb/phive-0.15.3
Lock Phive version for PHP 7.3/7.4
2025-06-03 18:18:52 +05:30
Christoph M. Becker
c954e9c756
Lock Phive version for PHP 7.3/7.4
Latest Phive (0.16.0) claims to require PHP 8.0 or later[1].  While I
have not found any issues running it under PHP 7.4, it might be better
to stick with Phive 0.15.3 for PHP 7.3/7.4.

[1] <https://github.com/phar-io/phive/releases/tag/0.16.0>
2025-06-03 14:35:02 +02:00
Shivam Mathur
b595b415e2
Add fallback for the manifest URL 2025-05-19 08:09:13 +05:30
Shivam Mathur
9c22be2b20
fail fast in source.sh 2025-05-18 05:58:02 +05:30
Shivam Mathur
ac0e29410e
Merge pull request #950 from shivammathur/dependabot/npm_and_yarn/npm_and_yarn-87115a91ec
Bump undici from 5.28.5 to 5.29.0 in the npm_and_yarn group across 1 directory
2025-05-16 07:13:42 +05:30
dependabot[bot]
2cae8ac286
Bump undici in the npm_and_yarn group across 1 directory
Bumps the npm_and_yarn group with 1 update in the / directory: [undici](https://github.com/nodejs/undici).


Updates `undici` from 5.28.5 to 5.29.0
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.5...v5.29.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 5.29.0
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-15 16:31:38 +00:00
Shivam Mathur
df8d123345
Improve self-hosted detection 2025-05-08 14:38:46 +05:30
Shivam Mathur
d371420c90
Remove copying extension dependencies 2025-05-08 14:30:01 +05:30
Shivam Mathur
287979ae16
Merge pull request #948 from alcaeus/add-pie-support
Add tool support for pie
2025-05-08 14:05:07 +05:30
Andreas Braun
dd942787eb
Add support for pie in tools 2025-05-08 09:46:50 +02:00
Shivam Mathur
d000f49d9a
Merge pull request #945 from JMoodyFWD/tools_dir_path-rename
Change TOOLS_DIR to SETUP_PHP_TOOLS_DIR to prevent regression
2025-05-06 23:46:51 +05:30
JMoodyFWD
dc7e73e115 Change TOOLS_DIR to SETUP_PHP_TOOLS_DIR to prevent regression 2025-05-06 11:00:13 -06:00
Shivam Mathur
755f6046e1
Add missing self_hosted_helper in darwin.sh 2025-04-30 15:30:13 +05:30
Shivam Mathur
ec0360b904
Make sure tap directories on macOS exist 2025-04-21 22:13:27 +05:30
Shivam Mathur
373563aabe
Update os_releases 2025-04-17 08:59:08 +05:30
Shivam Mathur
cf4cade272
Drop support for ubuntu-20.04 [skip ci] 2025-04-14 07:25:31 +05:30
Shivam Mathur
316da6edfb
Fix phalcon and zephir_parser support on Windows 2025-04-14 07:11:13 +05:30
Shivam Mathur
34061fa6b4
Fix relay support on macOS 2025-04-14 07:11:08 +05:30
Shivam Mathur
b7bd9e4655
Bump version to 2.33.0 2025-04-13 00:13:54 +05:30
Sn0wCrack
78e1c95060
feat: set this via an environment variable instead 2025-04-07 12:29:02 +05:30
Sn0wCrack
310e481b83
feat: allow tools path directory to be set
also add a .node-version file
2025-04-07 12:28:57 +05:30
Shivam Mathur
42a9487ddd
Fix pdo_oci 2025-03-15 04:43:12 +05:30
Shivam Mathur
f5d98d1683
Improve support for phalcon5 and zephir_parser 2025-03-14 21:26:51 +05:30
Shivam Mathur
1a94db50cb
Update dependencies 2025-03-14 20:36:54 +05:30
Shivam Mathur
1489f576c9
Merge pull request #928 from jg-development/main
switch to launchpadcontent #927 close
2025-03-14 18:16:42 +05:30
Jan Gantzert
f25b1cfdcc switch to launchpadcontent #927 close 2025-03-14 13:31:13 +01:00
Shivam Mathur
3209251719
Merge pull request #921 from hms5232/update-ubuntu-latest-to-24
Move `ubuntu-latest` to 24.04
2025-02-25 14:47:34 +05:30
hms5232
8ad85316fe
Move ubuntu-latest to 24.04 2025-02-25 12:57:46 +08:00
Shivam Mathur
297b3cde3c
Merge pull request #917 from voodooism/feature/priority-for-openswoole-ext
Change openswoole priority
2025-02-18 20:02:29 +05:30
Roman Andreev
4eb1919d22 Change openswoole priority 2025-02-18 14:09:04 +01:00
Shivam Mathur
d8af2f43ce
Merge pull request #915 from DanielEScherzer/patch-1
README: update list of PHP versions
2025-02-15 15:19:01 +05:30
DanielEScherzer
d3fead0baf
README: update list of PHP versions
PHP 8.2 is no longer in active support and only receives security fixes, see
announcement at <https://news-web.php.net/php.internals/126138>.
2025-02-14 21:14:48 -08:00
Shivam Mathur
6cd838e903
Add fallback for launchpad API 2025-02-10 16:57:17 +05:30
Shivam Mathur
3bfebc13bc
Add fallback url for phpunit tools 2025-02-07 05:40:29 +05:30
Shivam Mathur
89a5bffb0b
Improving locking process in get 2025-02-06 02:33:08 +05:30
Shivam Mathur
260b35cca0
Add support for blackfire on PHP 8.4 2025-02-01 21:27:42 +05:30
Shivam Mathur
f902cc7bd9
Update ioncube support till PHP 8.4 2025-02-01 20:59:07 +05:30
Shivam Mathur
ad03a92562
Use Markdown highlighting in README for notes 2025-02-01 08:55:51 +05:30
Shivam Mathur
a99dd2408e
Merge pull request #907 from shivammathur/dependabot/npm_and_yarn/npm_and_yarn-2c579f9325
Bump undici from 5.28.4 to 5.28.5 in the npm_and_yarn group
2025-01-22 07:12:09 +05:30
dependabot[bot]
a7d262f1d8
Bump undici from 5.28.4 to 5.28.5 in the npm_and_yarn group
Bumps the npm_and_yarn group with 1 update: [undici](https://github.com/nodejs/undici).


Updates `undici` from 5.28.4 to 5.28.5
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.4...v5.28.5)

---
updated-dependencies:
- dependency-name: undici
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-22 00:45:26 +00:00
Shivam Mathur
c1750d382b
Add aarch64 ubuntu runners in OS support [skip ci] 2025-01-22 04:56:05 +05:30
Shivam Mathur
6516e9cb24
Add support for arm64 icu and intl builds 2025-01-22 04:56:05 +05:30
Shivam Mathur
783c77d669
Fix sed for macos in patch script 2025-01-22 04:56:05 +05:30
Shivam Mathur
b0064cd05b
Fix arm support for some tools and extensions [skip ci] 2025-01-22 04:56:05 +05:30
Shivam Mathur
fd913ba092
Fix composer normalize version [skip ci] 2025-01-22 04:56:05 +05:30
Shivam Mathur
21e092a3e0
Merge pull request #900 from deguif/update-php-cs-fixer-repository
Update php-cs-fixer repository organisation
2025-01-08 17:53:40 +05:30
François-Xavier de Guillebon
64652c947d
Update php-cs-fixer repository organisation 2025-01-08 11:13:54 +01:00
Shivam Mathur
9e72090525
Fix composer-dependency-analyser packagist repository 2024-12-30 21:54:47 +05:30
Shivam Mathur
34b79cab10
Improve docs for php-version-file input 2024-12-30 21:47:27 +05:30
Shivam Mathur
e5af5d68b4
Update default version in linux.sh and darwin.sh 2024-12-30 20:17:07 +05:30
Shivam Mathur
ba21a89e0b
Pass prefix options to make in source.sh 2024-12-29 09:22:49 +05:30
Shivam Mathur
12b88cf3e2
Fix building pdo_firebird on macOS with clang 15 2024-12-29 09:17:30 +05:30
Shivam Mathur
cffd8ca58a
Fix libssl link in couchbase [skip ci] 2024-12-28 18:26:04 +05:30
Shivam Mathur
85ed51cf85
Fix support for zephir_parser 2024-12-28 18:15:07 +05:30
Shivam Mathur
5bb2eed0aa
Fix oci extension support on Windows for PHP 8.4 and above 2024-12-28 02:07:42 +05:30
Shivam Mathur
96fb539134
Bump node dependencies 2024-12-26 18:03:23 +05:30
Shivam Mathur
775fa76ea4
Do not upgrade when version is pre-installed on macOS 2024-12-23 16:27:45 +05:30
Shivam Mathur
da729085ef
Add support for pre-installed PHP 2024-12-23 16:04:30 +05:30
Shivam Mathur
b6d8115f12
Add support for .tool-versions format in php-version-file 2024-12-23 15:27:22 +05:30
Shivam Mathur
84f76b1fc9
Add support for composer files in sub-directory 2024-12-23 14:36:14 +05:30
Shivam Mathur
cdfde5ebec
Fix update on multiple installs in same job 2024-12-23 07:33:26 +05:30
Shivam Mathur
7e98140142
Add windows-2025 to the readme 2024-12-19 22:54:36 +05:30
Shivam Mathur
85a8dfd0c7
Rebuild release file 2024-12-14 03:27:47 +05:30
Shivam Mathur
7ee42db5db
Merge pull request #892 from tillkruss/patch-2
Relay: Support PHP 8.4 and 8.5
2024-12-13 21:56:33 +00:00
Till Krüss
cdbb89961e
support 8.4 and 8.5 for relay 2024-12-13 09:24:59 -08:00
Shivam Mathur
19ba822314
Merge pull request #890 from alexmerlin/fix-github-workflows-docs
Fixed syntax error in `.github/workflows/docs.yml`
2024-12-02 09:20:29 +00:00
alexmerlin
fb9c2a9f77 Fixed typo in GitHub workflows docs.yml
Signed-off-by: alexmerlin <alex@dotkernel.com>
2024-12-02 11:04:50 +02:00
Shivam Mathur
e7453ef93f
Merge pull request #889 from alexmerlin/fix-readme-typo
Fixed small typo in `README.md`
2024-12-02 08:52:14 +00:00
alexmerlin
efd3a13445 Fixed small typo in README.md
Signed-off-by: alexmerlin <alex@dotkernel.com>
2024-12-02 10:18:57 +02:00
Shivam Mathur
981ce2a75a
Do not add composer in docs workflow 2024-12-01 07:14:07 +05:30
Shivam Mathur
d97b3754a8
Fix fetching libraries on old PHP on Windows 2024-12-01 06:10:56 +05:30
Shivam Mathur
edf0223f7d
Add extension type in docs workflow 2024-12-01 06:00:17 +05:30
Shivam Mathur
516490f3d1
Update versions in manifect and win32.ps1 2024-12-01 04:45:08 +05:30
Shivam Mathur
e77cdb393f
Update PHP version in README [skip ci] 2024-11-23 03:49:40 +05:30
Shivam Mathur
944fb41c67
Merge pull request #884 from shivammathur/dependabot/github_actions/develop/codecov/codecov-action-5
Bump codecov/codecov-action from 4 to 5
2024-11-18 15:08:19 +00:00
dependabot[bot]
0830e5d434
Bump codecov/codecov-action from 4 to 5
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-18 14:43:15 +00:00
Shivam Mathur
ae95648cfc
Bump Node.js dependencies 2024-11-18 19:32:14 +05:30
Shivam Mathur
a75ffb672b
Fix status code output in get function 2024-11-12 02:20:20 +05:30
Shivam Mathur
80075aeba5
Wait in get till no processes are using the output filepath 2024-11-11 14:32:06 +05:30
Shivam Mathur
449afbcaec
Handle race condition in get on a mutli self-hosted runners setup 2024-11-11 12:53:09 +05:30
Shivam Mathur
ce2f681d22
Add macos-15 to the README 2024-11-04 10:07:31 +05:30
Shivam Mathur
cb0fc744e6
Use windows-2022 in php workflow 2024-11-04 09:56:32 +05:30
Shivam Mathur
58a6e6fb4b
Add PHP 8.5 to the workflows 2024-11-04 09:55:55 +05:30
Shivam Mathur
bf9d25532d
Improve docs workflow 2024-11-04 09:55:00 +05:30
Shivam Mathur
4662a3d03c
Add PHP 8.5 to the README 2024-11-04 09:48:51 +05:30
Shivam Mathur
e4fb5432c7
Refactor issue templates to issue forms 2024-11-04 09:43:52 +05:30
Shivam Mathur
7f1cfc01ec
Bump version to 2.32.0
Update Node.js dependencies

Migrate eslint config to a mjs file

Fix imports in tests

Bump to Node.js 20.x in workflows
2024-11-04 08:55:26 +05:30
Shivam Mathur
371ee9d086
Fix zts support on self-hosted envs 2024-11-04 08:20:56 +05:30
Shivam Mathur
51383ecefe
Fix adding debug package lists 2024-11-04 07:45:52 +05:30
Shivam Mathur
cf36231a82
Remove macos-12 from docs workflow [skip ci] 2024-10-21 06:20:59 +05:30
Shivam Mathur
9f51892bda
Drop support for macos-12 2024-09-16 21:50:26 +05:30
Shivam Mathur
53f82379e8
Merge pull request #859 from janedbal/composer-dependency-analyser
Support composer-dependency-analyser tool
2024-07-17 03:25:37 +00:00
Jan Nedbal
24eff50574 Support composer-dependency-analyser 2024-07-15 15:14:10 +02:00
Shivam Mathur
15b611248c
Update debian version support in README 2024-07-14 07:04:11 +05:30
Shivam Mathur
6e5c13cd3c
Bump version to 2.31.2 2024-07-14 02:49:56 +05:30
Shivam Mathur
e07eecf7a4
Update Node.js dependencies 2024-07-14 02:48:56 +05:30
Shivam Mathur
57a6e91640
Test without HOMEBREW_DEVELOPER=1 2024-07-14 02:21:00 +05:30
Shivam Mathur
c541c155ee
Bump version 2.31.1
Update Node.js dependencies
2024-07-08 16:11:28 +05:30
Shivam Mathur
afff805ea3
Fix cache support for ioncube 2024-07-02 18:02:33 +05:30
Shivam Mathur
594bd591ec
Fix version regex in Add-Extension 2024-07-01 22:34:55 +05:30
Shivam Mathur
2e947f1f69
Bump version to 2.31.0
Update Node.js dependencies
2024-06-24 03:19:18 +05:30
Shivam Mathur
2a5212466c
Add fallback mirror for php PPA when launchpad is down 2024-06-24 02:56:51 +05:30
Shivam Mathur
9c28f9ba58
Fix support for phalcon on PHP 7.4 2024-06-23 18:30:14 +05:30
Shivam Mathur
b9f1db485f
Improve support for firebird 2024-06-23 18:12:47 +05:30
Shivam Mathur
588b5da142
Fix support for couchbase on Ubuntu 24.04 2024-06-23 18:12:42 +05:30
Shivam Mathur
a0edbac27b
Fix support for blackfire 2024-06-23 08:15:22 +05:30
Shivam Mathur
606ac25b84
Fix oci extension support on Ubuntu 24.04 2024-06-23 07:54:02 +05:30
Shivam Mathur
ea566b68c0
Fix support for relay 2024-06-23 07:41:47 +05:30
Shivam Mathur
4f124b97f7
Merge pull request #853 from shivammathur/dependabot/npm_and_yarn/braces-3.0.3
Bump braces from 3.0.2 to 3.0.3
2024-06-16 21:46:00 +05:30
dependabot[bot]
8fe6ba1e38
Bump braces from 3.0.2 to 3.0.3
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-16 13:17:43 +00:00
Shivam Mathur
193510cd90
Link apt-fast to apt-get if missing 2024-06-16 08:07:19 +05:30
Shivam Mathur
b5f04d97d9
Bump version to 2.30.6
Update Node.js dependencies
2024-06-16 07:39:23 +05:30
Shivam Mathur
4b56933e00
Add dkpg option to overwrite conf files 2024-06-16 07:39:18 +05:30
Shivam Mathur
fc14643b0a
Fix brew link step
We add --overwrite parameter to brew install and upgrade commands, so that in the linking step it does not fail if another php version is linked
2024-06-02 23:04:56 +05:30
Shivam Mathur
fdb0d9d1a7
Add PHP 8.3 support for zephir parser 2024-06-02 07:32:16 +05:30
Shivam Mathur
622cada40f
Bump Node.js dependencies 2024-05-28 12:43:43 +05:30
Shivam Mathur
2a620039e8
Fix priority for ev extension 2024-05-28 12:31:00 +05:30
Shivam Mathur
376a964e21
Implement ioncube support on unix correctly
I think I jumped the shark with this one for this project
2024-05-22 06:54:49 +05:30
Shivam Mathur
d6560b1fbb
Document and test support for ubuntu-24.04 2024-05-17 19:19:10 +05:30
Shivam Mathur
868f02c3ff
Improve support for deb822 system sources file 2024-04-27 21:04:56 +05:30
Shivam Mathur
18975ec414
Fix ecs config 2024-04-26 02:16:03 +05:30
Shivam Mathur
c49792fb59
Merge pull request #838 from em411/feature/ecs-support
Add support for ecs
2024-04-26 02:03:46 +05:30
em411
806c3cc058 Add support for ecs 2024-04-25 21:59:57 +02:00
Shivam Mathur
c665c7a15b
Bump version to 2.30.4 2024-04-24 03:54:07 +05:30
Shivam Mathur
b30e4bc764
Document that only PHP 5.6 and above are supported on arm64 macos runners 2024-04-24 03:52:52 +05:30
Shivam Mathur
436881d084
Set macos version in php workflow to macos-13 2024-04-24 03:38:15 +05:30
Shivam Mathur
14d9660823
Fix support for sqlsrv and pdo_sqlsrv 2024-04-24 03:05:05 +05:30
Shivam Mathur
efffd0e4f2
Bump version to 2.30.3 2024-04-21 18:55:19 +05:30
Shivam Mathur
d802457674
Fix reading extension_dir in PHP 8.4 on macOS 2024-04-21 18:16:08 +05:30
Shivam Mathur
8872c784b0
Bump version to 2.30.2
Update Node.js dependencies
2024-03-31 03:53:16 +05:30
Shivam Mathur
b203b24815
Hotfix: update brew along with core tap 2024-03-31 03:51:38 +05:30
Shivam Mathur
116fe4df69
Add vld for macOS 2024-03-26 17:29:27 +05:30
Shivam Mathur
73963f5001
Uprade existing macOS version 2024-03-25 07:30:22 +05:30
Shivam Mathur
f4fb0af4d5
Fix phalcon5 support on Windows 2024-03-25 07:27:19 +05:30
Shivam Mathur
eb73c01f76
Fix oci extensions for PHP 8.4 2024-03-25 03:47:20 +05:30
Shivam Mathur
3d8c10397e
Fix support for sqlsrv and pdo_sqlsrv extensions 2024-03-25 03:10:43 +05:30
Shivam Mathur
db8db3c7c7
Fix type error in Get-File in win32.ps1 2024-03-25 02:42:14 +05:30
Shivam Mathur
31bfabaf56
Bump Node.js dependencies 2024-03-25 01:05:36 +05:30
Shivam Mathur
21eeae309a
Cleanup dependency code on macOS and add retry to git fetch 2024-03-18 09:02:23 +05:30
Shivam Mathur
48e0de2ea6 Update Pre-installed PHP version in Windows runners in README 2024-03-10 12:07:59 +05:30
Shivam Mathur
88841d1465 Update default PHP versions in README for GH runners 2024-03-03 07:41:03 +05:30
Shivam Mathur
a4e22b60bb Bump version to 2.30.0 2024-03-01 12:06:41 +05:30
Shivam Mathur
4f6ab99328 Sync brew core tap for all runners 2024-03-01 12:06:34 +05:30
Shivam Mathur
a870b0a9be Update README [skip ci] 2024-02-24 11:34:19 +05:30
Markus Podar
67271131b1 Update README.md
actions/cache 4 was already released
2024-02-23 02:37:15 +05:30
Shivam Mathur
a6ce3f5633 Add support to use existing COMPOSER_PROCESS_TIMEOUT 2024-02-22 12:06:24 +05:30
Shivam Mathur
1a5ac4aa9a Add more notes about debugging symbols in README [skip ci] 2024-02-22 11:25:40 +05:30
Shivam Mathur
765279d5ef
Merge pull request #813 from shivammathur/dependabot/github_actions/develop/codecov/codecov-action-4
Bump codecov/codecov-action from 3 to 4
2024-02-05 20:19:56 -08:00
dependabot[bot]
d71d15b3b3
Bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 10:57:17 +00:00
Shivam Mathur
ad24e86677
Merge pull request #812 from shivammathur/dependabot/github_actions/develop/actions/cache-4
Bump actions/cache from 3 to 4
2024-01-22 15:41:53 +05:30
dependabot[bot]
73dfd2f824
Bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 10:07:33 +00:00
Shivam Mathur
6d7209f44a
Add patch for old random headers on PHP 8.4 2024-01-15 11:14:26 +05:30
Shivam Mathur
2ee6851e7b
Bump Node.js dependencies 2024-01-15 03:40:39 +05:30
Shivam Mathur
353ba41d44
Add support for phalcon on PHP 8.3 2024-01-07 01:12:10 +05:30
Shivam Mathur
5c424d6c81
Mark v1 as unsupported 2024-01-01 01:55:48 +05:30
Shivam Mathur
e927136b25
Bump Node.js dependencies
Bump version to 2.29.0
2024-01-01 01:34:06 +05:30
Shivam Mathur
35557a3770
Update coverage in install.test.ts 2024-01-01 01:31:20 +05:30
Shivam Mathur
43e870b2d0
Add highest alias as an alternative to latest 2024-01-01 01:26:40 +05:30
Shivam Mathur
dc1a77b457
Fix support for http extension on zts and debug on macOS 2023-12-26 12:46:29 +05:30
Shivam Mathur
812360879e
Add support for zts and debug extensions on macOS 2023-12-26 02:19:32 +05:30
Shivam Mathur
201dd6c1db
Add zts support on macOS 2023-12-25 03:09:27 +05:30
Shivam Mathur
97e0a9729a
Revert bumping PHP version for snapshot minimum stability. 2023-12-24 02:21:23 +05:30
Shivam Mathur
5a2bd88cb3
Try to fix docs workflow 2023-12-24 02:12:22 +05:30
Shivam Mathur
7ba520ae30
Merge pull request #804 from shivammathur/dependabot/github_actions/develop/actions/download-artifact-4
Bump actions/download-artifact from 3 to 4
2023-12-18 16:53:51 +05:30
Shivam Mathur
f47a6e7ca3
Merge pull request #805 from shivammathur/dependabot/github_actions/develop/actions/upload-artifact-4
Bump actions/upload-artifact from 3 to 4
2023-12-18 16:53:40 +05:30
Shivam Mathur
e1c6cff579
Merge pull request #803 from shivammathur/dependabot/github_actions/develop/github/codeql-action-3
Bump github/codeql-action from 2 to 3
2023-12-18 16:53:09 +05:30
dependabot[bot]
6e825ca69e
Bump actions/upload-artifact from 3 to 4
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 10:33:19 +00:00
dependabot[bot]
7b1eaadfbb
Bump actions/download-artifact from 3 to 4
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 10:33:16 +00:00
dependabot[bot]
5b709ff10e
Bump github/codeql-action from 2 to 3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 10:33:13 +00:00
Shivam Mathur
ed98159fe9
Fix PHP 8.3 support status in README. Closes #802 2023-12-14 18:50:41 +05:30
Shivam Mathur
58f08c5f7c
Add box and php-scoper in tools support in README 2023-12-14 16:38:02 +05:30
Shivam Mathur
9e24ffafe7
Merge pull request #800 from davereid/patch-2
Document php-version can come from platform overrides in composer.lock or composer.json
2023-12-08 08:02:43 +05:30
Dave Reid
5eca5d1c47
Update README.md 2023-12-07 16:02:03 -06:00
Shivam Mathur
c085ca391e
Merge pull request #794 from davereid/patch-1
Provide a "lowest" php-version parameter
2023-12-08 00:14:49 +05:30
Dave Reid
93745da978 Updated files after npm run build. 2023-12-07 12:23:09 -06:00
Dave Reid
c088c0cfeb
Document php-version can come from platform overrides in composer.lock and composer.json 2023-12-07 10:53:24 -06:00
Dave Reid
86b90110cb
Update php.yml 2023-12-07 10:46:39 -06:00
Dave Reid
1a102bc9f2
Update utils.ts 2023-12-07 09:44:35 -06:00
Shivam Mathur
131ba03b0d
Fix phalcon support 2023-12-07 08:15:34 +05:30
Shivam Mathur
e8cd65f444
Switch to PHPCSStandards/PHP_CodeSniffer for phpcs and phpcbf 2023-12-04 08:00:30 +05:30
Dave Reid
2810265746
Update php.yml 2023-11-30 09:53:39 -06:00
Dave Reid
dab726e922
Provide a "lowest" php-version parameter 2023-11-29 20:26:11 -06:00
Shivam Mathur
e6f75134d3
Update phpts section in README 2023-11-27 18:07:02 +05:30
Shivam Mathur
1874353919
Fix linking grpc on macos but installed along protoc 2023-11-27 17:08:32 +05:30
Shivam Mathur
eea39ea741
Disable xdebug and pcov when blackfire extension is installed 2023-11-27 16:39:18 +05:30
Shivam Mathur
bac56c8d91
Add patch for geos 2023-11-27 15:47:27 +05:30
Shivam Mathur
124d256c78
Add back support for nightly builds on self-hosted 2023-11-27 14:52:14 +05:30
Shivam Mathur
eeddcfe955
Bump version to 2.28.0
Update Node.js dependencies
2023-11-27 13:57:32 +05:30
Shivam Mathur
de2903ad82
Fix installing zts builds 2023-11-26 03:55:45 +05:30
Shivam Mathur
bbe1204148
Use cached builds for zts 2023-11-26 03:34:57 +05:30
Shivam Mathur
99a92d54d5
Test cache for PHP 8.3 and PHP 8.4 2023-11-24 01:06:24 +05:30
Shivam Mathur
7c6c249257
Mark PHP 8.3 as stable 2023-11-23 17:12:56 +05:30
Shivam Mathur
e6d44f159a
Add PHP 8.4 to wiki extension pages 2023-11-23 12:12:26 +05:30
Shivam Mathur
dc513528da
Update os in docs workflow 2023-11-23 11:57:50 +05:30
Shivam Mathur
bfbd3882c0
Merge pull request #787 from jrfnl/feature/ghactions-update-for-php-8.3
GH Actions/docs workflow: generate extensions page for PHP 8.3
2023-11-22 20:37:08 -08:00
jrfnl
3c525df325
GH Actions/docs workflow: generate extensions page for PHP 8.3 2023-11-23 03:19:38 +01:00
Shivam Mathur
a36e1e52ff
Bump version to 2.27.1
Bump Node.js dependencies
2023-11-07 13:55:37 +05:30
Shivam Mathur
04ff9b08a2
Add HOMEBREW_NO_INSTALL_FROM_API=1 to darwin.sh 2023-11-07 13:43:28 +05:30
Shivam Mathur
65fad67e88
Fix updating homebrew dependencies after sharding in core tap 2023-11-07 13:11:56 +05:30
Shivam Mathur
6668249e24
Merge pull request #778 from shivammathur/dependabot/github_actions/develop/actions/setup-node-4
Bump actions/setup-node from 3 to 4
2023-11-06 04:04:01 -08:00
dependabot[bot]
81c255f988
Bump actions/setup-node from 3 to 4
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-06 11:00:34 +00:00
Shivam Mathur
81cd5ae092
Bump version to 2.27.0 2023-11-01 19:56:15 +05:30
Shivam Mathur
29a9813921
Add required extensions for box 2023-11-01 10:23:55 +05:30
Shivam Mathur
f60e7de98e
Add PHP 8.4 to the php workflow
Enable PHP 8.3 for macOS in the php workflow
2023-11-01 09:35:10 +05:30
Shivam Mathur
b5efb21934
Add tests for box and php-scoper 2023-11-01 09:29:02 +05:30
Shivam Mathur
26e6a92f3b
Merge pull request #776 from theofidry/patch-1
feat: Add Box and PHP-Scoper as tools
2023-11-01 08:53:26 +05:30
Théo FIDRY
28b68529b5
feat: Add Box and PHP-Scoper as tools 2023-11-01 08:53:26 +05:30
Shivam Mathur
4e4861ec30
Fix support for couchbase on PHP 7.4 2023-10-30 08:11:09 +05:30
Shivam Mathur
70169700c3
Try to improve couchbase compilation 2023-10-30 06:58:16 +05:30
Shivam Mathur
f4e27c9ead
Bump Node.js dependencies
Bump version to 2.26.1
2023-10-30 01:47:34 +05:30
Shivam Mathur
9855c76987
Set keepAlive to false. After Node 19 it is true by default. 2023-10-30 01:38:35 +05:30
Shivam Mathur
546935924a
Merge pull request #771 from shivammathur/dependabot/npm_and_yarn/babel/traverse-7.23.2
Bump @babel/traverse from 7.22.5 to 7.23.2
2023-10-19 16:04:25 +05:30
dependabot[bot]
491e9de600
Bump @babel/traverse from 7.22.5 to 7.23.2
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.5 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-10-19 09:40:39 +00:00
Shivam Mathur
e3bda5bed8
Add support for macOS Sonoma (14) and drop support for Big Sur (11) 2023-10-01 19:03:17 +05:30
Shivam Mathur
e70f6d9e7c
Fallback to pecl in add_brew_extension on macOS 2023-10-01 18:49:44 +05:30
Shivam Mathur
92e992b198
Update versioning section in the README 2023-09-23 04:32:24 +05:30
Shivam Mathur
99680be1df
Rename branch in README 2023-09-23 03:29:31 +05:30
Shivam Mathur
e83e329355
Fix find call in darwin.sh in copy_brew_extensions on failure 2023-09-22 14:07:12 +05:30
Shivam Mathur
10c12b9377
Fix checking for existing php formula on macOS 2023-09-22 14:00:55 +05:30
Shivam Mathur
91026460e4
Create tool_path_dir if it does not exist 2023-09-22 08:15:57 +05:30
Shivam Mathur
7fdd3ece87
Fix blackfire-player on Linux and macOS
Drop support for blackfire-player on Windows
2023-09-14 02:51:49 +05:30
Shivam Mathur
0de5aa9140
Bump version to 2.26.0 2023-09-14 02:51:49 +05:30
Shivam Mathur
a6e0b1404f
Bump Node.js dependencies 2023-09-14 02:51:48 +05:30
Shivam Mathur
5d259c66b1
Bump node version to 20 in action.yml
Node 16 is EOL on 2023-09-11 so we update it to Node 20 that was added in the actions/runner in v2.308.0
2023-09-14 02:51:48 +05:30
Shivam Mathur
6207829361
Update use of actions/checkout to v4 2023-09-14 02:51:47 +05:30
Shivam Mathur
319feb83c2
Add support to install sqlsrv and pdo_sqlsrv from GitHub releases 2023-09-14 02:51:41 +05:30
Shivam Mathur
661ad4bf75
Fix enabling latest pecl extensions 2023-09-09 08:53:07 +05:30
Shivam Mathur
04c15e2314
Remove hardcoded latest version for sqlsrv and pdo_sqlsrv 2023-09-09 08:05:42 +05:30
Shivam Mathur
5aa416d77b
Merge pull request #766 from GrahamCampbell/patch-1
Use sqlsvr 5.11.1 on PHP 8
2023-09-09 07:18:11 +05:30
Graham Campbell
a9a661ccd4
Use sqlsvr 5.11.1 on PHP 8 2023-09-09 00:45:36 +01:00
Shivam Mathur
321f8d7d9a
Add PHP 8.4 in the README 2023-08-30 15:15:56 +05:30
Shivam Mathur
7af6c0fe6f
Update Node.js dependencies 2023-08-30 15:15:56 +05:30
Shivam Mathur
36e04fc85c
Merge pull request #754 from jasongill/develop
Add automatic detection of required PHP version from Composer's platform setting
2023-07-30 08:50:55 +05:30
Jason Gill
95916a72b1 Only use config.platform.php, as it's guaranteed to be the required version of PHP 2023-07-29 19:48:28 -04:00
Jason Gill
a5fb328c6a Add support for reading PHP version from composer.lock or composer.json 2023-07-29 19:46:06 -04:00
Shivam Mathur
72ae4ccbe5
Update Node.js dependenices
Remove semver override

Bump version to 2.25.5
2023-07-29 22:03:23 +05:30
Shivam Mathur
5b2015e8fe
Link opcache to ext_dir on macOS 2023-07-29 21:45:53 +05:30
Shivam Mathur
9c77701ae5
Remove workaround of Debian 12 in ppa.sh 2023-07-03 07:38:22 +05:30
Shivam Mathur
394503cb8a
Override semver version to 7.5.3 GHSA-c2qf-rxjj-qqgw/CVE-2022-25883 2023-07-02 02:34:06 +05:30
Shivam Mathur
f1cc14e3d5
Fix grep call in ppa.sh
When distros use DEB822-STYLE .sources file or a custom default list file the list_file is not present, so we check if it exists before calling grep on it
2023-07-02 02:16:13 +05:30
Shivam Mathur
9d529a72e0
Only check castor version if castor.php is present 2023-06-24 02:25:43 +05:30
Shivam Mathur
c63f07d82e
Fix version prefix for castor 2023-06-23 23:28:05 +05:30
Shivam Mathur
e40aa32c04
Update Node.js dependencies 2023-06-23 23:23:33 +05:30
Shivam Mathur
a683e80307
Merge pull request #746 from pyrech/support-castor
Add support for tool jolicode/castor
2023-06-23 22:59:01 +05:30
Loïck Piera
7ce22e0264
Add support for jolicode/castor 2023-06-23 16:13:17 +02:00
Shivam Mathur
4bd44f22a9
Bump version to 2.25.4
Update Node.js dependencies
2023-06-13 03:25:48 +05:30
Shivam Mathur
d2f333de6f
Fix regression in major/minor.major version support for phpunit 2023-06-13 03:16:19 +05:30
Shivam Mathur
948bd8df3c
Fix fs import in utlts.test.ts 2023-06-12 17:14:07 +05:30
Shivam Mathur
8cac79fdb1
Bump version to 2.25.3
Update Node.js dependencies
2023-06-12 15:28:42 +05:30
Shivam Mathur
6cc8b47c6f
Add support to fetch tool versions from packagist 2023-06-12 15:27:46 +05:30
Shivam Mathur
0be6fa1958
Remove quotes after : in CSVArray 2023-06-12 15:27:21 +05:30
amnuts
22d9c80367
Cannot get release to run, so forced in changes 2023-06-12 15:27:21 +05:30
amnuts
4630172078
Added what should be compensation for phpunit versions 2023-06-12 15:27:20 +05:30
Shivam Mathur
1b02c009e7
Add npm run build to CONTRIBUTING.md 2023-06-12 04:45:59 +05:30
Shivam Mathur
12282c9597
Add support for ts intl builds 2023-06-07 09:26:20 +05:30
Shivam Mathur
592bbc7716
Shorten grep call in add_extensions.sh 2023-06-07 09:24:56 +05:30
Shivam Mathur
fb5054b163
Use correct prefix for zend_extensions when installed using PECL 2023-06-06 19:27:14 +05:30
Shivam Mathur
3f2a402846
Mark runner as self-hosted on nektos/act 2023-06-05 16:28:04 +05:30
Shivam Mathur
c5fc0d8281
Fix disabling extensions with common substring 2023-05-24 23:01:34 +05:30
Shivam Mathur
48037d201f
Add priority config for couchbase and psr 2023-05-24 19:58:13 +05:30
Shivam Mathur
71b43c4f65
Bump version to 2.25.2
Bump Node.js dependencies
2023-05-24 19:58:13 +05:30
Shivam Mathur
3818224063
Fix to avoid double activation
Fix parsing extension input
2023-05-24 19:58:08 +05:30
Shivam Mathur
5b29e8a454
Merge pull request #726 from yassinehamouten/fix/typo-in-sage-example
docs(example): fix a typo in the strategy of the sage example
2023-05-08 08:25:15 +05:30
Hamouten
2a798336a0 docs(example): fix a typo in the strategy of the sage example 2023-05-08 03:11:22 +02:00
Shivam Mathur
cb8f453143
Update Node.js dependencies 2023-04-19 08:37:25 +05:30
Shivam Mathur
19323ea920
Fix event extension priority 2023-04-18 22:02:29 +05:30
Shivam Mathur
b951cf1d99
Add fallback using expanded assets in Add-DebugSymbols on Windows 2023-04-17 08:37:41 +05:30
Shivam Mathur
1fdc5e773b
Update Node.js dependencies 2023-04-17 03:36:15 +05:30
Shivam Mathur
1474d67903
Drop support for ubuntu-18.04 2023-04-03 10:11:53 +05:30
Shivam Mathur
1afae1868c
Bump version 2.25.0
Bump Node.js dependencies
2023-04-03 10:04:23 +05:30
Shivam Mathur
36e33e130a
Add known non-default extension priorities in a config 2023-04-03 02:48:41 +05:30
Shivam Mathur
3d794ddd93
Use phpenmod only for PHP 5.6 and above 2023-04-03 01:18:19 +05:30
Shivam Mathur
c61bd0e074
Fix Get-File in win32.ps1 2023-04-03 00:03:00 +05:30
Shivam Mathur
1f8252a3ed
Fix selecting php-builder builds on Windows 2023-04-02 23:54:13 +05:30
Shivam Mathur
3e2462a699
Add Url and FallbackUrl in exception on Windows 2023-04-02 23:42:19 +05:30
Shivam Mathur
e513384a65
Fix jit configuration 2023-04-02 23:23:48 +05:30
Shivam Mathur
6483a6ea70
Improve install_packages in linux.sh 2023-04-02 22:03:11 +05:30
Shivam Mathur
ca308a6886
Fix minor shellcheck error 2023-04-02 21:51:40 +05:30
Shivam Mathur
035ef490b9
Rename resolveVersion to readPHPversion 2023-04-02 20:30:40 +05:30
Shivam Mathur
6bf279d08a
Fix reading php version from file 2023-04-02 20:25:49 +05:30
Shivam Mathur
bb16550379
Add support for relay on PHP 8.3 2023-03-31 01:23:49 +05:30
Shivam Mathur
7d999d501a
Switch to relay.so as the only source for relay extension 2023-03-31 00:40:53 +05:30
Shivam Mathur
7f8b1e5773
Exclude php 8.3 on macos 2023-03-31 00:29:23 +05:30
Shivam Mathur
6461006ceb
Improve Write-Error messages 2023-03-14 06:07:46 +05:30
Shivam Mathur
5f422817a1
Use Write-Error with ErrorAction as Stop instead of exit 2023-03-14 06:02:04 +05:30
Shivam Mathur
1b08836381
Merge pull request #707 from G-Rath/patch-1
docs: improve sentence structure slightly
2023-03-05 02:40:49 +05:30
Gareth Jones
ae98bca05f
docs: improve sentence structure slightly 2023-03-05 09:15:35 +13:00
Shivam Mathur
fb1ad7fc84
Fix enable_extension 2023-02-09 15:50:52 +05:30
Shivam Mathur
0d60024683
Choose correct ts build for zephir_parser 2023-02-09 15:41:48 +05:30
Shivam Mathur
1224b29111
Add support for snmp on macOS using shivammathur/extensions 2023-02-08 20:44:10 +05:30
Shivam Mathur
2f306f9d25
Use phpenmod to enable extensions on linux 2023-02-05 19:45:47 +05:30
Shivam Mathur
39b4e4a983
Fix warning about using -n and -I together in xargs 2023-02-05 19:19:43 +05:30
Shivam Mathur
7e46297c8d
Update README 2023-02-03 15:32:03 +05:30
Shivam Mathur
f9390a5478
Add retry logic to Invoke-Webrequests
Add fallback url to nightly setup
2023-02-03 12:59:37 +05:30
Shivam Mathur
f42145a164
Remove call to getManifestURL unless needed in utils.parseVersion 2023-01-29 21:53:23 +05:30
Shivam Mathur
755bbb1cc0
Minor refactor in php.yml 2023-01-29 21:53:17 +05:30
Shivam Mathur
a36edd3ca4
Test php-version-file in php workflow 2023-01-29 21:41:09 +05:30
Shivam Mathur
f2018b2189
Update php-version and php-version-file input section in README 2023-01-29 21:20:52 +05:30
Shivam Mathur
9c411b6e2b
Minor refactor in utils.resolveVersion 2023-01-29 20:17:23 +05:30
Shivam Mathur
e8d8aa3403
Add back the required parameter in action.yml 2023-01-29 19:51:07 +05:30
Shivam Mathur
686e8dfff9
Merge pull request #691 from stevelacey/php-version-file-inputs
Move php version default out of action.yml and update inputs
2023-01-29 19:46:18 +05:30
Steve Lacey
b46c8e2a8c Move php version default out of action.yml and update inputs #629 #690 2023-01-29 16:23:08 +08:00
Shivam Mathur
2d47531473
Merge pull request #690 from stevelacey/php-version-file
Support .php-version file for version detection
2023-01-29 11:40:49 +05:30
Steve Lacey
fd03521cb4 Support .php-version file; closes #629 2023-01-29 13:41:50 +08:00
Shivam Mathur
f03add0b41
Add uuid to brew_extensions list 2023-01-29 08:41:56 +05:30
Shivam Mathur
baf9535ba5
Merge pull request #689 from viktorruskai/patch-1
Fix DocBlock in `utils.ts`
2023-01-28 03:41:21 +05:30
Viktor Ruskai
cc0e576689
Update utils.ts 2023-01-27 22:12:33 +01:00
Shivam Mathur
d30ad8b184
Fix relay cache setup 2023-01-27 08:38:32 +05:30
Shivam Mathur
0f765070fa
Update Node.js dependencies 2023-01-27 07:41:01 +05:30
Shivam Mathur
313d0cfdbf
Fix function name in grpc_php_plugin.ps1 2023-01-27 05:26:40 +05:30
Shivam Mathur
cf767706fe
Bump version to 2.24.0 2023-01-24 21:23:58 +05:30
Shivam Mathur
1267cf80a1
Change choco install script URL 2023-01-22 02:10:29 +05:30
Shivam Mathur
7abee8e28c
Add custom support for zephir parser 2023-01-22 02:04:12 +05:30
Shivam Mathur
dd0115673c
Fix sudo setup for containers with broken lists 2023-01-21 08:06:21 +05:30
Shivam Mathur
bbc65d999a
Fix extension logs
Refactor utils.addCommand
2023-01-18 09:00:28 +05:30
Shivam Mathur
6db1a06425
Improve support for blackfire-player 2023-01-17 05:11:26 +05:30
Shivam Mathur
52eb86c60c
Add support for relay extension 2023-01-12 16:14:06 +05:30
Shivam Mathur
2b77dd6b79
Merge pull request #684 from Rotzbua/patch-1
doc: fix otudated github action version
2023-01-10 19:53:38 +05:30
Rotzbua
224f9ddef5
doc: fix otudated github action version 2023-01-10 14:19:28 +01:00
Shivam Mathur
7f5c8b51ba
Merge pull request #683 from shivammathur/dependabot/npm_and_yarn/json5-1.0.2
Bump json5 from 1.0.1 to 1.0.2
2023-01-08 17:17:22 +05:30
dependabot[bot]
bd5c747191
Bump json5 from 1.0.1 to 1.0.2
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-08 05:14:30 +00:00
Shivam Mathur
40846b27d0
Fix sed call in parse_pecl_configure_options 2022-12-27 04:42:24 +05:30
Shivam Mathur
8e2ac35f63
Update README 2022-12-26 03:45:00 +05:30
Shivam Mathur
a1e6789a94
Improve Get-PhalconReleaseAssetUrl 2022-12-25 21:52:32 +05:30
Shivam Mathur
9114b007ae
Restore stability workaround for PHP 8.1 on Windows 2022-12-25 21:26:22 +05:30
Shivam Mathur
cb0c293f02
Fix typo in blackfire regex on Windows 2022-12-25 21:14:03 +05:30
Shivam Mathur
387ec95b46
Improve fetching phalcon release url on Windows 2022-12-25 20:48:17 +05:30
Shivam Mathur
3514d30f93
Allow major.minor protoc versions 2022-12-25 20:03:40 +05:30
Shivam Mathur
e186e47261
Bump version to 2.23.0
Update Node.js dependencies
2022-12-25 19:18:47 +05:30
Shivam Mathur
e51e662ef0
Add support to install extensions from shivammathur/php-extensions-windows 2022-12-23 18:40:56 +05:30
Shivam Mathur
5afd8a1842
Fix error in darwin.sh while updating dependencies 2022-12-23 18:11:26 +05:30
Shivam Mathur
1a42045d48
Use ls-remote to get default branch
Calling GitHub API on macOS without the token hits rate limit
2022-12-19 08:19:07 +05:30
Shivam Mathur
b3a12ce01e
Add fallback in PHP build cache in Windows 2022-12-19 07:19:21 +05:30
Shivam Mathur
04b2ed5b3e
Fix protoc support on Windows 2022-12-19 06:57:44 +05:30
Shivam Mathur
189e8e6ec0
Update pre-installed PHP versions on GitHub runners
Minor fixes in README
2022-12-18 08:20:18 +05:30
Shivam Mathur
3407e6019c
Quote ini values with equal sign 2022-12-15 05:32:32 +05:30
Shivam Mathur
f20012026f
Bump nightly versions in unix.sh 2022-12-15 05:32:31 +05:30
Shivam Mathur
7743b7976f
Update version in actions.yml 2022-12-15 05:32:31 +05:30
Shivam Mathur
b7b50ce742
Fix extension support on php 8.2 on windows
Add PHP 8.2 support for backfire extension
2022-12-15 05:32:30 +05:30
Shivam Mathur
aa9b80f158
Fix extension support on php 8.2 on windows
Add PHP 8.2 support for backfire extension
2022-12-08 19:58:40 +05:30
Shivam Mathur
53adb47562
Mark PHP 8.2 as stable
Update OS support in README
2022-12-08 19:37:49 +05:30
Shivam Mathur
f7d3c00320
Merge pull request #673 from jrfnl/feature/readme-update-php-list
README: update for release of PHP 8.2
2022-12-08 19:35:28 +05:30
jrfnl
b359d922e7
README: update code samples 2022-12-08 14:59:54 +01:00
jrfnl
01aa440f0b
README: update for release of PHP 8.2
I also realized that - while not mentioned in the changelog or the readme - PHP 8.3 _is_ already available via the `setup-php` action runner, so I've added it to the README now.

Ref: https://www.php.net/supported-versions.php
2022-12-08 14:49:16 +01:00
Shivam Mathur
51f83e019c
Switch composer-unused back to phar 2022-12-01 04:45:59 +05:30
Shivam Mathur
173ca15c9b
Fix get_extension_from_formula in darwin.sh 2022-11-16 10:40:40 +05:30
Shivam Mathur
4704ad638a
Improve extension support on macOS 2022-11-14 15:17:12 +05:30
Shivam Mathur
1a18b2267f
Add note about updating PHP if ppa is missing on Ubuntu 2022-10-28 15:45:12 +05:30
Shivam Mathur
e9704839e9
Update Node.js dependencies 2022-10-28 12:28:34 +05:30
Shivam Mathur
5178fac634
Update PHP if ppa:ondrej/php is missing ref: actions/runner-images#6331 2022-10-28 12:24:37 +05:30
Shivam Mathur
388883d4bf
Fix support for firebird and couchbase 2022-10-25 15:29:26 +05:30
Shivam Mathur
cae6d06e69
Improve phalcon support 2022-10-24 19:05:14 +05:30
Shivam Mathur
89f4f7e8be
Run configure_pecl only when ini_files are set 2022-10-24 10:30:28 +05:30
Shivam Mathur
d2efbcd126
Fix debug support on Linux 2022-10-24 10:28:08 +05:30
Shivam Mathur
98e3af0bff
Configure brew on linux on grpc_php_plugin setup 2022-10-24 09:37:13 +05:30
Shivam Mathur
e8836c6d46
Fix logs on failure in add_pecl_extension 2022-10-24 09:37:13 +05:30
Shivam Mathur
9068f2e46f
Update sqlsrv and pdo_sqlsrv to 5.10.1 2022-10-24 09:37:12 +05:30
Shivam Mathur
5bbbd3fdf6
Update Node.js packages 2022-10-24 09:37:12 +05:30
Shivam Mathur
7622357ff1
Improve phalcon5 support 2022-10-24 09:37:07 +05:30
Shivam Mathur
6652a09da6
Add debug builds section in the README 2022-10-24 03:34:36 +05:30
Shivam Mathur
48fb8e1194
Add debug symbols support to Windows 2022-10-17 18:00:08 +05:30
Shivam Mathur
bbc6e9069b
Merge branch 'flavioheleno-improv/zts' into develop 2022-10-17 17:04:24 +05:30
Shivam Mathur
37dcd1cf8c
Merge branch 'improv/zts' of https://github.com/flavioheleno/setup-php into flavioheleno-improv/zts 2022-10-17 17:03:20 +05:30
Shivam Mathur
12b1efad4b
Bump version to 2.22.0
Bump Node.js dependencies
2022-10-12 16:35:02 +05:30
Shivam Mathur
0575a32108
Switch to $GITHUB_OUTPUT 2022-10-12 16:34:58 +05:30
Shivam Mathur
71b0e09dbc
Improve brew support on Linux 2022-10-10 16:24:35 +05:30
Shivam Mathur
edff21f0a6
Fetch symfony-cli artifact url and fallback to brew 2022-10-10 15:35:30 +05:30
Shivam Mathur
22035eb75b
Fix version_prefix for laravel/pint 2022-10-10 15:35:29 +05:30
Shivam Mathur
b556cf7292
Add support for debug builds 2022-10-10 15:34:36 +05:30
Flavio Heleno
f99a9d4624
Add thread-safe setup support 2022-10-05 19:31:52 -03:00
Shivam Mathur
a49dfe8457
Fix version_prefix for laravel/pint 2022-09-26 15:22:12 +05:30
Shivam Mathur
7ff9ac44b4
Add support for debug builds 2022-09-26 09:42:27 +05:30
Shivam Mathur
7aff4d7a22
Run switch_version before check_extensions on Linux 2022-09-11 09:19:35 +05:30
Shivam Mathur
633321754d
Merge pull request #641 from lmichelin/master
🐞 Bug Fix: make symfony-cli installation faster on Linux
2022-09-02 02:30:57 +05:30
Shivam Mathur
40a4cb064f
Improve fetching brew taps 2022-09-02 02:21:52 +05:30
Louis-Marie Michelin
45410ae8f0 fix: make symfony-cli installation faster on linux 2022-09-01 18:20:00 +02:00
Shivam Mathur
56ad5977ba
Merge pull request #636 from shivammathur/composer-no-audit
Set COMPOSER_NO_AUDIT environment variable by default
2022-08-22 09:54:07 +05:30
Shivam Mathur
6353d20df2
Set COMPOSER_NO_AUDIT environment variable by default 2022-08-22 09:46:12 +05:30
Shivam Mathur
e04e1d97f0
Bump Node.js dependencies 2022-08-17 17:05:01 +05:30
Shivam Mathur
52685a348b
Add support to install rector in tools input 2022-08-17 16:48:27 +05:30
Shivam Mathur
44d81f9830
Fix symfony support 2022-08-17 14:41:01 +05:30
Shivam Mathur
401bdecb71
Add support for ast from shivammathur/extensions on macOS 2022-08-10 13:19:47 +05:30
Shivam Mathur
aa82ffc68f
Fix logs in add_pecl_extension 2022-07-29 02:57:11 +05:30
Shivam Mathur
7e03c76ef2
Fix extension setup using PECL on Linux and macOS 2022-07-29 02:39:20 +05:30
Shivam Mathur
16011a795d
Upgrade Node.js dependencies 2022-07-28 03:39:51 +05:30
Shivam Mathur
66f24470dc
Fix reading composer package type for older versions 2022-07-20 19:41:49 +05:30
Shivam Mathur
e57ea715eb
Fix scoped tool setup on Windows 2022-07-20 19:41:07 +05:30
Shivam Mathur
e8ba27f3d2
Fail on npm audit again 2022-07-20 04:47:55 +05:30
Shivam Mathur
945c34c175
Update README 2022-07-19 15:44:51 +05:30
Shivam Mathur
c8c64c6cf9
Bump version to 2.21.0
Continue on npm audit failure
2022-07-19 15:24:35 +05:30
Shivam Mathur
0d3f92f127
Add support for phalcon5 on Windows 2022-07-19 14:26:08 +05:30
Shivam Mathur
4979d5b484
Add workaround for missing phalcon packages on Ubuntu 22.04 2022-07-16 02:40:47 +05:30
Shivam Mathur
0d9a1ba5ae
Add support for phalcon5 on Linux and macOS
Fix get_pecl_version
2022-07-16 00:46:28 +05:30
Shivam Mathur
3ede7656cb
Add check for gd in php.yml 2022-07-15 23:22:56 +05:30
Shivam Mathur
f3cdc074ce
Merge pull request #617 from ChristophWurst/demo/php82-gd
Demo PHP8.2+gd failure
2022-07-13 19:17:22 +05:30
Christoph Wurst
109db648f1
Demo PHP8.2+gd failure
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-07-13 15:07:46 +02:00
Shivam Mathur
3ccc00eece
Merge pull request #614 from d8vjork/master
Add support for tool Laravel Pint
2022-07-11 15:57:41 +05:30
Ruben Robles
0f688a10cb
Add support for tool Laravel Pint 2022-07-11 12:13:41 +02:00
Shivam Mathur
3312ea6101
Bump version to 2.20.1
Fix format script in package.json
2022-07-08 04:55:53 +05:30
Shivam Mathur
ce49f82dd8
Do not add composer plugins to allow list for composer v1 2022-07-08 04:55:44 +05:30
Shivam Mathur
cf5cd90b4c
Improve support for composer authenticating private respositories 2022-07-06 12:19:55 +05:30
Shivam Mathur
cdb037c2a4
Bump version to 2.20.0 2022-07-06 00:43:26 +05:30
Shivam Mathur
261f13a7c5
Add composer plugins to allow list before installing 2022-07-06 00:43:25 +05:30
Shivam Mathur
9eaa66d89b
Add support for event extension on unix 2022-07-05 16:22:07 +05:30
Shivam Mathur
da9dfe4a71
Set RUNNER_TOOL_CACHE on self-hosted environments 2022-07-05 12:03:30 +05:30
Shivam Mathur
a863ab6d3d
Add support to allow composer plugins 2022-07-05 06:25:04 +05:30
Shivam Mathur
050cb8061b
Add coverage driver version in logs 2022-06-30 17:36:40 +05:30
Shivam Mathur
3fda17f3fa
Merge pull request #609 from dino182/develop
Fix Add-Path for self-hosted Windows
2022-06-27 17:24:50 +05:30
Dino Infantino
1a2cb4f872 Fix Add-Path for self-hosted Windows 2022-06-23 10:51:33 +01:00
Shivam Mathur
4969814b69
Merge pull request #607 from markseuffert/patch-1
Updated documentation
2022-06-21 13:38:26 +05:30
Mark
07f2ea7d02
Updated documentation, review 2022-06-21 10:04:28 +02:00
Mark
a1c17b4b18
Updated documentation 2022-06-21 09:39:42 +02:00
Shivam Mathur
3eda583472
Bump version to 2.19.1
Update Node.js dependencies
2022-06-06 08:22:16 +05:30
Shivam Mathur
74d43be8a3
Fix support for deployer 2022-05-31 10:12:38 +05:30
Shivam Mathur
aa1fe473f9
Bump version to 2.19.0 2022-05-30 07:52:31 +05:30
Shivam Mathur
a92acf13e4
Remove years from LICENSE 2022-05-30 07:52:30 +05:30
Shivam Mathur
0533892eb4
Fix jsdoc in fetch.ts 2022-05-30 07:52:30 +05:30
Shivam Mathur
43fb4ad30e
Bump ES version to 2021 2022-05-30 07:27:29 +05:30
Shivam Mathur
b88a8c89d1
Fix protoc support 2022-05-26 10:21:36 +05:30
Shivam Mathur
36d7f6c7c5
Set target-branch to develop in dependabot.yml 2022-05-26 09:47:27 +05:30
Shivam Mathur
a1a52db9f3
Merge pull request #598 from shivammathur/dependabot/github_actions/codecov/codecov-action-3
Bump codecov/codecov-action from 2 to 3
2022-05-26 09:45:58 +05:30
Shivam Mathur
88e54b10ca
Merge pull request #599 from shivammathur/dependabot/github_actions/github/codeql-action-2
Bump github/codeql-action from 1 to 2
2022-05-26 09:45:50 +05:30
Shivam Mathur
203099e007
Merge pull request #600 from shivammathur/dependabot/github_actions/actions/setup-node-3
Bump actions/setup-node from 1 to 3
2022-05-26 09:45:41 +05:30
dependabot[bot]
4e9ea33f8d
Bump actions/setup-node from 1 to 3
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 1 to 3.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v1...v3)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 04:11:48 +00:00
dependabot[bot]
68ba5ba947
Bump github/codeql-action from 1 to 2
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 04:11:43 +00:00
dependabot[bot]
99af32331c
Bump codecov/codecov-action from 2 to 3
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2 to 3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-26 04:11:36 +00:00
Shivam Mathur
810a92a9b0
Merge pull request #597 from turrisxyz/Dependabot-GitHub-Actions
chore: Included githubactions in the dependabot config
2022-05-26 09:40:26 +05:30
naveen
9c760dd6e2 chore: Included githubactions in the dependabot config
This should help with keeping the GitHub actions updated on new releases. This will also help with keeping it secure.

Dependabot helps in keeping the supply chain secure https://docs.github.com/en/code-security/dependabot

GitHub actions up to date https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot

https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool
Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
2022-05-26 02:48:43 +00:00
Shivam Mathur
dea233d702
Merge pull request #596 from turrisxyz/Pinned-Dependencies-GitHub
chore: Set permissions for GitHub actions
2022-05-26 06:59:24 +05:30
nathannaveen
787285e08a chore: Set permissions for GitHub actions
Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: nathannaveen <42319948+nathannaveen@users.noreply.github.com>
2022-05-26 00:50:23 +00:00
Shivam Mathur
ee065c5938
Append custom ini files to php.ini files 2022-05-25 20:43:46 +05:30
Shivam Mathur
dbc8ba0844
Fix enabling cached dependent extensions on lower PHP versions 2022-05-25 19:44:02 +05:30
Shivam Mathur
fe9e23a16a
Add unixodbc if missing in sqlsrv setup 2022-05-25 10:16:23 +05:30
Shivam Mathur
16de39288a
Fix couchbase cache on macOS 2022-05-24 18:59:36 +05:30
Shivam Mathur
67ff09364d
Fix support for couchbase 4.x 2022-05-24 15:45:18 +05:30
Shivam Mathur
1dfe0dc4a4
Add support to specify couchbase version 2022-05-19 23:56:27 +05:30
Shivam Mathur
6f83b63bf5
Fix couchbase setup
Fix couchbase version to 3.x till 4.x is stable

The couchbase 4.x is based on a C++ client library and it shipped with the extension. So we only add the C client library for earlier versions
2022-05-19 15:09:52 +05:30
Shivam Mathur
f0db57dcab
Fix pecl support on PHP 5.3
Remove pecl suffix option support from PHP 5.3 as Console_Getopt version used does not support it
2022-05-19 11:56:00 +05:30
Shivam Mathur
6cba851606
Add support for Ubuntu 22.04 2022-05-06 05:43:20 +05:30
Shivam Mathur
209324abab
Prefix extension formula with tap name on macOS 2022-05-05 23:43:11 +05:30
Shivam Mathur
846135c190
Create empty composer.json in scoped directory
When installing composer based tools in a scoped directory with old composer versions it breaks if a composer.json is not present in the scoped directory
2022-05-02 11:22:58 +05:30
Shivam Mathur
32d20248ae
Improve support for composer fallback URLs 2022-04-23 11:57:06 +05:30
Shivam Mathur
ba8485d89f
Update OS support for self-hosted runners in README 2022-04-21 17:13:31 +05:30
Shivam Mathur
97721a77b9
Fix shivammathur/node image tag in README 2022-04-21 17:06:25 +05:30
Shivam Mathur
7dfee150df
Remove fs dependency 2022-04-17 10:53:49 +05:30
Shivam Mathur
251330ef7f
Switch to node16 in actions.yml 2022-04-15 06:20:31 +05:30
Shivam Mathur
448bd61c6f
Bump version to 2.18.1 2022-04-09 21:47:25 +05:30
Shivam Mathur
657e0936e8
Patch brew on every run 2022-04-09 21:47:24 +05:30
Shivam Mathur
36d70683e9
Fix patching brew 2022-04-09 19:14:52 +05:30
Shivam Mathur
7a9bf9ecf6
Update the GitHub Hosted Runners
Add support for macos-12

Update Pre-installed PHP versions in ubuntu-18.04
2022-04-07 07:49:28 +05:30
Shivam Mathur
5210dd20ed
Add support for mcrypt using shivammathur/extensions tap on macOS 2022-04-06 17:37:32 +05:30
Shivam Mathur
e83d1a7f9e
Add scaleway logo to README 2022-04-04 22:53:28 +05:30
Shivam Mathur
6ae3564af4
Improve examples 2022-04-03 04:24:07 +05:30
Shivam Mathur
9e33c7b24e
Fix protoc setup 2022-03-26 00:10:00 +05:30
Shivam Mathur
d37cc30485
Update Node.js dependencies
Bump version to 2.18.0
2022-03-22 21:37:25 +05:30
Shivam Mathur
412722b7c7
Install libraries on each PECL install if specified 2022-03-22 21:37:20 +05:30
Shivam Mathur
c19f6bbdcd
Add PECL customization guide to README 2022-03-22 19:20:39 +05:30
Shivam Mathur
dfd2c8da97
Add http dependencies when version is specified 2022-03-22 18:50:03 +05:30
Shivam Mathur
27eef9a04c
#StandWithUkraine 2022-03-22 17:36:00 +05:30
Shivam Mathur
f172a4dc76
Merge pull request #577 from jrfnl/feature/update-actions-cache-runner
GH Actions: version update for actions/cache (incl examples)
2022-03-21 20:31:34 +05:30
jrfnl
c88ece8451
Examples: update the action runner version 2022-03-21 15:40:20 +01:00
jrfnl
33ad931dbb
GH Actions: version update for actions/cache
The update doesn't actually contain any changed functionality, it's mostly just a change of the Node version used by the action itself (from Node 12 to Node 16), but see the changelog for more info.

Refs:
* https://github.com/actions/cache/releases/
2022-03-21 15:39:20 +01:00
Shivam Mathur
4e4b26a024
Suppress output while generating extension map 2022-03-16 05:10:11 +05:30
Shivam Mathur
228bfba836
Fix copying extensions from cellar to extension directory on macOS 2022-03-16 05:10:10 +05:30
Shivam Mathur
34c35ecdad
Add support for blackfire extension on PHP 8.1 on Windows 2022-03-16 05:10:10 +05:30
Shivam Mathur
1828f05f7a
Add support for http extension on PHP 8.1 on Windows 2022-03-16 05:10:09 +05:30
Shivam Mathur
927419e77f
Fix enabling http 2022-03-16 05:09:53 +05:30
Shivam Mathur
e29242d481
Add support to specify configure options to pecl extensions 2022-03-15 22:09:38 +05:30
Shivam Mathur
035c0a8550
Use local variables in log functions 2022-03-10 04:53:12 +05:30
Shivam Mathur
e9884d0d9a
Add support for installing libraries for pecl extensions 2022-03-10 04:50:16 +05:30
Shivam Mathur
02131e37d9
Fix linking pecl ini file on self-hosted environments 2022-03-10 04:36:22 +05:30
Shivam Mathur
341d29a88f
Run switch_version for all packaged PHP 2022-03-10 04:36:21 +05:30
Shivam Mathur
5e3bc57de0
Fix to install php-dev on self-hosted env if missing 2022-03-10 04:36:21 +05:30
Shivam Mathur
a826799c7c
Fix switching versions in Linux 2022-03-10 04:36:21 +05:30
Shivam Mathur
62bd8f3ca4
Improve enabling extensions 2022-03-10 04:36:15 +05:30
Shivam Mathur
4056d3f353
Merge pull request #571 from jrfnl/feature/ghactions-update-various-actions
GH Actions: version update for various predefined actions
2022-03-05 21:14:08 +05:30
jrfnl
ddf8825c2f
GH Actions: version update for various predefined actions
A number of predefined actions have had major release, which warrant an update the workflow(s).

These updates don't actually contain any changed functionality, they are mostly just a change of the Node version used by the action itself (from Node 14 to Node 16).

Refs:
* https://github.com/actions/download-artifact/releases
* https://github.com/actions/upload-artifact/releases
2022-03-05 16:11:15 +01:00
Shivam Mathur
4678e809c3
Bump actions/checkout to v3 2022-03-02 06:00:52 +05:30
Shivam Mathur
b75c104ca8
Bump version to 2.17.1 2022-03-01 20:44:20 +05:30
Shivam Mathur
94c859a50e
Add GitHub releases fallback URL for phing 2022-03-01 20:44:20 +05:30
Shivam Mathur
293da043d1
Fix logs for symfony-cli on failure 2022-02-24 23:01:58 +05:30
Shivam Mathur
808396c4e6
Fix Add-EnvPATH on self-hosted Windows 2022-02-22 04:43:32 +05:30
Shivam Mathur
7205f47330
Update version of sqlsrv and pdo_sqlsrv extensions 2022-02-22 00:51:53 +05:30
Shivam Mathur
7ad352e12a
Add OpenSSL config on Windows 2022-02-13 03:20:39 +05:30
Shivam Mathur
5bf95cd61f
Fix Add-Env in win32.ps1 2022-02-13 03:15:38 +05:30
Shivam Mathur
18f3abac75
Fix UUOC shellcheck warning 2022-02-09 03:40:58 +05:30
Shivam Mathur
7854a0cae7
Fix adding composer_bin to PATH 2022-02-09 03:27:03 +05:30
Shivam Mathur
a72a638da4
Fix check in add_path
Add composer_bin to the PATH after a tool is added using composer
2022-02-09 00:53:56 +05:30
Shivam Mathur
46c34bb6a5
Update Node.js dependencies 2022-02-08 18:23:38 +05:30
Shivam Mathur
948917a97b
Fix to correctly use fallback URL for tools on Windows 2022-02-08 03:52:45 +05:30
Shivam Mathur
d9cb143213
Add 22.04-jammy and 13-trixie to os_releases.csv config file [skip ci] 2022-02-08 03:20:08 +05:30
Shivam Mathur
0cfde7beae
Fix adding Import-Module command to the profile in Install-PSPackage 2022-02-08 01:02:16 +05:30
Shivam Mathur
ce2a129c36
Fix output when sudo is installed 2022-02-08 00:51:20 +05:30
Shivam Mathur
78532b17de
Fail when runner it set to github on self-hosted environments 2022-02-08 00:49:31 +05:30
Shivam Mathur
8b26e8d15a
Add pear/pecl by default to self-hosted Linux environments 2022-02-07 23:56:12 +05:30
Shivam Mathur
4dc94c27cf
Refactor utils.fetch to a module and mock it with nock
Add redirect support in utils.fetch
2022-02-06 10:53:40 +05:30
Shivam Mathur
76555571a6
Bump version to 2.17.0 2022-02-06 03:37:58 +05:30
Shivam Mathur
be43989cc9
Update README.md 2022-02-06 03:37:57 +05:30
Shivam Mathur
6f6e534936
Improve tools support when extensions are disabled/missing 2022-02-06 03:37:57 +05:30
Shivam Mathur
99a4a141f4
Add --ignore-platform-req=ext-* while installing composer packages with composer v2 2022-02-06 03:37:56 +05:30
Shivam Mathur
c1285cc7f3
Fix variable scope 2022-02-06 03:37:56 +05:30
Shivam Mathur
57662657e0
Enable extensions required for installing composer packages 2022-02-06 03:37:55 +05:30
Shivam Mathur
8d4007321f
Change variable name in ppa.sh 2022-02-06 03:37:54 +05:30
Shivam Mathur
8eb9866044
Fix getting scan dir on macOS for old PHP 2022-02-06 03:37:54 +05:30
Shivam Mathur
e554590514
Fix http extension setup 2022-02-06 03:37:25 +05:30
Shivam Mathur
5959fab498
Fix setting stability in Add-Extension on Windows 2022-02-02 14:38:28 +05:30
Shivam Mathur
408b70728f
Improve support for sqlsrv and pdo_sqlsrv 2022-02-02 14:38:28 +05:30
Shivam Mathur
9d74a11420
Fix output on non GitHub Action environments 2022-02-02 14:38:23 +05:30
Shivam Mathur
5acd006232
Fix second run in the same job
Refactor install.ts and its tests
2022-01-30 08:45:11 +05:30
Shivam Mathur
0022878947
Remove unnecessary dist parameter 2022-01-29 12:14:42 +05:30
Shivam Mathur
71d07ee7f4
Update symfony-cli support to use new symfony-cli/symfony-cli 2022-01-29 11:27:44 +05:30
Shivam Mathur
8d1c02194f
Remove release badge 2022-01-29 07:38:00 +05:30
Shivam Mathur
5187531b8b
Fix eslint warning in utils.test.ts 2022-01-29 07:30:16 +05:30
Shivam Mathur
44ff4ed92d
Refactor workflows and templates 2022-01-29 07:29:03 +05:30
Shivam Mathur
96857323bb
Add test files to prettier and lint commands 2022-01-29 05:39:57 +05:30
Shivam Mathur
cad2a1bda3
Rename os_version => os 2022-01-29 05:29:58 +05:30
Shivam Mathur
c2c73b16c1
Append to script instead read then write 2022-01-29 04:45:17 +05:30
Shivam Mathur
63c7766312
Remove unnecessary writing of scripts to RUNNER_TOOL_CACHE 2022-01-29 04:40:49 +05:30
Shivam Mathur
175c9649c4
Fix sending coverage to codecov in node workflow 2022-01-29 04:14:07 +05:30
Shivam Mathur
495989aff1
Merge pull request #561 from villfa/feat/churn
Tools: add support for Churn-PHP
2022-01-29 03:49:42 +05:30
Fabien Villepinte
c09e310dc1
Tools: add support for Churn-PHP 2022-01-28 23:07:30 +01:00
Shivam Mathur
1db2ec93f3
Fix tools.getLatestVersion 2022-01-27 08:44:53 +05:30
Shivam Mathur
0a601ebeee
Use windows-2019 runner in CI workflow 2022-01-27 08:25:50 +05:30
Shivam Mathur
da21b560da
Refactor PHP nightly setup in Windows 2022-01-27 08:09:35 +05:30
Shivam Mathur
c1efd614e8
Use Get-Module instead of Get-InstalledModule 2022-01-27 07:05:46 +05:30
Shivam Mathur
dcf2f7f74f
Fetch SSL libs for old PHP in Windows in parallel 2022-01-27 06:36:42 +05:30
Shivam Mathur
8109be4850
Add support for PHP build cache from shivammathur/php-builder-windows 2022-01-26 16:41:29 +05:30
Shivam Mathur
a0a791cada
Add ini_file input to set base php.ini 2022-01-25 13:43:49 +05:30
Shivam Mathur
147905fd60
Fix composer_bin not found error 2022-01-25 12:32:59 +05:30
Shivam Mathur
57db6baebb
Fix restore-keys in cache example in README with dependency range 2022-01-22 23:41:53 +05:30
Shivam Mathur
c38f1acc38
Fix potential exponential backtracking in regex in utils.parseExtensionSource 2022-01-22 02:25:58 +05:30
Shivam Mathur
9ca9ab33ef
Update docs workflow 2022-01-20 22:03:33 +05:30
Shivam Mathur
fdbb31f707
Update OS support section in README 2022-01-20 21:57:37 +05:30
Shivam Mathur
14a9f0b4ae
Add CodeQL workflow
Add npm audit to the node workflow

Remove stepsecurity action from workflows
2022-01-20 21:45:07 +05:30
Shivam Mathur
2ee6797b63
Optimize Linux and macOS setup 2022-01-18 10:16:58 +05:30
Shivam Mathur
2b729b1130
Refactor setting environment variables 2022-01-18 04:41:51 +05:30
Shivam Mathur
0374a8ae84
Add support for gnupg from shivammathur/homebrew-extensions 2022-01-17 22:07:36 +05:30
Shivam Mathur
7f951c9333
Improve extension map 2022-01-17 16:13:16 +05:30
Shivam Mathur
449da348c0
Fix enabling disabled extensions with dependencies
Improve enabling extensions with no dependencies
2022-01-17 08:58:30 +05:30
Shivam Mathur
51476af47d
Set HOMEBREW_NO_ENV_HINTS in macOS 2022-01-16 14:09:49 +05:30
Shivam Mathur
9a70be75c2
Reduce php calls on Linux and macOS 2022-01-16 14:09:43 +05:30
Shivam Mathur
282305f4d7
Fix to not delete pecl.ini when disabling extensions 2022-01-16 09:37:27 +05:30
Shivam Mathur
c2a765ed5b
Do not disable phar on macOS and Linux 2022-01-16 09:24:30 +05:30
Shivam Mathur
9ea5899759
Refactor add_extension 2022-01-13 06:33:07 +05:30
Shivam Mathur
62d47dd238
Fix enabling xml extension for PECL 2022-01-13 05:22:02 +05:30
Shivam Mathur
e480353a3d
Process extensions before tools 2022-01-13 04:29:05 +05:30
Shivam Mathur
3a4acaaed8
Default to self-hosted unless GitHub hosted runner is detected
Refactor read_env in unix.sh
2022-01-12 21:15:11 +05:30
Shivam Mathur
f7f679181d
Fix adding sudo to self-hosted runners 2022-01-12 20:14:12 +05:30
Shivam Mathur
f3010adf3e
Improve tools setup
Log full semver of tools installed with composer

Refactor adding paths to PATH
2022-01-11 06:04:19 +05:30
Shivam Mathur
b7cdb2373c
Fix cp in add_tools.sh 2022-01-09 13:44:50 +05:30
Shivam Mathur
22ebe0d733
Use php-config to get semver 2022-01-09 13:44:50 +05:30
Shivam Mathur
cb614c45fa
Update default PHP packages' list on self-hosted Linux 2022-01-09 13:44:49 +05:30
Shivam Mathur
e6e79e1717
Refactor PHP packages to a config 2022-01-09 13:44:49 +05:30
Shivam Mathur
45a631dbaf
Fix update_lists in ppa.sh 2022-01-09 13:44:48 +05:30
Shivam Mathur
1fd26e45c8
Refactor INI directives to configs 2022-01-09 13:44:40 +05:30
Shivam Mathur
de4fdb85b9
Rename common.sh to unix.sh 2022-01-05 15:20:40 +05:30
Shivam Mathur
2fd8046c9d
Refactor extension functions to add_extensions scripts 2022-01-05 15:20:40 +05:30
Shivam Mathur
d189609ea9
Refactor tools functions to add_tools scripts 2022-01-05 15:20:39 +05:30
Shivam Mathur
3681a25ab6
Fix to not break existing tools if they fail to setup 2022-01-05 15:20:39 +05:30
Shivam Mathur
092944b039
Fix Install-PSPackage fallback 2022-01-05 15:20:38 +05:30
Shivam Mathur
9e30788903
Fail fast on composer setup failure 2022-01-05 15:20:38 +05:30
jrfnl
bca2d0b1b0
Example code: remove --no-interaction from Composer commands
All Composer commands used in CI should use `--no-interaction` to prevent them hanging in case interaction is expected. However, as setupPHP sets the `COMPOSER_NO_INTERACTION` flag (as of this version), this is not needed when using setupPHP.

This removes redundant `--no-interaction` arguments from the example code.

Also see: https://blog.packagist.com/composer-2-2/#more-secure-plugin-execution
2022-01-05 15:20:37 +05:30
Shivam Mathur
d78b8a6d49
Set COMPOSER_NO_INTERACTION=1
Use composer.env file for configuring composer

Add a note about composer configuration to the README
2022-01-05 15:20:37 +05:30
Shivam Mathur
da0e854737
Fix phalcon setup on Ubuntu 2022-01-05 15:18:04 +05:30
Shivam Mathur
f24f33ea89
Scope binary tools installed using composer 2021-12-31 00:11:33 +05:30
Shivam Mathur
7789b4e03e
Switch to phar releases for phpspec 2021-12-29 20:17:24 +05:30
Shivam Mathur
75988cd9be
Update sponsors section in README 2021-12-26 06:55:07 +05:30
Shivam Mathur
65341e4a6d
Fix parsing composer version when snapshot is stable 2021-12-22 22:34:35 +05:30
Shivam Mathur
0f13e29d1f
Use composer phars from cache with PHP version 2021-12-22 20:07:07 +05:30
Shivam Mathur
5cd765a20d
Add support for blackfire extension on PHP 8.1 2021-12-20 19:50:31 +05:30
Shivam Mathur
deb31af403
Fix http support on 8.1
Fallback to source/pecl if http extension package is missing
2021-12-20 19:35:45 +05:30
Shivam Mathur
a6b35b119b
Fix oci8 setup on Windows 2021-12-20 18:29:46 +05:30
Shivam Mathur
7dadf1bf21
Improve coverage section in README 2021-12-19 17:09:41 +05:30
Shivam Mathur
cca8ad3588
Fix node-release workflow to add lib to the packages 2021-12-17 18:34:16 +05:30
Shivam Mathur
7117491f1a
Update and refactor example workflows 2021-12-15 16:49:10 +05:30
Shivam Mathur
aa1efabe45
Change command to start mysql from sysVinit to systemd in examples 2021-12-15 13:26:33 +05:30
Shivam Mathur
dab0e73adf
Refactor addPhive in tools.ts 2021-12-13 08:11:59 +05:30
Shivam Mathur
15b20027cf
Use GitHub releases for phive's latest version 2021-12-13 07:47:57 +05:30
Shivam Mathur
1b4cc0b6fa
Revert to GitHub Releases as primary script source 2021-12-08 20:34:44 +05:30
Shivam Mathur
bbba8d75a6
Change primary script sources 2021-12-08 19:28:08 +05:30
Shivam Mathur
a274bd910a
Fix to handle wrong pecl versions with hyphen 2021-12-08 04:56:29 +05:30
Shivam Mathur
f4d1db5c23
Update Node version to 16.x 2021-12-07 21:33:45 +05:30
Shivam Mathur
cecf84878d
Update Harden Runner step in node workflows 2021-12-07 21:26:23 +05:30
Shivam Mathur
be75d5e01d
Add patch to add PHP 8.1 extensions from snaps on Windows 2021-12-06 10:42:28 +05:30
Shivam Mathur
cf36ddc55e
Set nightly versions to 8.2 and newer 2021-12-06 10:13:24 +05:30
Shivam Mathur
fe438f8e25
Mark PHP 7.3 as End of life in README 2021-12-06 08:22:55 +05:30
Shivam Mathur
fdd0a76eca
Mark PHP 7.4 as Security fixes only in README 2021-11-28 21:15:27 +05:30
Shivam Mathur
7c0b4c8c8e
Bump version to 2.16.0 2021-11-26 00:15:10 +05:30
Shivam Mathur
b33066473d
Log error when wrong Xdebug version is requested 2021-11-26 00:07:28 +05:30
Shivam Mathur
92b4784fb6
Suppress error in Get-Php run before PHP setup in win32.ps1 2021-11-25 23:24:48 +05:30
Shivam Mathur
345999bf0b
Add support for mailparse on macOS using shivammathur/extensions tap 2021-11-25 20:29:41 +05:30
Shivam Mathur
4c5c122aa6
PHP 8.1 is now stable and marked as default version 2021-11-25 17:34:13 +05:30
Shivam Mathur
bee5abe269
Bump extension cache key in workflow.yml 2021-11-24 18:23:02 +05:30
Shivam Mathur
220d0c24c7
Fix reading build commit on Windows 2021-11-24 18:01:01 +05:30
Shivam Mathur
2f5c2edb22
Fix upgrading nightly versions 2021-11-18 19:40:47 +05:30
Shivam Mathur
721e4c3367
Add dev package for PHP by default on self-hosted 2021-11-18 16:51:20 +05:30
Shivam Mathur
2f2a90e464
Add workaround to ensure PHPUnit installed by setup-php is used along with PHPUnit-Polyfills 2021-11-16 08:23:46 +05:30
Shivam Mathur
81a06ff6ed
Fix shellcheck warning in add_tools.sh 2021-11-16 08:14:06 +05:30
Shivam Mathur
dfc02c42d9
Bump extension cache key in workflow.yml 2021-11-11 19:55:50 +05:30
Shivam Mathur
ac7d3d7f84
Merge pull request #528 from shivammathur/develop
Stop using Install-PhpExtensionPrerequisite for imagick
2021-11-11 19:29:43 +05:30
Shivam Mathur
874e5099b0
Stop using Install-PhpExtensionPrerequisite for imagick 2021-11-11 19:22:29 +05:30
Shivam Mathur
4a3337d069
Add release badge 2021-11-11 07:32:02 +05:30
Shivam Mathur
123f6df529
Improve npm release workflow [skip ci] 2021-11-11 05:26:21 +05:30
Shivam Mathur
341cf69e13
Add allowed endpoints to node workflow 2021-11-10 08:36:00 +05:30
Shivam Mathur
f7b503e36b
Add action to harden runner in node workflow 2021-11-10 06:17:07 +05:30
Shivam Mathur
beaceb0089
Fix to only copy problem-matchers configs to RUNNER_TOOL_CACHE 2021-11-10 05:45:18 +05:30
Shivam Mathur
03509eca9b
Fix error while opening blackfire configuration file on Linux 2021-10-19 00:16:05 +05:30
Shivam Mathur
2c9c274411
Fix dependency support in self-hosted macOS 2021-10-15 22:32:24 +05:30
Shivam Mathur
1c85db7f9e
Add patch for Debian 12 and the distributions based on it 2021-10-15 18:34:06 +05:30
Shivam Mathur
d259dd49a2
Improve package checks for extensions 2021-10-15 17:53:09 +05:30
Shivam Mathur
ea20ae1fbd
Fix minor bug in checking lists on Linux 2021-10-15 15:58:06 +05:30
Shivam Mathur
383c74bb06
Improve adding CA certificates on Windows 2021-10-14 22:08:11 +05:30
Shivam Mathur
b4593b7df0
Revert "Add patch to update ca-certificates on windows-2016"
This reverts commit d7c3e33a96fcafad4ddbd4a6db81e8505a8eb7f4.
2021-10-14 21:00:58 +05:30
Shivam Mathur
9b92c9db92
Revert "Add patch to update brew core repo"
This reverts commit dab978c436642aa454ad2099aa5355e20ac7d71f.
2021-10-14 20:59:16 +05:30
Shivam Mathur
a357b6a054
Revert "Fetch CA certificate from Curl on all Windows versions"
This reverts commit a7f90656b3be3996d1ec5501e8e25d5d35aa9bb2.
2021-10-14 20:58:09 +05:30
Shivam Mathur
0bc2f7ce96
Revert "Fix macOS patch to allow link libraries"
This reverts commit e2e76ea34f2059c0d66bf5c54ea75610185397f3.
2021-10-14 20:57:18 +05:30
Shivam Mathur
e2e76ea34f
Fix macOS patch to allow link libraries 2021-10-13 15:25:38 +05:30
Shivam Mathur
719018955c
Add support for xlswriter on macOS using shivammathur/extensions tap 2021-10-12 20:56:58 +05:30
Shivam Mathur
4c903565c9
Merge pull request #518 from jrfnl/feature/readme-improve-tool-discoverability
README: improve discoverability of tools
2021-10-11 10:49:10 +05:30
jrfnl
fc60088a95 README: improve discoverability of tools
Not every developer will be familiar with all tools.

By linking the tools listed to the relevant documentation website, the discoverability of tools new to a developer is improved.
2021-10-11 05:54:18 +02:00
Shivam Mathur
a7f90656b3
Fetch CA certificate from Curl on all Windows versions 2021-10-10 05:43:54 +05:30
Shivam Mathur
0cd4af837e
Merge pull request #516 from aneeshrelan/feature/refactor-install-tests-to-use-jest-each
tests: refactor install.test.ts to use jest.each
2021-10-09 19:18:17 +05:30
Aneesh Relan
96e47f9be7 tests: have a strict assertion using toBe 2021-10-09 19:01:59 +05:30
Aneesh Relan
eca40cad4d tests: resolve windows path matching 2021-10-09 18:59:50 +05:30
Aneesh Relan
4e864eae3b tests: move os to a parameter 2021-10-09 18:44:47 +05:30
Aneesh Relan
49a0bad962 tests: refactor install.test.ts to use jest.each 2021-10-09 17:30:06 +05:30
Shivam Mathur
b971d8f4ad
use brew_extensions config for testing add_brew_extension 2021-10-09 08:11:39 +05:30
Shivam Mathur
fca0924fa9
Use custom support for phalcon 2021-10-09 06:26:16 +05:30
Shivam Mathur
8dfe214356
Merge pull request #514 from aneeshrelan/feature/refactor-tests-to-use-jest-each
tests: use parameterised testing using `jest.each` for extensions.test.ts
2021-10-08 22:33:11 +05:30
Aneesh Relan
f2d6820ca2 tests: sort test data in alphabetic order and merge duplicates 2021-10-08 22:24:17 +05:30
Aneesh Relan
705c2a5785 tests: increase test coverage for extensions.test.ts 2021-10-08 20:28:41 +05:30
Aneesh Relan
5e33fdb0d9 tests: refactor extensions.test.ts to use jest.each 2021-10-08 20:02:42 +05:30
Shivam Mathur
dab978c436
Add patch to update brew core repo 2021-10-06 18:12:11 +05:30
Aneesh Relan
2cc925b655 tests: refactor extensions test to use jest-each 2021-10-06 01:05:47 +05:30
Shivam Mathur
4ce6f3c3df
Merge pull request #513 from aneeshrelan/feature/automate-publish-to-npm-github
ci: add github action to publish to npm and github packages
2021-10-05 23:39:12 +05:30
Aneesh Relan
b3bf0f3990 fix: remove dry run 2021-10-05 23:23:05 +05:30
Aneesh Relan
8426bf89fd ci: add github action to publish to npm and github packages 2021-10-05 23:10:58 +05:30
Shivam Mathur
d7c3e33a96
Add patch to update ca-certificates on windows-2016 2021-10-04 19:41:33 +05:30
Shivam Mathur
17ef667e04
Bump version to 2.15.0
Update Node.js dependencies

Replace husky with simple-git-hooks

Cleanup whitespace in README

Fix git command in format script
2021-09-28 04:19:39 +05:30
Shivam Mathur
295b5da700
Add config to resolve extensions from shivammathur/extensions 2021-09-23 18:55:16 +05:30
Shivam Mathur
e820a5d75b
Merge pull request #503 from jrfnl/feature/tools-add-phpunit-polyfills
Tools: add PHPUnit Polyfills
2021-09-20 19:38:29 +05:30
jrfnl
2c8682d5e6 Tools: add support for phpunit-polyfills
Ref: https://github.com/Yoast/PHPUnit-Polyfills
2021-09-20 16:04:04 +02:00
Shivam Mathur
87993cd853
Add lowercase alias for phpDocumentor on unix 2021-09-20 06:23:13 +05:30
Shivam Mathur
e0dd9c9560
Merge pull request #501 from jrfnl/feature/fix-typo
Fix apparent typo
2021-09-20 06:19:02 +05:30
Shivam Mathur
28853c9f3b
Merge pull request #500 from jrfnl/feature/tools-add-parallel-lint
Tools: add support for PHP Parallel Lint
2021-09-20 06:18:47 +05:30
jrfnl
608ad1a0cf Tools: fix typo
While the PHPCPD and PHPUnit tools use the [same function under the hood](1fa3ba1b16/src/tools.ts (L461-L473)), I have the impression that the `function` keyword should be the tool name.

If that's correct, this should fix it.
2021-09-20 02:22:42 +02:00
jrfnl
257e4c088d Tools: add support for parallel-lint 2021-09-20 02:22:22 +02:00
Shivam Mathur
7b145b5fae
Add fileinfo extension with phpdoc
Add aliases for phpdoc
2021-09-20 05:46:02 +05:30
Shivam Mathur
253459691c
Merge pull request #498 from jrfnl/feature/tools-add-phpdocumentor
Tools: add support for phpDocumentor
2021-09-20 04:52:15 +05:30
Shivam Mathur
cb5db3f888
Fix enabling cached extensions with custom support 2021-09-20 01:55:38 +05:30
Shivam Mathur
52d2b3b70b
Fix Blackfire extensions logs when cached 2021-09-19 21:42:29 +05:30
jrfnl
fa5fbefff9 Tools: add support for phpDocumentor 2021-09-19 13:41:39 +02:00
Shivam Mathur
256b466cc4
Make all extension variables local 2021-09-19 15:33:45 +05:30
Shivam Mathur
57f4a60e24
Fix enabling firebird when cached 2021-09-19 10:05:07 +05:30
Shivam Mathur
2e289f30e2
Fix Ioncube logs if cached 2021-09-19 10:05:06 +05:30
Shivam Mathur
bc0d607611
Fix cache support for phalcon4 2021-09-19 10:04:57 +05:30
Shivam Mathur
1fa3ba1b16
Fix php_extra_version on macOS 2021-09-19 03:58:05 +05:30
Shivam Mathur
d8d1da5d6d
Fix version for PECL extensions in logs 2021-09-19 03:17:13 +05:30
Shivam Mathur
094bc8ae17
Fix parsing php-src tag 2021-09-19 02:54:02 +05:30
Shivam Mathur
48aac87d46
Fix setup for cached OCI extensions 2021-09-19 02:41:04 +05:30
Shivam Mathur
31971c78cd
Fix parsing extra version 2021-09-19 02:38:31 +05:30
Shivam Mathur
13760f5b16
Add support for expect and ssh2 using shivammathur/extensions tap on macOS 2021-09-16 18:41:02 +05:30
Shivam Mathur
c644f654ce
Add check for package files when adding PPA 2021-09-15 00:25:36 +05:30
Shivam Mathur
9adda12e86
Add automated single SVG for corporate sponsors 2021-09-14 00:03:18 +05:30
Shivam Mathur
6db8a6c378
Improve docs for extensions: none 2021-09-13 19:55:06 +05:30
Shivam Mathur
a34eeedd37
Bump version to 2.14.0
Add config to generate types

Fix build error in install.ts after TypeScript upgrade

Minor refactor in install.test.ts

Add bugs, directories, files and types entries in package.json

Update Node.js dependencies

Update SECURITY.md
2021-09-11 05:25:45 +05:30
Shivam Mathur
35bc046b26
Improve documentation for disabling extensions 2021-09-11 05:25:43 +05:30
Shivam Mathur
64e9bb0e79
Add special cases to config.test.ts 2021-09-09 07:19:49 +05:30
Shivam Mathur
19a01870e7
Refactor config.test.ts 2021-09-09 07:08:12 +05:30
Shivam Mathur
c4560dd084
Refactor coverage.test.ts 2021-09-09 06:54:17 +05:30
Shivam Mathur
0313f578ce
Add sponsor svg 2021-09-08 12:19:06 +05:30
Shivam Mathur
d068c17d9e
Add support for nightly alias 2021-09-06 11:58:31 +05:30
Shivam Mathur
8eebeae48a
Use commit hash in url for nightly builds in darwin.sh 2021-09-05 12:32:28 +05:30
Shivam Mathur
da9dadf09c
Fix parsing 8.1 version 2021-09-02 19:24:08 +05:30
Shivam Mathur
e06e40278f
Specify version in Windows nightly setup 2021-09-02 00:35:19 +05:30
Shivam Mathur
6473b1c04c
Add 8.2 to the workflows 2021-09-02 00:18:50 +05:30
Shivam Mathur
7694412cb0
Update documentation for PHP 8.2.0-dev 2021-09-01 19:34:48 +05:30
Shivam Mathur
e990e98a54
Use shivammathur/extensions tap to install vips on macOS 2021-09-01 15:53:05 +05:30
Shivam Mathur
b2d037d560
Add support to remove all shared extensions 2021-08-28 12:17:23 +05:30
Shivam Mathur
4beeea41b4
Fix logs of disabled dependent extensions
Use shared_extension function on unix
2021-08-28 12:17:22 +05:30
Shivam Mathur
8e80635955
Fix parsing extensions input if Zend OPcache is specified instead of opcache 2021-08-28 12:17:21 +05:30
Shivam Mathur
c8837583fc
Do not check dependents for PCOV and Xdebug 2021-08-28 12:17:21 +05:30
Shivam Mathur
bb36513e49
Add support to disable dependent extensions 2021-08-28 12:17:20 +05:30
Shivam Mathur
5402397d9f
Do not delete extensions, just disable them 2021-08-28 12:17:19 +05:30
Shivam Mathur
f6b4601c63
Run New-Item with -Force as items can pre-exist on self-hosted environments
Pipe output to $null as that is removed for verbose and not Out-Null, and is also faster
2021-08-28 12:17:18 +05:30
Shivam Mathur
ed62711289
Update sponsor options [skip ci] 2021-08-28 12:14:51 +05:30
Shivam Mathur
2cb9b82943
Fix extension logs 2021-08-24 19:29:33 +05:30
Shivam Mathur
4f420be5bd
Add windows-2022 to the README 2021-08-24 18:53:16 +05:30
Shivam Mathur
cf40c1e950
Bump version to 2.13.0
Update dependencies
2021-08-23 16:19:24 +05:30
Shivam Mathur
91936faf85
Update README 2021-08-23 16:19:19 +05:30
Shivam Mathur
ca319bd10e
Use AdditionalFilesPath parameter in Install-PhpExtension
AdditionalFilesPath allows to specify a directory inside extension directory (which can be cached) for installing dependencies which are in the same archive as the extension

Fix dependency directory name to correctly use VCVersion in win32.ps1

Fix exception in phalcon4 setup on Windows.
2021-08-23 14:31:00 +05:30
Shivam Mathur
4d3cfaa653
Fixed support for php-cs-fixer
Added fetch_latest to tools.json. When fetch_latest is true for a tool
it will fetch the release.atom for the tool and parse that to get the
latest release.

Bumped lib version to ES2020 in tsconfig.json for string.matchAll.
2021-08-20 09:14:39 +05:30
Shivam Mathur
c8b716540c
Stop doing shallow clones on macOS self-hosted 2021-08-18 09:53:35 +05:30
Shivam Mathur
1cecc2cc99
Use systemctl only if systemd is present else use the service wrapper 2021-08-18 09:53:33 +05:30
Shivam Mathur
5137c78ee5
Use shivammathur/extensions tap for yaml extension on macOS 2021-08-18 09:53:32 +05:30
Shivam Mathur
c37021df01
Set HOMEBREW_DEVELOPER=1 in macOS 2021-08-18 09:53:31 +05:30
Shivam Mathur
c6e99860cd
Improve adding PPAs on Linux 2021-08-18 09:53:30 +05:30
Shivam Mathur
05b4ac2afb
Use --no-install-recommends with APT on Linux 2021-08-18 09:53:29 +05:30
Shivam Mathur
91bd11146c
Add support for self-hosted debian runner 2021-08-18 09:53:28 +05:30
Shivam Mathur
8ace7bdc6e
Switch to /etc/os-release on Linux
Improve self-hosted support
2021-08-18 09:53:27 +05:30
Shivam Mathur
4bb4f1812c
Fix to make utils.readEnv more resilient to user input 2021-08-18 09:53:26 +05:30
Shivam Mathur
7bd9f10bef
Add no_tools_cache flag 2021-08-18 09:53:25 +05:30
Shivam Mathur
0b38e86c65
Use shivammathur/extensions tap on macOS for mongodb on PHP 5.6 to 8.1 2021-08-18 09:53:24 +05:30
Shivam Mathur
b717b2fcde
Rename macos-11.0 to macos-11 2021-08-18 09:52:47 +05:30
Shivam Mathur
216d501175
Merge pull request #483 from lolautruche/patch-1
Use systemctl instead of services to install blackfire
2021-08-17 13:15:43 +05:30
Jérôme Vieilledent
c2e811ce23
Use systemctl instead of services to install blackfire 2021-08-17 13:06:19 +05:30
Shivam Mathur
dbf50bf9e0
Upgrade blackfire to v2 2021-08-17 13:06:05 +05:30
Shivam Mathur
947009a717
Sunset support for Ubuntu 16.04 2021-08-02 23:10:43 +05:30
Shivam Mathur
ca910e5511
Merge pull request #481 from jrfnl/feature/update-phive-config
Update Phive configuration
2021-08-01 23:30:47 +05:30
jrfnl
f31d416e6e Update Phive configuration
Phive has released version `0.15.0` which ups the minimum supported PHP version to PHP 7.3.

This adds the switch statement for Phive to take this into account.

Ref: https://github.com/phar-io/phive/releases
2021-08-01 19:52:48 +02:00
Shivam Mathur
36cb9fb0fc
Fix composer permissions on unix 2021-07-21 19:00:00 +05:30
Shivam Mathur
6a8a2abd3c
Improve symfony examples 2021-07-17 11:49:03 +05:30
Shivam Mathur
c88f07696b
Add support for phpunit-bridge 2021-07-17 08:42:11 +05:30
Shivam Mathur
0b33ef444f
Revert "Add patch for PCRE2"
This reverts commit fefbd7a497af49675efddfb3d1b068acb4044a8a.
2021-07-16 15:55:40 +05:30
Shivam Mathur
604ffba8e1
Update status-page link in README 2021-07-16 15:14:15 +05:30
Shivam Mathur
a3727c20a4
Bump version to 2.12.0
Update Node.js dependencies
2021-07-14 14:38:18 +05:30
Shivam Mathur
6a9b0017a4
Update README 2021-07-14 14:17:38 +05:30
Shivam Mathur
3b2ce6cae6
Update Ubuntu 16.04 warning in install.ts 2021-07-14 14:17:38 +05:30
Shivam Mathur
c61b9256d1
Improve grpc_php_plugin support 2021-07-14 14:17:37 +05:30
Shivam Mathur
09e08a3554
More fixes in fetching tool versions 2021-07-14 14:17:32 +05:30
Shivam Mathur
f31bef6a30
Set firebird client version to 3.0.7 on macOS 2021-07-12 10:45:57 +05:30
Shivam Mathur
1a216636c5
Use composer for composer-require-checker 2021-07-12 10:45:56 +05:30
Shivam Mathur
7eec3d790d
Fix repeated version_prefix 2021-07-10 02:10:33 +05:30
Shivam Mathur
5afed16e5f
Fix support for imagick for PHP 5.3 to 5.5 on macOS 2021-07-10 00:50:50 +05:30
Shivam Mathur
14fa980966
Improve error handling in utils.fetch and its uses
Minor fixes in tests

Revert to ES2019
2021-07-09 11:26:38 +05:30
Shivam Mathur
39491a0fba
Add authorization header to GitHub API call when COMPOSER_TOKEN is set 2021-07-07 22:40:05 +05:30
Shivam Mathur
c6b6dabbb9
Refactor tests for tools using jest.Each 2021-07-07 22:40:04 +05:30
Shivam Mathur
e1a9afe11c
Add support to specify major or major.minor versions for tools with GitHub repository 2021-07-07 22:40:03 +05:30
Shivam Mathur
6449431df2
Move tools config to tools.json
Refactor tools functions to use Records and object literals
2021-07-07 22:40:02 +05:30
Shivam Mathur
60ff774608
Fix replacing v prefix in tool version 2021-07-07 22:40:01 +05:30
Shivam Mathur
dd591f1661
Use shivammathur/extensions tap for rdkafka on macOS 2021-07-07 22:39:59 +05:30
Shivam Mathur
fefbd7a497
Add patch for PCRE2 2021-07-07 22:33:14 +05:30
Shivam Mathur
10f1a63300
Update contributors svg in README.md 2021-06-10 13:44:58 +05:30
Shivam Mathur
a06325cfba
Merge pull request #464 from fortkle/fix-document-error
Update readme about composer (Fixed errors)
2021-06-10 09:01:06 +05:30
fortkle
e0b7f34ba7 improve documentation 2021-06-10 12:11:47 +09:00
Shivam Mathur
e02a1810e6
Fix protoc support 2021-06-04 21:34:32 +05:30
Shivam Mathur
55ab748aaa
Update dependencies
Update to Jest 27

Set sourceMap to true in tsconfig.json
2021-06-04 21:34:31 +05:30
Shivam Mathur
bb0acc6313
Fix extension setup 2021-06-04 21:34:23 +05:30
Shivam Mathur
17fd1a694b
Refactor patch_brew in darwin.sh 2021-05-27 22:00:47 +05:30
Shivam Mathur
454ef11759
Fix comments in darwin.sh 2021-05-27 21:05:36 +05:30
Shivam Mathur
e3396c6572
Force overwrite updated dependencies on macOS 2021-05-27 21:05:25 +05:30
Shivam Mathur
3beda962f3
Fix dependencies on pre-installed PHP on macOS 2021-05-15 18:27:18 +05:30
Shivam Mathur
1f97ce0215
Use VCVersion and Architecture for extension dependency directory name on Windows 2021-05-12 22:54:47 +05:30
Shivam Mathur
00f360b99d
Symlink extension dependencies on Windows instead of adding to PATH
This is done because other actions seem to mess with PATH breaking the installed extension
2021-05-12 22:54:41 +05:30
Shivam Mathur
9882bed066
Install extension dependencies in ext_dir on Windows 2021-05-11 07:24:22 +05:30
Shivam Mathur
e8855efe7c
Fix self-hosted setup on linux 2021-05-05 22:16:03 +05:30
Shivam Mathur
4067ce8b81
Deprecate Ubuntu 16.04 2021-05-04 23:43:26 +05:30
Shivam Mathur
d5790807c8
Fix to not use system PHP on macOS
Refactor add_php in darwin.sh
2021-05-04 23:15:13 +05:30
Shivam Mathur
ed61605069
Fix typo in shivammathur/node tags in README 2021-05-02 05:10:25 +05:30
Shivam Mathur
d0e7f46ec4
Add ppa:ondrej/php for all Ubuntu versions actions/virtual-environments#3272 2021-05-01 11:27:58 +05:30
Shivam Mathur
ef477a1dd7
Use mirror for ppa:ondrej/php on Ubuntu 16.04
Remove support for Ubuntu 16.04 self-hosted runners
2021-05-01 11:07:24 +05:30
Shivam Mathur
9149639a33
Fix linking when oracle's infra randomly resolves to different versions of client and sdk 2021-04-29 01:19:45 +05:30
Shivam Mathur
2fdb2200a0
Fix PHP extension support section in README 2021-04-28 11:57:46 +05:30
Shivam Mathur
15c43e89cd
Fix mysql regex for windows in extensions.ts 2021-04-27 15:17:29 +05:30
Shivam Mathur
b0559f7f8e
Bump version to 2.11.0
Update dependencies

Update year in license

Cleanup tsconfig.json

Set moduleResolution to node in tsconfig.json
2021-04-26 15:12:09 +05:30
Shivam Mathur
a41bc75590
Update README 2021-04-26 10:08:04 +05:30
Shivam Mathur
6ebd1e5184
Fix versions of composer tools 2021-04-26 06:55:12 +05:30
Shivam Mathur
9ad81048ce
Use shivammathur/extensions for memcache and memcached on darwin 2021-04-21 22:37:23 +05:30
Shivam Mathur
8cfcbb030f
Add support for tools: none 2021-04-21 17:11:24 +05:30
Shivam Mathur
254ecd5a66
Fix phalcon3 on windows 2021-04-21 07:34:30 +05:30
Shivam Mathur
0461bf14b2
Fix blackfire extension version to 1.50.0 for PHP 5.3 to 5.6 2021-04-21 07:25:57 +05:30
Shivam Mathur
7e5351f399
Do not lowercase source extension input
Fix warnings in parseExtensionSource in utils.ts

Fix add_lib_log in source.sh
2021-04-21 04:38:37 +05:30
Shivam Mathur
fe944a16b5
Use EXTENSION_PATH to specify subdirectory in add_extension_from_source 2021-04-20 17:20:36 +05:30
Shivam Mathur
909090903e
Update SECURITY.md 2021-04-19 17:06:01 +05:30
Shivam Mathur
75a1b03f39
Update Node version to 15.x 2021-04-19 17:06:00 +05:30
Shivam Mathur
a47644812e
Add fallback to Install-PSPackage in win32.ps1 2021-04-19 17:06:00 +05:30
Shivam Mathur
23393c46d7
Add support for composer packages using tools input 2021-04-19 17:05:59 +05:30
Shivam Mathur
3c6827c2c3
Use shivammathur/extensions for phalcon and psr 2021-04-19 17:05:53 +05:30
Shivam Mathur
de8537f42a
Use lcov.info for coverage 2021-04-15 16:54:35 +05:30
Shivam Mathur
ada1ce86b7
Refactor and improve extension support
Add support for APCu on macOS from shivammathur/homebrew-extensions
Improve support for geos to compile on PHP 8.0 and 8.1
Fix pecl setup to avoid unnecessary callbacks
Use GitHub releases for all couchbase versions
Use add_extension_from_source for all custom supported extensions
Remove bintray and use shivammathur/intl-icu releases
Add patch for protobuf for installing from source
Move patches from custom extension scripts to patches directory
Add support to build extension from GitHub and pecl tar archives (Internal API)
Refactor regex in extension.ts
Move add_pecl_extension to common.sh
Refactor remove_extension in darwin.sh
Fix shellcheck warning in darwin.sh
Improve switch_version in linux.sh to accept parameters
2021-04-15 16:54:35 +05:30
Shivam Mathur
7c13389546
Revert "Fix pcov on PHP 8.0 on Windows"
This reverts commit a83d4379b1200b3d0d19ad4fe0d7a440e00749c1.
2021-04-15 16:54:34 +05:30
Shivam Mathur
7627a79c01
Fix sub-directory support for extension setup from source 2021-04-15 16:54:33 +05:30
Shivam Mathur
39faaac1d3
Improve source extension setup logs
Refactor source extension setup code to src/scripts/ext/source.sh
2021-04-15 16:54:32 +05:30
Shivam Mathur
b3152daa8d
Add support for any git repository to compile extension from source
Add support for extensions in a subdirectory to compile from source
2021-04-15 16:54:32 +05:30
Shivam Mathur
6db6ddbab2
Fix version log for nightly PHP on ubuntu 2021-04-15 16:54:31 +05:30
Shivam Mathur
c870bc9a3a
Fail-fast if input repository does not have a PHP extension 2021-04-15 16:54:30 +05:30
Shivam Mathur
f5f14c3aa3
Improve logs for building extensions from source 2021-04-15 16:54:29 +05:30
Shivam Mathur
e831babc61
Add support for specifying configure opts when building extensions from source 2021-04-15 16:54:28 +05:30
Shivam Mathur
c7736a605a
Add support for adding libraries when building extensions from source 2021-04-15 16:54:28 +05:30
Shivam Mathur
a9a6d1986e
Fix add_extension_log 2021-04-15 16:54:27 +05:30
Shivam Mathur
c342ca379e
Check if the extensions has to be built from source first 2021-04-15 16:54:26 +05:30
Shivam Mathur
cc316409b0
Use GitHub releases for libcouchbase 2 on linux 2021-04-15 16:54:26 +05:30
Shivam Mathur
a8dafdc2b5
Fix cubrid setup on Ubuntu 16.04 2021-04-15 16:54:25 +05:30
Shivam Mathur
f8646352c6
Fix gearman setup 2021-04-15 16:54:24 +05:30
Shivam Mathur
3cbec713b8
Add parameters to ppa/lists functions in linux.sh 2021-04-15 16:54:23 +05:30
Shivam Mathur
4186db28f7
Use cached packages for PHP updates on GHR 2021-04-15 16:54:22 +05:30
Shivam Mathur
18f02c9c99
Revert to ppa:ondrej/ppa for phalcon3 2021-04-15 16:54:22 +05:30
Shivam Mathur
15b99e2a8d
Fix warning in install.ts 2021-04-15 16:54:21 +05:30
Shivam Mathur
e9a7adef28
Revert "Fix macOS setup"
This reverts commit 0c4c4d5441035f77d907a2e3306ed284a9aa3fd1.
2021-04-15 16:48:29 +05:30
Shivam Mathur
bceb2ef3d8
Remove bintray 2021-04-13 19:08:47 +05:30
Shivam Mathur
86e7315da6
Replace bintray with jsdelivr for scripts 2021-04-13 19:08:46 +05:30
Shivam Mathur
0741f2b23a
Fix icu-intl setup 2021-04-13 19:08:45 +05:30
Shivam Mathur
0c4c4d5441
Fix macOS setup 2021-04-13 19:08:40 +05:30
Shivam Mathur
abfbe6a46b
Remove dotdeb support 2021-04-03 15:51:47 +05:30
Shivam Mathur
62aa8428dd
Fix coverage 2021-03-23 06:50:05 +05:30
Shivam Mathur
e6a3eb1258
Fix composer setup on self-hosted 2021-03-17 22:04:42 +05:30
Shivam Mathur
0ce7328fd7
Add PHP commit hash in logs on nightly on Ubuntu 2021-03-13 19:09:09 +05:30
Shivam Mathur
6e76d3f012
Fix linking old_libraries in macOS 2021-03-08 19:13:00 +05:30
Shivam Mathur
ac40fdb561
Install with force in macOS 2021-03-08 18:33:43 +05:30
Shivam Mathur
890ea4bca9
Fix enable extension 2021-03-07 04:18:26 +05:30
Shivam Mathur
113fcc64e3
Fix docs workflow
Do not run docs workflow on macos-11.0

Run docs workflow on saturday
2021-03-03 09:16:13 +05:30
Shivam Mathur
afefcaf556
Update OS/Platform Support in README 2021-03-03 08:23:41 +05:30
Shivam Mathur
df4388ca60
Link libs of updated PHP dependencies on macOS 2021-02-28 19:20:28 +05:30
Shivam Mathur
fa18c2b29f
Remove bintray from manifest and win32.ps1
Fix JIT ini values in win32.ps1
2021-02-23 14:34:03 +05:30
Shivam Mathur
399ab79d14
Improve support for couchbase, pdo_firdbird, pdo_oci and phalcon3
Downgrade husky to 4.x
2021-02-23 13:07:17 +05:30
Shivam Mathur
9601a19811
Bump version to 2.10.0
Update dependencies

Fix eslint config
2021-02-22 15:57:16 +05:30
Shivam Mathur
60ff151fc1
Update README 2021-02-22 08:01:32 +05:30
Shivam Mathur
121cb19a65
Fix composer tools setup 2021-02-20 17:54:40 +05:30
Shivam Mathur
739ccacdc4
Refactor tools
Improve support for tool aliases
2021-02-20 16:11:20 +05:30
Shivam Mathur
cff0bdeaa3
Use composer for codeception setup 2021-02-19 13:49:58 +05:30
Shivam Mathur
70d858dd49
Add support for msgpack and redis on macOS for PHP 5.6+ 2021-02-19 13:49:57 +05:30
Shivam Mathur
3340d60d91
Improve support for pecl_http on linux and macOS 2021-02-19 13:49:56 +05:30
Shivam Mathur
57c17e3349
Add support for pecl_http on Windows for PHP 7.1 to 8.0 2021-02-19 13:49:55 +05:30
Shivam Mathur
356e1a5128
Add support for pecl_http, propro, raphf, xdebug2 and zmq using shivammathur/extensions tap 2021-02-19 13:49:54 +05:30
Shivam Mathur
633920d001
Merge pull request #409 from dingo-d/master
Update readme with additional tools support
2021-02-19 13:49:53 +05:30
Shivam Mathur
406f3c410a
Revert "Update brew for all PHP versions until updated on images"
This reverts commit 2ea6ca5b36a9908f43aa30e2c2a206e0d86e3549.
2021-02-19 13:49:52 +05:30
Shivam Mathur
17349dafc1
Improve regexes in extensions.ts 2021-02-19 13:49:51 +05:30
Denis Žoljom
962f570776
Update README.md
Add wp-cli to the list of supported tools.
2021-02-19 13:49:50 +05:30
Shivam Mathur
f66ac5d5a6
Merge pull request #399 from alcaeus/allow-github-extension-installs
Allow extensions to be compiled from GitHub sources
2021-02-19 13:49:50 +05:30
Andreas Braun
3f466981fc
Address review feedback 2021-02-19 13:49:49 +05:30
Andreas Braun
fd62612e9e
Allow building specific commits 2021-02-19 13:49:42 +05:30
Andreas Braun
26791e8412
Address code review feedback 2021-02-19 13:49:41 +05:30
Andreas Braun
f42065d568
Allow extensions to be compiled from GitHub sources 2021-02-19 13:49:40 +05:30
Shivam Mathur
912f27c42c
Improve regex in utils.parseVersion 2021-02-19 13:49:39 +05:30
Shivam Mathur
86e1ccdd8d
Fix pdo setup 2021-02-19 13:30:02 +05:30
Shivam Mathur
36ec0200a6
Fix cache support for cubrid and pdo_cubrid 2021-02-19 07:18:39 +05:30
Shivam Mathur
1686147b24
Do not quote ini values with error constants 2021-02-04 13:01:05 +05:30
Shivam Mathur
ecc8611061
Update README 2021-02-04 11:00:28 +05:30
Shivam Mathur
abefdb50ee
Fix composer config syntax 2021-02-04 11:00:27 +05:30
Shivam Mathur
2ea6ca5b36
Update brew for all PHP versions until updated on images 2021-02-04 11:00:20 +05:30
Shivam Mathur
a83d4379b1
Fix pcov on PHP 8.0 on Windows 2021-01-19 20:36:17 +05:30
Shivam Mathur
fbc8407035
Add support to specify version in \d.x notation 2021-01-16 11:16:13 +05:30
Shivam Mathur
6972aed899
Add support for quoted csv in ini-values 2021-01-15 13:52:18 +05:30
Shivam Mathur
d2f58713aa
Use GITHUB_ENV to append to PATH 2021-01-07 21:53:45 +05:30
Shivam Mathur
068c794af7
Change Node.js version in the workflow 2021-01-07 00:14:26 +05:30
Shivam Mathur
1e119b6d1a
Fix add_pdo_extension in linux.sh 2021-01-07 00:13:05 +05:30
Shivam Mathur
77721f6637
Make sure tool path is always in PATH 2020-12-26 01:25:36 +05:30
Shivam Mathur
d731e56579
Add support for macOS ARM 2020-12-26 01:25:30 +05:30
Shivam Mathur
e5b90e33c6
Add support for coverage: xdebug2 2020-12-24 18:20:42 +05:30
Shivam Mathur
849315646a
Add support for brewed extensions on PHP 8.0 and 8.1 on macOS 2020-12-24 15:48:35 +05:30
Shivam Mathur
d891a81b7f
Fix add_brew_tap in darwin.sh
Fix shellcheck in darwin.sh
2020-12-24 03:34:39 +05:30
Shivam Mathur
5098017251
Update js dependencies 2020-12-21 22:51:36 +05:30
Shivam Mathur
2da85f306f
Add support for specifying ICU version on PHP 8.0 2020-12-19 18:47:19 +05:30
Shivam Mathur
1f94ad201f
Improve symfony example workflows 2020-12-19 18:41:33 +05:30
Shivam Mathur
862f206cd2
Merge pull request #377 from smoqadam/master
issue #376 - Install phpunit dependencies before runs the tests
2020-12-19 04:36:39 -08:00
smoqadam
81964ae791 issue #376 - Install phpunit dependencies before runs the tests 2020-12-19 20:18:12 +08:00
Shivam Mathur
b7d1d9c9a9
Adjust $nightly_versions on linux 2020-12-18 22:45:12 +05:30
Shivam Mathur
c5e4d55c3b
Add devtools on self-hosted workflows 2020-12-18 22:40:16 +05:30
Shivam Mathur
d74064b67a
Fix setting xdebug.mode 2020-12-17 21:08:00 +05:30
Shivam Mathur
8862a73fdd
Update Pre-installed PHP in README 2020-12-17 19:03:15 +05:30
Shivam Mathur
7b44f7e007
Fix couchbase on PHP 7.2 2020-12-17 16:29:01 +05:30
Shivam Mathur
ff5499165a
Set JIT related ini values on PHP 8 2020-12-17 14:02:00 +05:30
Shivam Mathur
b3cd6b4dab
Improve pecl support 2020-12-17 12:54:01 +05:30
Shivam Mathur
ce02569aea
Exit on failing to setup PHP 2020-12-17 04:43:16 +05:30
Shivam Mathur
f1c04eb1eb
Update sponsor logos 2020-12-15 16:22:21 +05:30
Shivam Mathur
77aeac1761
Fix logging in add_pdo_extension in linux.sh 2020-12-14 22:33:39 +05:30
Shivam Mathur
569522d50d
Fetch homebrew taps manually 2020-12-14 19:34:32 +05:30
Shivam Mathur
ea8be20255
Improve support for phive 2020-12-14 15:43:12 +05:30
Shivam Mathur
d6f700217a
Fix comments in extensions.ts 2020-12-14 15:42:58 +05:30
Shivam Mathur
1015b3659d
Add support for blackfire on PHP 8 2020-12-14 14:53:27 +05:30
Shivam Mathur
03359ef1ab
Improve README 2020-12-14 14:53:26 +05:30
Shivam Mathur
fd9aae59b0
Add support for geos on unix 2020-12-14 14:53:19 +05:30
Shivam Mathur
9af1e7006f
Use shivammathur/extensions tap for imap and amqp on macOS 2020-12-03 15:01:13 +05:30
Shivam Mathur
5efdcae81a
Use brew for grpc_php_plugin on macOS 2020-12-02 10:09:22 +05:30
Shivam Mathur
f0fb8731a5
Update ini files for all available SAPI 2020-12-02 05:50:56 +05:30
Shivam Mathur
5a15252e66
Fix docs workflow 2020-12-01 08:48:41 +05:30
Shivam Mathur
c0c6e403b6
Merge pull request #347 from shivammathur/develop
2.9.0
2020-11-28 15:08:28 +05:30
Shivam Mathur
d0677c93b9
Bump version to 2.9.0 2020-11-28 15:08:27 +05:30
Shivam Mathur
466908db61
Set 8.0 as the latest version 2020-11-28 15:08:26 +05:30
Shivam Mathur
8dbd6b7684
Improve PECL support 2020-11-28 02:13:43 +05:30
Shivam Mathur
5a40a5875d
Fix xdebug setup
Co-authored-by: Owen Voke <development@voke.dev>
Co-authored-by: Shivam Mathur <shivam_jpr@hotmail.com>
2020-11-28 02:13:42 +05:30
Shivam Mathur
790a41a722
Fix getting grpc latest tag 2020-11-28 02:13:41 +05:30
Shivam Mathur
62c7ba2bee
Improve darwin.sh 2020-11-28 02:13:36 +05:30
Shivam Mathur
41797e3af9
Prioritize bintray over GitHub releases for scripts 2020-11-25 11:12:07 +05:30
Shivam Mathur
c6150c6a2b
Fix fail-fast in Windows 2020-11-25 05:39:44 +05:30
Shivam Mathur
19b09596c6
Fix fetching extension version from PECL on macOS 2020-11-25 05:32:15 +05:30
Shivam Mathur
4ec398d39a
Fix deleting extensions 2020-11-25 05:23:27 +05:30
Shivam Mathur
6bbaac9c49
Change description in actions.yml 2020-11-24 16:28:41 +05:30
Shivam Mathur
012f269570
Improve README 2020-11-24 11:03:03 +05:30
Shivam Mathur
09222f42ae
Skip prestissimo and composer-prefetcher unless composer:v1 is specified 2020-11-21 11:11:33 +05:30
Shivam Mathur
403191b6b6
Sync dependencies from tap in add_brew_extension 2020-11-21 10:54:39 +05:30
Shivam Mathur
02cba443ad
Merge pull request #337 from shivammathur/develop
2.8.0
2020-11-20 08:39:42 +05:30
Shivam Mathur
31fa0d7883
Bump version to 2.8.0 2020-11-20 08:39:41 +05:30
Shivam Mathur
f9caa0457d
Update README 2020-11-20 08:39:40 +05:30
Shivam Mathur
248394635c
Fix grpc_php_plugin setup 2020-11-20 08:39:39 +05:30
Shivam Mathur
a094f682be
Add support for couchbase 2020-11-20 08:39:39 +05:30
Shivam Mathur
45213ad923
Fix extension setup on self-hosted linux 2020-11-20 08:39:38 +05:30
Shivam Mathur
385e3b6e96
Revert "Remove dashes from step ids"
This reverts commit 4d5f03db8a8f80fdd8587ebc20759f072ea27472.
2020-11-20 08:39:37 +05:30
Shivam Mathur
5453c1f4f0
Revert "Switch to apt-get"
This reverts commit 1394617d600be9d8f267927fc5089bf9a956c89f.
2020-11-20 08:39:36 +05:30
Shivam Mathur
787c534f64
Improve web requests 2020-11-20 08:39:35 +05:30
Shivam Mathur
d812e938ac
Refactor to dry unix scripts 2020-11-20 08:39:34 +05:30
Shivam Mathur
7de94e6400
Fetch release with tool when latest one does not 2020-11-20 08:39:29 +05:30
Shivam Mathur
68fbd80105
Add workflow to add default extensions on wiki 2020-11-02 04:47:28 +05:30
Shivam Mathur
02445f719d
Improve regexes for pre-release extensions 2020-10-31 21:20:49 +05:30
Shivam Mathur
215b040f0d
Fix contribution docs 2020-10-31 14:55:27 +05:30
Shivam Mathur
925ede2589
Refactor composer setup 2020-10-30 19:25:39 +05:30
Shivam Mathur
d1510a82d5
Merge pull request #321 from mlocati/composer-specific-version
Allow installing a specific Composer version
2020-10-30 17:46:45 +05:30
Michele Locati
808e74aed5
Adjust filtered composer version 2020-10-30 12:02:36 +01:00
Michele Locati
f51d00d350
Allow installing a specific Composer version 2020-10-30 11:15:26 +01:00
Shivam Mathur
c8111b053c
Fix blackfire-player to v1.9.3 for PHP 5.5 to PHP 7.0 2020-10-30 11:40:25 +05:30
Shivam Mathur
294f03454a
Install VcRedist from GitHub 2020-10-30 11:40:24 +05:30
Shivam Mathur
5d27b8f90e
Use PECL directly for nightly versions 2020-10-28 22:21:08 +05:30
Shivam Mathur
87e62cbb7f
Fix composer version for prestissimo & composer-prefetcher to v1 2020-10-25 00:55:01 +05:30
Shivam Mathur
2c29e8b9a1
Fix version change if composer is a dependency 2020-10-24 23:40:43 +05:30
Shivam Mathur
04a9e3b562
Update dependencies as per runner on macOS 2020-10-23 07:22:04 +05:30
Shivam Mathur
4adaa73d25
Merge pull request #315 from GrahamCampbell/patch-1
PHP 8.1 supported too
2020-10-22 02:45:09 +05:30
Graham Campbell
234594684c
PHP 8.1 supported too 2020-10-21 22:08:40 +01:00
Shivam Mathur
3c0527bec1
Merge pull request #313 from shivammathur/develop
2.7.0
2020-10-19 18:26:33 +05:30
Shivam Mathur
c5d41cd3f1
Bump version to 2.7.0 2020-10-19 17:39:36 +05:30
Shivam Mathur
601cabfd2a
Update README 2020-10-19 17:06:48 +05:30
Shivam Mathur
81c750c6d7
Add support for imagick for PHP 5.6+ on macOS using shivammathur/homebrew-extensions 2020-10-19 15:55:40 +05:30
Shivam Mathur
0661130e18
Add support for igbinary on macOS using shivammathur/homebrew-extensions 2020-10-18 19:41:59 +05:30
Shivam Mathur
4244b92ac6
Fix matchers setup when action is called twice 2020-10-18 19:41:58 +05:30
Shivam Mathur
e9595da9ac
Remove patch for RLIMIT_CORE bug in sudo, fixed upstream 2020-10-18 19:41:57 +05:30
Shivam Mathur
b77ec78d01
Add support for fail-fast env variable 2020-10-18 19:41:56 +05:30
Shivam Mathur
96d8c1e901
Add support for PHP 8.1 on par with PHP 8.0 2020-10-18 19:41:55 +05:30
Shivam Mathur
8816b6ff48
Add PHP 8.1 to the main workflow 2020-10-18 19:41:54 +05:30
Shivam Mathur
9205a596c9
Add support for PHP 8.1 on Windows 2020-10-18 19:41:53 +05:30
Shivam Mathur
6fc20c9b7f
Add support for PHP 8.1 on Ubuntu 2020-10-18 19:41:52 +05:30
Michele Locati
eb07280d5c
Perform only one URL call to download latest PhpManager.zip asset 2020-10-18 19:41:51 +05:30
Shivam Mathur
eaaab1cec3
Fix oci8 and pdo_oci 2020-10-18 19:33:03 +05:30
Shivam Mathur
853381d0bb
Merge pull request #310 from shivammathur/develop
Switch to apt-get
2020-10-15 14:16:50 +05:30
Shivam Mathur
1394617d60
Switch to apt-get 2020-10-15 14:16:50 +05:30
Shivam Mathur
093498a0a1
Merge pull request #307 from shivammathur/develop
Specify PHP version when installing ast
2020-10-15 14:16:49 +05:30
Shivam Mathur
d2241010ef
Specify PHP version when installing ast 2020-10-15 14:16:48 +05:30
Shivam Mathur
a0f02c17c0
Merge pull request #304 from shivammathur/develop
Hotfix
2020-10-15 14:16:47 +05:30
Shivam Mathur
bb5257e07d
Update Node.js dependencies 2020-10-15 14:16:47 +05:30
Shivam Mathur
f687ff8f21
Fix dependency mess in phalcon4 setup on ubuntu 2020-10-15 14:16:46 +05:30
Shivam Mathur
537c66b2ea
Minor fixes in scripts 2020-10-15 14:16:22 +05:30
Shivam Mathur
073c2e666b
Merge pull request #300 from shivammathur/develop
2.6.0
2020-10-15 14:16:21 +05:30
Shivam Mathur
465e63b28c
Bump version to 2.6.0 2020-10-15 14:16:21 +05:30
Shivam Mathur
b8f0b066dc
Add support for behat and phpspec 2020-10-15 14:16:20 +05:30
Shivam Mathur
9e663851ce
Move matchers setup to scripts 2020-10-15 14:16:19 +05:30
Shivam Mathur
ad196941ed
Refactor install.test.ts 2020-10-15 14:16:19 +05:30
Shivam Mathur
f8e867a9ff
Refactor install.ts 2020-10-15 14:16:18 +05:30
Shivam Mathur
8cb01730c7
Prioritize with over env for inputs 2020-10-15 14:16:17 +05:30
Shivam Mathur
ebba1db2c3
Add alias latest 2020-10-15 14:16:17 +05:30
Shivam Mathur
716331904e
Switch to environment files. Apply GHSA-mfwh-5m23-j46w (CVE-2020-15228) 2020-10-15 14:16:16 +05:30
Shivam Mathur
2ad63ddbd3
Merge pull request #294 from shivammathur/dependabot/npm_and_yarn/actions/core-1.2.6
Bump @actions/core from 1.2.5 to 1.2.6
2020-10-15 14:16:15 +05:30
Shivam Mathur
c4606c9269
Log versions in tools setup 2020-10-15 14:16:15 +05:30
Shivam Mathur
7dcb43c768
Improve problem matchers section in README 2020-10-15 14:16:14 +05:30
dependabot[bot]
691c5309aa
Bump @actions/core from 1.2.5 to 1.2.6
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-15 14:16:13 +05:30
Shivam Mathur
84b222366a
Merge pull request #292 from szepeviktor/patch-1
PHPStan is GH Actions-friendly
2020-10-15 14:16:13 +05:30
Viktor Szépe
b98ed88402
PHPStan is GH Actions-friendly
no need for cs2pr
2020-10-15 14:16:12 +05:30
Shivam Mathur
0ca827ae3b
Merge pull request #283 from shivammathur/develop
2.5.0
2020-10-15 14:16:11 +05:30
Shivam Mathur
16b0a25bf6
Bump version to 2.5.0 2020-10-15 14:16:10 +05:30
Shivam Mathur
fa0af5c382
Update README 2020-10-15 14:16:09 +05:30
Shivam Mathur
db36b200b1
Fix regex in protoc.sh 2020-10-15 14:16:06 +05:30
Shivam Mathur
7cfd76cc1b
Move $arch_name to tools/blackfire.ps1 2020-10-15 14:16:05 +05:30
Shivam Mathur
682b1f5e44
Make sure printf is in PATH in Windows 2020-10-15 14:16:04 +05:30
Shivam Mathur
7b56e4491e
Improving removing extensions for Ubuntu SH runners 2020-09-07 09:36:56 +05:30
Shivam Mathur
acc1fdb337
Add support to configure icu version 2020-09-07 09:36:51 +05:30
Shivam Mathur
e3286d1234
Fix cleanup_lists in linux.sh for old PHP 2020-09-06 19:29:39 +05:30
Shivam Mathur
83019fade2
Merge pull request #279 from mlocati/win32/use-powershell-phpmanager-release-assets
Download release assets for PowerShell PhpManager
2020-09-06 19:29:38 +05:30
Shivam Mathur
83b3d4a8f9
Merge pull request #278 from mlocati/win32/use-powershell-phpmanager-releases
Use releases instead of tags to download PowerShell PhpManager
2020-09-06 19:29:37 +05:30
Michele Locati
56273e234f
Download release assets for PowerShell PhpManager
Downloading such assets is preferable since:
- they contain updated metadata (useful for debugging)
- they contain only the production files
- they are pre-built: GitHub doesn't have to create a ZIP from a tag
2020-09-06 19:29:37 +05:30
Michele Locati
48a00b4d3f
Use releases instead of tags to download PowerShell PhpManager
I just started to publish PhpManager to GitHub Releases too
2020-09-06 19:29:36 +05:30
Shivam Mathur
f641885a8d
Add support for phing 2020-09-06 19:29:35 +05:30
Shivam Mathur
9457ce6e2b
Replace fedora with valid platform name 2020-09-06 19:29:34 +05:30
Shivam Mathur
a31f8b1a2b
Remove unnecessary parameter version from addArchive 2020-09-06 19:29:34 +05:30
Shivam Mathur
ffded4a3e8
Fix support for pecl pdo extensions on Ubuntu 2020-08-21 23:58:53 +05:30
Shivam Mathur
9e6b9d7d70
Merge pull request #274 from shivammathur/develop
2.4.3
2020-08-18 10:12:49 +05:30
Shivam Mathur
7d45057bba
Bump version to 2.4.3 2020-08-18 09:58:32 +05:30
Shivam Mathur
c4fd8b0739
Update README 2020-08-18 09:58:25 +05:30
Shivam Mathur
49088ede98
Fix composer fallback 2020-08-18 09:58:23 +05:30
Shivam Mathur
3543ed1ef8
Switch to fixed getcomposer.org links 2020-08-18 09:58:23 +05:30
Shivam Mathur
9bd0fdbc18
Remove old PHPUnit on linux 2020-08-18 09:58:22 +05:30
Shivam Mathur
c5d29cf8e3
Fix removing extensions on Ubuntu SH runners. (#271) 2020-08-12 17:10:23 +05:30
Shivam Mathur
c5e0997b44
Merge pull request #270 from shivammathur/develop
2.4.2
2020-08-10 19:30:25 +05:30
Shivam Mathur
ee084d3176
Bump version to 2.4.2 2020-08-10 19:30:25 +05:30
Shivam Mathur
c256f0c9cb
Update README 2020-08-10 19:30:19 +05:30
Shivam Mathur
d84365cd03
Add support for oci extensions in PHP 8 on Windows
Fix cache support for oci8 on Windows
2020-08-10 14:08:28 +05:30
Shivam Mathur
3c52e818b1
Add support for cubrid and pdo_cubrid on Ubuntu 2020-08-10 14:08:27 +05:30
Shivam Mathur
188598ef9d
Dry custom tools and extension code 2020-08-10 14:08:27 +05:30
Shivam Mathur
f8b8d766d5
Fix permissions in protoc setup 2020-08-10 14:08:26 +05:30
Shivam Mathur
15a6402865
Change cURL opts 2020-08-10 14:08:20 +05:30
Shivam Mathur
91bd6b26c2
Use cached composer builds 2020-08-04 21:15:25 +05:30
Shivam Mathur
9dae796baf
Merge pull request #263 from shivammathur/develop
2.4.1
2020-08-03 15:35:31 +05:30
Shivam Mathur
6d9aef83a3
Bump version to 2.4.1 2020-08-03 14:49:44 +05:30
Shivam Mathur
bd5a0d94b6
Update README 2020-08-03 11:47:11 +05:30
Shivam Mathur
5405f14867
Move blackfire setup to separate scripts 2020-08-03 11:47:11 +05:30
Shivam Mathur
cb25b9c13a
Add support for protoc and grpc_php_plugin 2020-08-03 11:47:10 +05:30
Shivam Mathur
e63d25d41f
Use blackfire API to get versions 2020-08-03 11:47:09 +05:30
Shivam Mathur
2a7ae24c8e
Dry extension code 2020-08-03 11:47:00 +05:30
Shivam Mathur
e68a74a71c
Limit swoole support to PHP 7.4 2020-08-02 19:09:48 +05:30
Shivam Mathur
67152eb712
Accept PECL default parameters 2020-08-02 19:09:47 +05:30
Shivam Mathur
83bdf158fa
Fix coverage message in node workflow 2020-08-02 19:09:46 +05:30
Shivam Mathur
5e240ab99f
Use shivammathur/php-builder-windows for PHP 8 on Windows (#261) 2020-08-02 19:09:45 +05:30
Shivam Mathur
0fae072f07
Refactor extensions.ts 2020-08-02 19:09:45 +05:30
Shivam Mathur
e0561697dc
Fail fast PCOV on unsupported PHP versions 2020-08-02 19:09:44 +05:30
Shivam Mathur
3aa0f17b55
Remove obsolete pcov.sh 2020-08-02 19:09:43 +05:30
Shivam Mathur
8b218279a3
Improve cURL use 2020-08-02 19:09:29 +05:30
Shivam Mathur
90b6355bf0
Fix updating lists in phalcon setup on Ubuntu 2020-07-24 10:31:35 +05:30
Shivam Mathur
84f23853b7
Use default packagist mirror for old PHP 2020-07-24 10:31:35 +05:30
Shivam Mathur
a4001afbd6
Remove update_extension from linux.sh 2020-07-24 10:31:34 +05:30
Shivam Mathur
cfbb105cb6
Use cached packages to install PHP 2020-07-24 10:31:28 +05:30
Shivam Mathur
c549015370
Fix warning in cleanup_lists on first run on ubuntu-20.04 2020-07-21 18:27:07 +05:30
Shivam Mathur
9e22b87414
Bump supported version in SECURITY.md 2020-07-21 16:12:05 +05:30
Shivam Mathur
7961bc11b1
Merge pull request #260 from shivammathur/develop
2.4.0
2020-07-21 12:17:40 +05:30
Shivam Mathur
87f807365d
Bump version to 2.4.0 2020-07-21 06:29:35 +05:30
Shivam Mathur
25d9bbc737
Update README and licensing information 2020-07-21 06:29:25 +05:30
Shivam Mathur
d2f865c91a
Remove phpbrew config 2020-07-20 00:36:06 +05:30
Shivam Mathur
a13373a271
Merge pull request #259 from localheinz/fix/sort
Fix: Keep extensions and options sorted
2020-07-20 00:33:31 +05:30
Andreas Möller
a764546381
Fix: Keep extensions and options sorted 2020-07-19 20:51:42 +02:00
Shivam Mathur
380b68048b
Merge pull request #258 from localheinz/fix/typo
Fix: Typo
2020-07-20 00:15:05 +05:30
Andreas Möller
4dcf9cd2ab
Fix: Typo 2020-07-19 20:41:16 +02:00
Shivam Mathur
f3641e0c33
Merge pull request #257 from localheinz/feature/composer-unused
Enhancement: Add composer-unused/composer-unused as tool
2020-07-19 17:32:23 +05:30
Shivam Mathur
d35633ec7a
Merge branch 'develop' into feature/composer-unused 2020-07-19 17:32:00 +05:30
Shivam Mathur
7eea3d82f6
Merge pull request #256 from localheinz/fix/sort
Fix: Keep list of tools sorted
2020-07-19 17:25:22 +05:30
Andreas Möller
57ecdba082
Fix: Keep list of tools sorted 2020-07-19 13:32:31 +02:00
Andreas Möller
db03758c66
Enhancement: Add composer-unused/composer-unused as tool 2020-07-19 13:13:08 +02:00
Shivam Mathur
82837572d4
Add ionCube Loader support 2020-07-19 13:53:35 +05:30
Shivam Mathur
8efcf46b31
Add support for oci8 and pdo_oci 2020-07-19 13:53:28 +05:30
Shivam Mathur
4391cf8a4c
Fix warning in add_pdo_extension 2020-07-19 13:53:26 +05:30
Shivam Mathur
87a69f94d9
Merge pull request #255 from localheinz/feature/composer-require-checker
Enhancement: Add maglnet/ComposerRequireChecker as tool
2020-07-19 01:26:18 +05:30
Andreas Möller
c12fad850b
Enhancement: Add maglnet/ComposerRequireChecker as tool 2020-07-19 01:26:18 +05:30
Andreas Möller
47b8d68850
Enhancement: Add ergebnis/composer-normalize as tool 2020-07-18 21:44:21 +05:30
dependabot[bot]
530929f741
Bump lodash from 4.17.15 to 4.17.19
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-18 21:44:19 +05:30
Shivam Mathur
a965723128
Set memory_limit=-1 on Windows and macOS 2020-07-18 06:01:48 +05:30
Shivam Mathur
9845a63f5c
Merge pull request #249 from lolautruche/fix-blackfire
Remove sudo for Blackfire config when it's not needed
2020-07-16 02:28:34 +05:30
Jérôme Vieilledent
4af7e96d03 Remove sudo for Blackfire config when it's not needed 2020-07-15 17:01:29 +02:00
Shivam Mathur
13a3d9d0a9
Fix support for pre-release extensions 2020-07-15 06:24:45 +05:30
Shivam Mathur
9d042b2683
Patch OpenSSL binaries for PHP 5.3 and 5.4 on Windows 2020-07-14 06:27:29 +05:30
Shivam Mathur
7a59874419
Improve updating lists 2020-07-12 05:20:08 +05:30
Shivam Mathur
8dee767b82
Install only cli on linux 2020-07-11 23:00:50 +05:30
Shivam Mathur
5fc5a95363
Fix coverage 2020-07-11 18:35:28 +05:30
Shivam Mathur
8ba779d78e
Merge pull request #244 from GrahamCampbell/patch-1
Fixed Xdebug version for PHP 5.6 and 7.0
2020-07-11 18:28:59 +05:30
Graham Campbell
04376074d2
Update extensions.test.ts 2020-07-11 12:57:07 +01:00
Graham Campbell
262202d43f
Fixed xdebug version for PHP 5.6 and 7.0 2020-07-11 12:43:32 +01:00
Shivam Mathur
f64dddeeb4
Show xdebug.mode=coverage log for Xdebug 3.0 2020-07-08 08:01:26 +05:30
Shivam Mathur
1d50c4a8cd
Set ini values after coverage setup 2020-07-08 07:45:11 +05:30
Shivam Mathur
d313593fee
Bump cache key 2020-07-08 06:44:18 +05:30
Shivam Mathur
5753a00ef5
Improve composer setup 2020-07-08 05:20:52 +05:30
Shivam Mathur
38731c6386
Merge pull request #242 from shivammathur/develop
Remove update_formulae in darwin.sh
2020-07-07 01:05:02 +05:30
Shivam Mathur
9f400a0dfd
Update dependencies 2020-07-07 00:52:10 +05:30
Shivam Mathur
ba020e3463
Remove update_formulae in darwin.sh 2020-07-07 00:33:30 +05:30
Shivam Mathur
c0d425d939
Merge pull request #240 from shivammathur/develop
2.3.2
2020-07-04 02:49:52 +05:30
Shivam Mathur
4752a51595
Bump version to 2.3.2 2020-07-04 00:31:45 +05:30
Shivam Mathur
10608f5908
Add ondrej's PPA on focal (actions/virtual-environments#1104) 2020-07-02 21:29:52 +05:30
Shivam Mathur
d01ec214f2
Use shivammathur/extensions tap for grpc, swoole, protobuf on macos 2020-07-01 13:56:05 +05:30
Shivam Mathur
6158538131
Add support for phplint 2020-06-24 04:30:50 +05:30
Shivam Mathur
dd27d4eb81
Merge pull request #235 from shivammathur/develop
2.3.1
2020-06-22 07:33:24 +05:30
Shivam Mathur
248d04f73c
Bump version to 2.3.1 2020-06-22 07:33:18 +05:30
Shivam Mathur
c5e40d9067
Fix Xdebug coverage 2020-06-22 07:33:17 +05:30
Shivam Mathur
e0ed1ad0ef
Remove --no-suggest flag in examples 2020-06-22 07:33:16 +05:30
Shivam Mathur
2907f8a584
Remove dashes from step ids 2020-06-22 07:33:15 +05:30
Shivam Mathur
52691651dc
Add support for Xdebug3 on stable PHP 2020-06-22 07:33:14 +05:30
Shivam Mathur
b9404683e1
Improve extension support 2020-06-22 07:33:08 +05:30
Shivam Mathur
70954fb6f8
Merge pull request #232 from shivammathur/develop
2.3.0
2020-06-11 16:10:15 +05:30
Shivam Mathur
65e65163cd
Bump version to 2.3.0 2020-06-11 16:10:14 +05:30
Shivam Mathur
41397ce45e
Update docs 2020-06-11 16:10:09 +05:30
Shivam Mathur
c09954033f
Fix exit log on self-hosted 2020-06-09 08:46:21 +05:30
Shivam Mathur
7cec1987ac
Improve setup on self-hosted windows 2020-06-09 08:46:16 +05:30
Shivam Mathur
739e40fb5e
Add support for updating composer 2020-06-05 12:25:02 +05:30
Shivam Mathur
9dec5892e7
Specify runner to the PHP 8.0 script 2020-06-05 12:24:51 +05:30
Shivam Mathur
94616818f0
Fix blackfire-agent setup 2020-06-04 08:40:46 +05:30
Shivam Mathur
4f0d9003dc
Add Ubuntu 20.04 to CI 2020-06-04 08:40:45 +05:30
Shivam Mathur
b2edfc47dd
Move WA for sudo to self_hosted_setup in linux.sh 2020-06-04 08:40:39 +05:30
Shivam Mathur
6bd872ad2c
Fix composer peer fingerprint error for old PHP 2020-06-03 01:56:43 +05:30
Shivam Mathur
03eb8cc744
Update actions/cache uses to v2 2020-06-03 01:56:43 +05:30
Shivam Mathur
9687dd1d8a
Fetch scripts for old PHP and nightly 2020-06-03 01:56:42 +05:30
Shivam Mathur
2df0d2b443
Refactor scripts and improve comments 2020-06-03 01:56:37 +05:30
Shivam Mathur
0e56c0b653
Add WA for setrlimit warning with sudo in focal 2020-05-27 09:29:35 +05:30
Shivam Mathur
0469a6f681
Fix setup on self-hosted linux 2020-05-27 08:57:17 +05:30
Shivam Mathur
325413a824
Use Invoke-RestMethod to get tag 2020-05-27 08:02:21 +05:30
Shivam Mathur
b84dd3ce25
Remove empty line in logs 2020-05-26 06:41:18 +05:30
Shivam Mathur
190220c10d
Create ini file using tee instead of touch 2020-05-22 15:46:30 +05:30
Shivam Mathur
4fb049a68b
Merge pull request #225 from shivammathur/develop
2.2.2
2020-05-22 03:46:01 +05:30
Shivam Mathur
3e0678b50f
Bump version to 2.2.2 2020-05-22 02:50:45 +05:30
Shivam Mathur
5b06192e7c
Improve install.ts tests 2020-05-22 02:50:38 +05:30
Shivam Mathur
b419442896
Remove extra newline 2020-05-21 23:33:27 +05:30
Shivam Mathur
49b8b7e301
Update README 2020-05-21 20:43:35 +05:30
Shivam Mathur
b1776b79c8
Add support for phan/phan 2020-05-21 11:28:38 +05:30
Shivam Mathur
a48ff666f8
Bump version to 2.2.1 2020-05-19 01:18:32 +05:30
Shivam Mathur
3bffbad95a
Update libs for PHP 8.0 on self-hosted runners 2020-05-18 23:50:49 +05:30
Shivam Mathur
18041fdab5
Setup libwebp-dev with PHP8 on linux 2020-05-18 22:44:26 +05:30
Shivam Mathur
b36d2222e6
Update PPA before phalcon setup 2020-05-18 17:55:48 +05:30
Shivam Mathur
50ffa593bb
Update PPA in add_devtools in linux.sh 2020-05-18 17:25:38 +05:30
Shivam Mathur
6cbc46fdb6
Fix sqlite logs 2020-05-17 11:37:27 +05:30
Shivam Mathur
08c60fceea
Fix to use correct $php_dir 2020-05-17 04:16:39 +05:30
Shivam Mathur
c30a9630bb
Housekeeping 2020-05-16 11:28:01 +05:30
Shivam Mathur
0158fe2782
Fix enabling pdo extension 2020-05-16 00:04:19 +05:30
Shivam Mathur
3a8557bcc6
Merge pull request #219 from shivammathur/develop
2.2.0
2020-05-13 23:15:10 +05:30
Shivam Mathur
d10d1e249b
Bump version to 2.2.0 2020-05-13 07:12:42 +05:30
Shivam Mathur
3ec1728de8
Update README 2020-05-13 05:39:40 +05:30
Shivam Mathur
9c266d4158
Fix username hardcode in composer PATH 2020-05-12 19:32:10 +05:30
Shivam Mathur
0135ee2ed1
Fix support for phalcon and gearman 2020-05-12 19:32:07 +05:30
Shivam Mathur
5c2618165a
Fetch blackfire latest versions 2020-05-12 19:32:03 +05:30
Shivam Mathur
8123132b99
Add support for removing extensions 2020-05-12 19:32:01 +05:30
Shivam Mathur
f5863fd356
Add support for vapor-cli and infection tools 2020-05-12 19:31:58 +05:30
Shivam Mathur
cf0fdf35f2
Add composer global bin directory to PATH 2020-05-12 19:31:53 +05:30
Shivam Mathur
8830cdd08c
Add support for self-hosted darwin runners 2020-05-12 19:31:50 +05:30
Shivam Mathur
4960e3179f
Add support for self-hosted windows runners 2020-05-12 19:31:39 +05:30
Shivam Mathur
0f3f604249
Add support for self-hosted ubuntu runners 2020-05-10 04:40:21 +05:30
Shivam Mathur
5915f05b06
Suppress php-config error 2020-05-05 15:26:16 +05:30
Shivam Mathur
dccdb5ab67
Fix loading PECL extensions 2020-05-05 14:44:56 +05:30
Shivam Mathur
9a01fd28ca
Fix icu4c version for PHP 5.6 and PHP 7.0 on darwin 2020-04-30 17:02:17 +05:30
Shivam Mathur
d5cd6a4bd1
Fix libzip-dev error in PHP 8.0 on ubuntu 2020-04-30 07:31:41 +05:30
Shivam Mathur
006301e81d
Fetch formulae before setup 2020-04-23 16:29:33 +05:30
Shivam Mathur
4a38014043
Merge pull request #212 from shivammathur/develop
2.1.4
2020-04-09 23:54:04 +05:30
Shivam Mathur
a0ac655b06
Bump version to 2.1.4 2020-04-09 23:19:56 +05:30
Shivam Mathur
41e56c42c7
Update README 2020-04-09 23:19:55 +05:30
Shivam Mathur
4e8a0cfe8b
Update workflow 2020-04-09 21:58:34 +05:30
Shivam Mathur
ee72f2f8ad
Recompile PCOV for PHP8.0 2020-04-09 21:48:22 +05:30
Shivam Mathur
ed557fd2c3
Add support for ast and uopz ubuntu packages 2020-03-30 13:50:20 +05:30
Shivam Mathur
d90cd153ee
Refactor PHP setup on linux 2020-03-28 12:49:55 +05:30
Shivam Mathur
3376371dd8
Bump minimum Xdebug version 2020-03-28 09:42:02 +05:30
Shivam Mathur
a2b261d79a
Add support to configure GitHub OAuth token in composer 2020-03-25 07:44:38 +05:30
Shivam Mathur
6c93dbd391
cleanup 2020-03-25 07:31:36 +05:30
Shivam Mathur
f58dc6eca1
Update all lists 2020-03-20 19:09:27 +05:30
Shivam Mathur
5326f2302f
Merge pull request #203 from shivammathur/develop
2.1.3
2020-03-18 16:26:15 +05:30
Shivam Mathur
b9a78a31fb
Bump version to 2.1.3 2020-03-18 16:26:11 +05:30
Shivam Mathur
ba69b25cab
Install PhpManager from GitHub repo 2020-03-18 16:26:01 +05:30
Shivam Mathur
a6533acdd4
Update FUNDING.yml 2020-03-18 13:09:15 +05:30
Shivam Mathur
d3b37e3d0d
Add SECURITY.md 2020-03-18 13:09:07 +05:30
Shivam Mathur
f3a1262ff6
Fix db extensions 2020-03-16 08:13:25 +05:30
Shivam Mathur
933abd531a
Merge pull request #201 from shivammathur/develop
2.1.2
2020-03-14 15:29:33 +05:30
Shivam Mathur
67ed7f234b
Bump version to 2.1.2 2020-03-14 15:04:10 +05:30
Shivam Mathur
f90accffb3
Change case in README 2020-03-14 14:58:34 +05:30
dependabot-preview[bot]
93441b70bf
[Security] Bump acorn from 6.4.0 to 6.4.1
Bumps [acorn](https://github.com/acornjs/acorn) from 6.4.0 to 6.4.1. **This update includes a security fix.**
- [Release notes](https://github.com/acornjs/acorn/releases)
- [Commits](https://github.com/acornjs/acorn/compare/6.4.0...6.4.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-03-14 14:58:18 +05:30
Shivam Mathur
67f23b6380
Improve code quality 2020-03-14 14:57:21 +05:30
Shivam Mathur
2937ad6e7a
Improve extension support 2020-03-14 14:55:28 +05:30
Shivam Mathur
a5e5d07fcb
Merge pull request #199 from shivammathur/develop
2.1.1
2020-03-14 14:48:42 +05:30
Shivam Mathur
30d8b321f4
Bump version to 2.1.1 2020-03-14 14:48:27 +05:30
Shivam Mathur
405e57e429
Switch to macports based builds for old PHP on darwin 2020-03-08 08:10:10 +05:30
Shivam Mathur
58f376b118
Fix caching PDO extensions on linux 2020-03-07 17:00:39 +05:30
Shivam Mathur
b7d68d8225
Merge pull request #196 from shivammathur/develop
Hotfix 2.1.0
2020-03-02 20:11:17 +05:30
Shivam Mathur
9252820289
Fix logs of blackfire setup 2020-03-02 19:56:53 +05:30
Shivam Mathur
a5cc9fab25
Merge pull request #195 from shivammathur/develop
2.1.0
2020-02-29 22:30:50 +05:30
Shivam Mathur
4e5685a75d
Bump version to 2.1.0 2020-02-29 21:38:22 +05:30
Shivam Mathur
d475227ba5
Improve README 2020-02-29 21:38:22 +05:30
Shivam Mathur
38cb8b924d
Use shivammathur/php5-darwin for PHP5 on darwin 2020-02-29 01:17:20 +05:30
Shivam Mathur
fdd83e94df
Update tools in README 2020-02-29 00:26:00 +05:30
Shivam Mathur
ad112b7981
Fix support for symfony/flex 2020-02-28 16:51:00 +05:30
Shivam Mathur
2b0d6e221f
Improve blackfire examples 2020-02-28 15:42:17 +05:30
Shivam Mathur
acee5b203f
Add support for blackfire client, agent and player 2020-02-28 14:43:57 +05:30
Shivam Mathur
84e88e382f
Fix and refactor ext-blackfire 2020-02-27 19:27:11 +05:30
Shivam Mathur
bbdc4e3b67
Merge pull request #193 from jaapio/feature/ext-blackfire
🎉 Add blackfire extenstion
2020-02-27 15:50:29 +05:30
Jaapio
311eb9f3ba
Add example 2020-02-27 11:12:57 +01:00
Jaapio
3dfd7a648b
Add blackfire support on windows 2020-02-27 11:12:56 +01:00
Jaapio
943f491830
Add blackfire on OSX 2020-02-27 11:12:52 +01:00
Jaapio
dc9461a053
Add blackfire to linux install
Add logging about install process

Fix formating of semversion blackfire

Only add version when needed

Pass phpversion
2020-02-27 10:38:52 +01:00
Shivam Mathur
f2720d7b82
Update examples to start mysql service 2020-02-26 22:15:27 +05:30
Shivam Mathur
99161b7790
Add perimission for composer self-update 2020-02-25 23:01:49 +05:30
Shivam Mathur
5de6285e1f
Fix composer version 2020-02-25 22:05:48 +05:30
Shivam Mathur
14d702e830
Fix test name 2020-02-25 17:58:15 +05:30
Shivam Mathur
9539b27b4a
Add symfony/flex to supported tools 2020-02-25 10:00:07 +05:30
Shivam Mathur
a4f7326577
Move dependency setup to cache-extensions 2020-02-25 09:38:53 +05:30
Shivam Mathur
9b297384e1
Fix versioned extensions 2020-02-24 21:14:54 +05:30
Shivam Mathur
9d77946f60
Switch to liip for old PHP on darwin 2020-02-24 20:24:08 +05:30
Shivam Mathur
6d21e6dc05
Revert instllaing libicu64 2020-02-23 01:46:35 +05:30
Shivam Mathur
68c827cfcf
Fix wp-cli support 2020-02-23 01:19:07 +05:30
Geoff Taylor
d95ca49e8d
WP-CLI tool support added 2020-02-23 01:18:24 +05:30
Shivam Mathur
03fd0b8719
Merge pull request #190 from shivammathur/develop
Hotfix: Force install libicu64 for PHP 8.0
2020-02-23 00:43:53 +05:30
Shivam Mathur
ebe1c12c21
Hotfix: Force install libicu64 for PHP 8.0 2020-02-23 00:28:35 +05:30
Shivam Mathur
b46021d870
Merge pull request #186 from shivammathur/develop
Update ppa before installing PHP
2020-02-22 00:30:07 +05:30
Shivam Mathur
64ba54fc1b
Hotfix: Force update ppa 2020-02-22 00:16:22 +05:30
Shivam Mathur
71571f685a
Merge pull request #185 from shivammathur/develop
2.0.2
2020-02-21 14:19:53 +05:30
Shivam Mathur
10f86cb1a1
Bump version to 2.0.2 2020-02-21 14:06:08 +05:30
Shivam Mathur
0f694c5087
Update README 2020-02-21 14:06:08 +05:30
Shivam Mathur
9dfebd1adb
Refactor scripts 2020-02-21 11:33:58 +05:30
Shivam Mathur
3781acab4b
Fix link in README 2020-02-20 04:15:24 +05:30
Shivam Mathur
cdfbf6d0f0
Merge pull request #184 from shivammathur/develop
2.0.1
2020-02-19 09:08:04 +05:30
Shivam Mathur
0ccb02802f
Bump version to 2.0.1 2020-02-19 08:50:15 +05:30
Shivam Mathur
a4572586dc
Fix linux.sh 2020-02-19 07:22:01 +05:30
Shivam Mathur
cb3c752d1f
Remove update input, it is env 2020-02-17 15:50:44 +05:30
Shivam Mathur
383a511d0e
Merge pull request #177 from shivammathur/develop
2.0.0
2020-02-17 04:40:05 +05:30
Shivam Mathur
cc55dbcaa8
Remove support for deprecated inputs 2020-02-17 02:35:18 +05:30
Shivam Mathur
e644692ccf
Update test workflow 2020-02-17 01:15:15 +05:30
Shivam Mathur
96d5358317
Bump version to 2.0.0 2020-02-17 01:14:18 +05:30
Shivam Mathur
3a473c9a22
Add support for unstable versions 2020-02-16 07:04:15 +05:30
Shivam Mathur
40944de129
Fix phalcon caching on darwin 2020-02-15 23:46:26 +05:30
Shivam Mathur
f9202d6b64
Support existing PHP on darwin 2020-02-14 16:52:33 +05:30
Shivam Mathur
d99c8732ba
Fix extension_version on windows 2020-02-14 15:48:43 +05:30
Shivam Mathur
2c559eae3d
Update documentation for v2 2020-02-14 13:35:04 +05:30
Shivam Mathur
3a2ca44a8a
Add problem matcher for PHP native errors 2020-02-14 12:55:54 +05:30
Shivam Mathur
17241e2689
Add support for update and extension versions 2020-02-14 12:55:04 +05:30
Shivam Mathur
ca33d01e9f
Add support for old PHP versions on linux 2020-02-13 10:31:48 +05:30
Shivam Mathur
3c6644f237
Add support for old PHP versions on windows 2020-02-06 05:54:20 +05:30
Shivam Mathur
326dfd1e76
Add support for old PHP versions on darwin 2020-02-06 05:53:28 +05:30
Shivam Mathur
d9cf6f5ad6
Merge pull request #173 from shivammathur/develop
1.8.2
2020-02-03 04:26:49 +05:30
Shivam Mathur
ea50c7c0a2
Bump version to 1.8.2 2020-02-03 04:07:28 +05:30
Shivam Mathur
6ca549dcaa
Update readme 2020-02-03 03:48:07 +05:30
Shivam Mathur
d3760be2cc
Add support for cs2pr and refactor tools code 2020-02-03 02:28:00 +05:30
Shivam Mathur
3454287b87
Improve phalcon scripts 2020-02-02 18:29:12 +05:30
Shivam Mathur
88c7757dc8
Add dependencies when enabling extensions in linux 2020-02-02 12:58:32 +05:30
Shivam Mathur
48cfea3f3e
Add script to help cache extensions 2020-02-02 04:30:01 +05:30
Shivam Mathur
43cfa2b1a8
Refactor scripts 2020-02-02 03:26:15 +05:30
Shivam Mathur
76cecacc5e
Merge pull request #168 from shivammathur/develop
1.8.1
2020-01-27 22:39:10 +05:30
Shivam Mathur
d6e173ffc6
Fix pecl command in linux 2020-01-27 21:32:49 +05:30
Shivam Mathur
26701f2ec8
Bump version to 1.8.1 2020-01-27 21:24:08 +05:30
Shivam Mathur
e934fe28b8
Fix PECL config 2020-01-27 21:09:51 +05:30
Shivam Mathur
d384d9fe7e
Merge pull request #167 from shivammathur/develop
1.8.0
2020-01-26 18:21:58 +05:30
Shivam Mathur
4eeaf5f99e
Handle extensions input typo 2020-01-26 18:05:27 +05:30
Shivam Mathur
fd2392db56
Fix check for testing tools setup 2020-01-26 17:21:04 +05:30
Shivam Mathur
494dde7189
Bump version to 1.8.0 2020-01-26 16:25:58 +05:30
Shivam Mathur
706dfca1e6
Add lint to pre-commit hook 2020-01-26 16:21:25 +05:30
Shivam Mathur
d613c975f6
Fix lowercasing of coverage driver 2020-01-26 16:15:39 +05:30
Shivam Mathur
fbe1419ce4
Update Readme for 1.8.0 2020-01-26 16:04:18 +05:30
Shivam Mathur
c844c7b6e4
Add support for symfony in tools input 2020-01-26 12:06:55 +05:30
Shivam Mathur
8e5cc09df9
Fix PHPUnit problem matchers 2020-01-26 04:59:20 +05:30
Shivam Mathur
f4f8aec1f2
Fix php.ini permissions after extension setup 2020-01-26 03:23:41 +05:30
Shivam Mathur
b44b7344e0
Add support for pre-release pecl extensions 2020-01-26 02:27:40 +05:30
Shivam Mathur
e01b2f0bf7
Merge pull request #157 from shivammathur/develop
Fix description in actions.yml
2020-01-22 02:20:27 +05:30
Shivam Mathur
f7f8ecb931
Fix description in actions.yml 2020-01-22 01:54:16 +05:30
Shivam Mathur
4f0d810cbc
Merge pull request #156 from shivammathur/develop
1.7.4
2020-01-22 01:48:36 +05:30
Shivam Mathur
47335179aa
Bump version to 1.7.4 2020-01-22 01:13:19 +05:30
Shivam Mathur
63c4aea452
Refactor scripts to enable pre-existing ext-phalcon 2020-01-21 19:53:17 +05:30
Shivam Mathur
898b6fa1f9
macOS-latest -> macos-latest 2020-01-21 08:25:14 +05:30
Shivam Mathur
747c8838bc
Add phive and ts support to readme 2020-01-21 08:24:33 +05:30
Shivam Mathur
9d6b61c5af
Add support for phive 2020-01-21 07:21:36 +05:30
Shivam Mathur
5108c81610
Add support for ext-imagick on darwin 2020-01-21 01:06:31 +05:30
Shivam Mathur
e58c704985
Use ppa:ondrej/php for phalcon4 on PHP7.4 2020-01-21 00:50:38 +05:30
Shivam Mathur
e9c783eef0
Add support for specifying nts/ts builds on windows 2020-01-21 00:44:53 +05:30
Shivam Mathur
b44e5e009f
Use ppa:ondrej/php for phalcon except for PHP7.4 2020-01-20 21:07:51 +05:30
Shivam Mathur
8489dbf4de
Merge pull request #152 from shivammathur/develop
1.7.3
2020-01-17 17:16:16 +05:30
Shivam Mathur
f23ae2e6f7
Fix xdebug and phalcon logs on linux 2020-01-17 16:53:12 +05:30
Shivam Mathur
d2b233e45f
Bump version to 1.7.3 2020-01-17 13:45:04 +05:30
Shivam Mathur
320474a245
Add support for phpize and php-config 2020-01-17 13:21:39 +05:30
Shivam Mathur
65ccfb36dc
Fix extensions.ts 2020-01-17 06:07:33 +05:30
Shivam Mathur
88fb99b592
Fix logs on windows for pre-installed version 2020-01-16 10:16:44 +05:30
Shivam Mathur
9e7bc5c91f
Fix phalcon.ps1 2020-01-16 09:23:04 +05:30
Shivam Mathur
ca2f547a35
Fix log for composer on darwin 2020-01-16 09:06:55 +05:30
Shivam Mathur
9f21c80d24
Install phalcon v4 from PECL on windows 2020-01-16 09:04:43 +05:30
Shivam Mathur
c4317135df
Disable composer process-timeout 2020-01-14 12:06:52 +05:30
Shivam Mathur
a2dd688679
Improve test workflows 2020-01-14 11:42:08 +05:30
Shivam Mathur
bd214a2dca
Update old Xdebug version for coverage: xdebug 2020-01-14 11:02:17 +05:30
Shivam Mathur
2ee4653d1c
Merge pull request #145 from shivammathur/develop
Improve remove_extensions in linux
2020-01-10 07:10:05 +05:30
Shivam Mathur
0b3e0f451d
Bump version to 1.7.2 2020-01-10 06:50:19 +05:30
Shivam Mathur
0bfa897634
Improve remove_extensions in linux 2020-01-10 06:30:41 +05:30
Shivam Mathur
71db1e2cf1
Merge pull request #144 from shivammathur/develop
1.7.1
2020-01-09 03:56:18 +05:30
Shivam Mathur
16d1cd4766
Sort tools in README 2020-01-09 03:45:19 +05:30
Shivam Mathur
1193cd100b
Bump version to 1.7.1 2020-01-09 03:28:45 +05:30
Shivam Mathur
e839a77d8c
Update default packages in linux 2020-01-08 22:07:21 +05:30
Shivam Mathur
552df3f2b0
Add CakePHP examples with services 2020-01-08 12:58:21 +05:30
Shivam Mathur
3109c941eb
Update examples 2020-01-08 11:35:32 +05:30
Shivam Mathur
aa8706a5bf
Update warnings in actions.yml 2020-01-08 11:12:36 +05:30
Shivam Mathur
9afdee42e8
Add support to specify version of tools 2020-01-08 10:45:30 +05:30
Shivam Mathur
aa0e9403d8
Merge pull request #138 from PrisisForks/feature/automatic-composer-prefetcher
narrowspark/automatic-composer-prefetcher as a alternative to prestissimo
2020-01-04 13:04:02 +05:30
Daniel Bannert
5b00f068f3 feat : narrowspark/automatic-composer-prefetcher as a alternative to prestissimo 2020-01-04 07:39:39 +01:00
Shivam Mathur
8f39d3eddd
Add CakePHP example 2020-01-03 08:25:42 +05:30
Shivam Mathur
9d87d1fd14
Update LICENSE 2020-01-01 22:38:51 +05:30
Shivam Mathur
07ae2343d0
Update actions/checkout to v2 2020-01-01 22:36:25 +05:30
Shivam Mathur
7b8bf7af6a
Merge pull request #134 from shivammathur/develop
1.7.0 Hotfix
2020-01-01 16:22:07 +05:30
Shivam Mathur
0ac6f76d36
Fix setup order 2020-01-01 16:05:01 +05:30
Shivam Mathur
6c6203b683
Improve ext-phalcon linux script and readme 2019-12-31 13:47:06 +05:30
Shivam Mathur
0c9f8a8e7e
Merge pull request #133 from shivammathur/develop
1.7.0
2019-12-31 06:54:06 +05:30
Shivam Mathur
1705daea72
Bump version to 1.7.0 2019-12-31 06:30:11 +05:30
Shivam Mathur
58fbc33c3a
Use tap shivammathur/homebrew-phalcon on darwin 2019-12-31 05:49:48 +05:30
Shivam Mathur
3f42b7d5fb
Link tools installed using composer 2019-12-31 05:20:47 +05:30
Shivam Mathur
dd4f0db7bf
Update to latest version on windows. Fixes #132 2019-12-29 00:38:06 +05:30
Shivam Mathur
7d026bfa6b
Update symfony examples 2019-12-28 02:18:01 +05:30
Shivam Mathur
6a70f864ec
Improve tools support 2019-12-28 01:03:57 +05:30
Shivam Mathur
8e1cde2d0a
Improve examples and documentation 2019-12-28 00:23:51 +05:30
Shivam Mathur
de32d8b95f
Add tools support 2019-12-27 13:11:17 +05:30
Shivam Mathur
273096b82f
Refactor coverage and extension code 2019-12-26 20:21:39 +05:30
Shivam Mathur
4c045616f4
Improve support for ext-phalcon and refactor extensions.ts 2019-12-25 03:47:26 +05:30
Shivam Mathur
935e74fb40
Refactor scripts and fix reading php-version 2019-12-22 10:19:53 +05:30
Shivam Mathur
a507be73b5
Merge pull request #127 from shivammathur/develop
Hotfix to support phalcon after v4 release
2019-12-22 10:02:11 +05:30
Shivam Mathur
673dcaff6d
Hotfix after phalcon4 release 2019-12-22 09:30:28 +05:30
Ruud Boon
2cbfd4fb41
Update extensions.ts
Phalcon 4.0.0 is released and now in the master.
2019-12-22 07:47:17 +05:30
Shivam Mathur
0969980399
Merge pull request #125 from shivammathur/develop
Remove coverage drivers completely if requested
2019-12-20 15:04:11 +05:30
Shivam Mathur
1fa2905bc6
Remove coverage drivers completely if requested 2019-12-20 14:32:47 +05:30
Shivam Mathur
790a48c30d
Merge pull request #124 from shivammathur/develop
1.6.2
2019-12-20 11:29:34 +05:30
Shivam Mathur
4b69160eff
Merge pull request #122 from svenluijten/patch-1
Fix year in comment above deprecated options
2019-12-19 15:55:35 +05:30
Sven Luijten
7f805f22af
Fix year in comment above deprecated options 2019-12-19 10:40:58 +01:00
Shivam Mathur
f2972dcf18
Fix enabling zend extensions 2019-12-19 11:33:35 +05:30
Shivam Mathur
2d488f53fd
Bump version to 1.6.2 2019-12-19 10:45:29 +05:30
Shivam Mathur
421187c870
Fix experimental workflow 2019-12-19 10:45:08 +05:30
Shivam Mathur
1798f4d615
Fix matchers and add tests 2019-12-19 10:44:43 +05:30
Shivam Mathur
8039546df3
Merge pull request #84 from decnorton/develop
Add problem matcher for PHPUnit
2019-12-19 02:18:02 +05:30
Shivam Mathur
c6ad3d1a70
Add 8.0 support on windows 2019-12-19 00:23:32 +05:30
Shivam Mathur
922f1e27b8
Set ProgressPreference to Silent in win32.ps1 2019-12-18 18:52:46 +05:30
Shivam Mathur
2d3750b36e
Install 64bit version of PHP on windows 2019-12-18 18:42:55 +05:30
Shivam Mathur
51c7527bd8
Merge pull request #121 from shivammathur/develop
Fix add_extension on linux and macOS
2019-12-17 04:28:05 +05:30
Shivam Mathur
2bf7ab0207
Fix add_extension on linux and macOS 2019-12-16 19:40:50 +05:30
Shivam Mathur
b3a84fc51e
Merge pull request #119 from shivammathur/develop
1.6.1
2019-12-15 02:28:01 +05:30
Shivam Mathur
1330950cd5
Bump version to 1.6.1 2019-12-15 02:09:03 +05:30
Shivam Mathur
afb57fca4e
Merge pull request #118 from svenluijten/patch-1
Fix typo in available options
2019-12-15 01:27:07 +05:30
Sven Luijten
50344f4883
Fix typo in available options
`extension` should actually be `extensions`.
2019-12-14 14:53:04 +01:00
Shivam Mathur
2b027bd9bc
Fix reading unquoted versions 2019-12-14 10:13:01 +05:30
Shivam Mathur
8f8207a1ca
Add support for ext-gearman. Closes #116 2019-12-14 09:21:11 +05:30
Shivam Mathur
87e6c70743
Update PEAR channel after installation 2019-12-10 05:34:26 +05:30
Shivam Mathur
e3d18718a9
Update dependencies 2019-12-10 05:22:33 +05:30
Shivam Mathur
cfa7bc51cd
Merge pull request #106 from shivammathur/develop
Fix coverage log for Xdebug on PHP 8.0
2019-12-09 15:30:42 +05:30
Shivam Mathur
ade633f0da
Fix coverage log for Xdebug on PHP 8.0 2019-12-09 14:58:42 +05:30
Shivam Mathur
2cabcf2941
Merge pull request #105 from shivammathur/develop
1.6.0
2019-12-09 14:00:34 +05:30
Shivam Mathur
9ce4bd6f1b
Fix logs on linux 2019-12-09 13:17:02 +05:30
Shivam Mathur
190ae49ac1
Improve README 2019-12-09 12:45:26 +05:30
Shivam Mathur
032bc86056
Fix actions.yml 2019-12-09 12:32:55 +05:30
Shivam Mathur
704c5180a4
Update examples 2019-12-09 12:20:03 +05:30
Shivam Mathur
e4fc767f9c
Deprecate extension-csv and ini-values-csv inputs 2019-12-09 11:14:07 +05:30
Shivam Mathur
1cf6a369bb
Add support for PHP 8.0.0-dev #104 2019-12-09 10:31:11 +05:30
Dec Norton
03f36220f4 Add PHPUnit problem matcher 2019-11-24 16:35:21 +00:00
156 changed files with 19450 additions and 9531 deletions

View File

@ -1,23 +0,0 @@
{
"env": { "node": true, "jest": true },
"parser": "@typescript-eslint/parser",
"parserOptions": { "ecmaVersion": 2020, "sourceType": "module" },
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"plugin:prettier/recommended",
"prettier/@typescript-eslint"
],
"plugins": ["@typescript-eslint", "jest"],
"rules": {
"camelcase": "off",
"require-atomic-updates": "off",
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-unused-vars": "off"
}
}

View File

@ -1,63 +1,83 @@
# Contributing to setup-php # Contributing to setup-php
## Welcome!
We look forward to your contributions! Here are some examples how you can contribute:
* [Ask any questions you may have](https://github.com/shivammathur/setup-php/discussions/new?category=Q-A-Help)
* [Report a bug](https://github.com/shivammathur/setup-php/issues/new?labels=type/bug&template=bug.md)
* [Propose a new feature](https://github.com/shivammathur/setup-php/issues/new?labels=enhancement&template=feature.md)
* [Send a pull request](https://github.com/shivammathur/setup-php/pulls)
## Contributor Code of Conduct ## Contributor Code of Conduct
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms. Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
## Workflow ## Getting Started
* Fork the project. To get started fork `setup-php` and clone it using git:
```bash
git clone https://github.com/<your-username>/setup-php.git
cd setup-php
```
If you are using `Windows` configure `git` to handle line endings.
```cmd
git config --local core.autocrlf true
```
Install `setup-php` dependencies using [npm](https://www.npmjs.com/):
```bash
npm install
```
## Workflow to create Pull Requests
* Fork the `setup-php` project and clone it.
* Create a new branch from the develop branch.
* Make your bug fix or feature addition. * Make your bug fix or feature addition.
* Add tests for it. This is important so we don't break it in a future version unintentionally. * Add tests for it, so we don't break it in a future version unintentionally.
* Send a pull request to the develop branch. * Ensure the test suite passes and the code complies with our coding guidelines (see below).
* Send a pull request to the develop branch with all the details.
* If possible, create a GitHub Actions workflow with an integration test for the change in a demo repository and link it in your pull request.
Please make sure that you have [set up your user name and email address](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) for use with Git. Strings such as `silly nick name <root@localhost>` look really stupid in the commit history of a project. Please make sure that you have [set up your user name and email address](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) for use with Git. Strings such as `silly nick name <root@localhost>` look really stupid in the commit history of a project.
Due to time constraints, you may not always get a quick response. Please do not take delays personal and feel free to remind. Due to time constraints, you may not always get a quick response. Please do not take delays personally and feel free to remind.
## Coding Guidelines ## Coding Guidelines
This project comes with `.prettierrc.json` and `eslintrc.json` configuration files. Please run the following commands to format the code before committing it. This project comes with `.prettierrc.json` and `eslintrc.json` configuration files. Please run the following commands to fix and verify the code quality.
```bash ```bash
$ npm run format npm run format
$ npm run lint npm run lint
``` ```
## Using setup-php from a Git checkout ### Running the test suite
The following commands can be used to perform the initial checkout of setup-php:
```bash
$ git clone https://github.com/shivammathur/setup-php.git
$ cd setup-php
```
Install setup-php dependencies using [npm](https://www.npmjs.com/):
```bash
$ npm install
```
## Running the test suite
After following the steps shown above, The `setup-php` tests in the `__tests__` directory can be run using this command: After following the steps shown above, The `setup-php` tests in the `__tests__` directory can be run using this command:
```bash ```bash
$ npm test npm test
``` ```
## Creating a release ### Creating a release
Create a release before you push your changes. Creating a release means compiling all the TypeScript code to a single file which `setup-php` can run. Run this, before you push your changes.
```bash ```bash
$ npm run release npm run build
npm run release
``` ```
## Reporting issues ### Reporting issues and discussions
Please submit the issue using the appropriate template provided for a bug report or a feature request: For questions or support, we prefer GitHub Discussions. For any bugs or new features you can create an issue using the appropriate template:
* [Issues](https://github.com/shivammathur/setup-php/issues) * [Discussions](https://github.com/shivammathur/setup-php/discussions)
* [Issues](https://github.com/shivammathur/setup-php/issues)

5
.github/FUNDING.yml vendored
View File

@ -1,8 +1,3 @@
# These are supported funding model platforms # These are supported funding model platforms
github: shivammathur github: shivammathur
community_bridge: setup-php
issuehunt: shivammathur
patreon: shivammathur
liberapay: shivammathur
custom: https://www.paypal.me/shivammathur

94
.github/ISSUE_TEMPLATE/bug.yml vendored Normal file
View File

@ -0,0 +1,94 @@
name: Bug report
description: Nice, you found a bug!
title: "Bug: "
labels: ["bug"]
assignees: ["shivammathur"]
body:
- type: markdown
attributes:
value: "Please fill out the sections below to help us address your issue."
- type: textarea
id: bug-description
attributes:
label: "Describe the bug"
placeholder: "Please describe the bug concisely."
validations:
required: true
- type: checkboxes
id: version
attributes:
label: "Version"
description: "I have checked releases, and the bug exists in the latest patch version of `v1` or `v2`."
options:
- label: "v2"
- label: "v1"
validations:
required: true
- type: dropdown
id: runners
attributes:
label: "Runners"
description: "Please choose the GitHub Action runner your workflow uses."
options:
- "GitHub Hosted"
- "Self Hosted"
validations:
required: true
- type: textarea
id: operating-systems
attributes:
label: "Operating systems"
placeholder: "e.g., Ubuntu 22.04, Windows Server 2022, etc."
validations:
required: true
- type: textarea
id: php-versions
attributes:
label: "PHP versions"
placeholder: "e.g., PHP 7.4, PHP 8.0, etc."
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: "To Reproduce"
placeholder: "Please provide the relevant steps of your workflow `.yml` file."
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: "Expected behavior"
placeholder: "A clear and concise description of what you expected to happen."
validations:
required: true
- type: textarea
id: screenshots-logs
attributes:
label: "Screenshots/Logs"
placeholder: "Drag and drop images or paste logs here..."
- type: textarea
id: additional-context
attributes:
label: "Additional context"
placeholder: "Add any other context about the problem here."
- type: dropdown
id: willing-to-submit-pr
attributes:
label: "Are you willing to submit a PR?"
description: "We accept pull requests targeting the develop branch."
options:
- "Yes"
- "No"
validations:
required: true

View File

@ -1,23 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Please provide the GitHub Action `.yml` file.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.

58
.github/ISSUE_TEMPLATE/feature.yml vendored Normal file
View File

@ -0,0 +1,58 @@
name: Feature request
description: Suggest a new feature
title: "Feature: "
labels: ["enhancement"]
assignees: ["shivammathur"]
body:
- type: markdown
attributes:
value: "Please fill out the sections below to help us understand your new feature proposal."
- type: textarea
id: feature-description
attributes:
label: "Describe the feature"
placeholder: "A clear and concise description of what you want and why."
validations:
required: true
- type: checkboxes
id: version-check
attributes:
label: "Please check the latest release"
options:
- label: "I have checked releases, and the feature is missing in the latest patch version of `v2`."
required: true
- type: textarea
id: underlying-issue
attributes:
label: "Underlying issue"
placeholder: "Please describe the issue this would solve."
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: "Describe alternatives"
placeholder: "Please mention any alternative solutions you've considered."
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: "Additional context"
placeholder: "Drag and drop images or paste any additional information here..."
- type: dropdown
id: willing-to-submit-pr
attributes:
label: "Are you willing to submit a PR?"
description: "We accept pull requests targeting the develop branch."
options:
- "Yes"
- "No"
validations:
required: true

View File

@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I want to improve [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@ -5,16 +5,15 @@ labels: bug or enhancement
--- ---
## A Pull Request should be associated with an Issue. ## A Pull Request should be associated with a Discussion.
> We wish to have discussions in Issues. A single issue may be targeted by multiple PRs. > If you're fixing a bug, adding a new feature or improving something please provide the details in discussions,
> If you're offering a new feature or fixing anything, we'd like to know beforehand in Issues, > so that the development can be pointed in the intended direction.
> and potentially we'll be able to point development in a particular direction.
Related issue: Related discussion: <!-- Please link the related discussion -->
> Further notes in [Contribution Guidelines](.github/CONTRIBUTING.md) > Further notes in [Contribution Guidelines](.github/CONTRIBUTING.md)
> Thank you! We are open to PRs, but please understand if for technical reasons we are unable to accept each and any PR > Thank you for your contribution.
### Description ### Description
@ -26,7 +25,12 @@ This PR [briefly explain what it does]
- [ ] I have run `npm run format` before the commit. - [ ] I have run `npm run format` before the commit.
- [ ] I have run `npm run lint` before the commit. - [ ] I have run `npm run lint` before the commit.
- [ ] I have run `npm run release` before the commit. - [ ] I have run `npm run release` before the commit.
- [ ] `npm test` returns with no unit test errors. - [ ] `npm test` returns with no unit test errors and all code covered.
> In case this PR edits any scripts:
- [ ] I have checked the edited scripts for syntax.
- [ ] I have tested the changes in an integration test (If yes, provide workflow YAML and link).
<!-- <!--
- Please target the develop branch when submitting the pull request. - Please target the develop branch when submitting the pull request.

View File

@ -1,33 +0,0 @@
---
name: 🐞 Bug Fix
about: You have a fix for a bug?
labels: bug
---
## A Pull Request should be associated with an Issue.
> We wish to have discussions in Issues. A single issue may be targeted by multiple PRs.
> If you're offering a new feature or fixing anything, we'd like to know beforehand in Issues,
> and potentially we'll be able to point development in a particular direction.
Related issue:
> Further notes in [Contribution Guidelines](.github/CONTRIBUTING.md)
> Thank you! We are open to PRs, but please understand if for technical reasons we are unable to accept each and any PR
### Description
This PR [briefly explain what it does]
> In case this PR introduced TypeScript/JavaScript code changes:
- [ ] I have written test cases for the changes in this pull request.
- [ ] I have run `npm run format` before the commit.
- [ ] I have run `npm run lint` before the commit.
- [ ] I have run `npm run release` before the commit.
- [ ] `npm test` returns with no unit test errors.
<!--
- Please target the develop branch when submitting the pull request.
-->

View File

@ -1,33 +0,0 @@
---
name: ⚙ Improvement
about: You have some improvement to make setup-php better?
labels: enhancement
---
## A Pull Request should be associated with an Issue.
> We wish to have discussions in Issues. A single issue may be targeted by multiple PRs.
> If you're offering a new feature or fixing anything, we'd like to know beforehand in Issues,
> and potentially we'll be able to point development in a particular direction.
Related issue:
> Further notes in [Contribution Guidelines](.github/CONTRIBUTING.md)
> Thank you! We are open to PRs, but please understand if for technical reasons we are unable to accept each and any PR
### Description
This PR [briefly explain what it does]
> In case this PR introduced TypeScript/JavaScript code changes:
- [ ] I have written test cases for the changes in this pull request.
- [ ] I have run `npm run format` before the commit.
- [ ] I have run `npm run lint` before the commit.
- [ ] I have run `npm run release` before the commit.
- [ ] `npm test` returns with no unit test errors.
<!--
- Please target the develop branch when submitting the pull request.
-->

View File

@ -1,33 +0,0 @@
---
name: 🎉 New Feature
about: You have implemented some neat idea that you want to make part of setup-php?
labels: enhancement
---
## A Pull Request should be associated with an Issue.
> We wish to have discussions in Issues. A single issue may be targeted by multiple PRs.
> If you're offering a new feature or fixing anything, we'd like to know beforehand in Issues,
> and potentially we'll be able to point development in a particular direction.
Related issue:
> Further notes in [Contribution Guidelines](.github/CONTRIBUTING.md)
> Thank you! We are open to PRs, but please understand if for technical reasons we are unable to accept each and any PR
### Description
This PR [briefly explain what it does]
> In case this PR introduced TypeScript/JavaScript code changes:
- [ ] I have written test cases for the changes in this pull request.
- [ ] I have run `npm run format` before the commit.
- [ ] I have run `npm run lint` before the commit.
- [ ] I have run `npm run release` before the commit.
- [ ] `npm test` returns with no unit test errors.
<!--
- Please target the develop branch when submitting the pull request.
-->

21
.github/SECURITY.md vendored Normal file
View File

@ -0,0 +1,21 @@
# Security Policy
## Supported Versions
The latest patch version of `v2` release of this project is supported for security updates.
## Supported PHP Versions
This security policy only applies to the latest patch releases of the following PHP versions.
| Version | Supported |
|---------|--------------------|
| 8.1 | :white_check_mark: |
| 8.2 | :white_check_mark: |
| 8.3 | :white_check_mark: |
| 8.4 | :white_check_mark: |
## Reporting a Vulnerability
If you have found any issues that might have security implications in the versions supported, please send a report privately to [contact@setup-php.com](mailto:contact@setup-php.com).
Do not report security reports publicly.

View File

@ -0,0 +1,4 @@
name : CodeQL Configuration
paths:
- './src'

7
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "develop"
schedule:
interval: "weekly"

33
.github/workflows/codeql.yml vendored Normal file
View File

@ -0,0 +1,33 @@
name: CodeQL Workflow
on:
workflow_dispatch:
schedule:
- cron: '0 15 * * 6'
permissions:
contents: read
jobs:
codeql:
if: github.event.repository.fork == false
permissions:
actions: read # for github/codeql-action/init to get workflow details
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/autobuild to send a status report
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
config-file: ./.github/codeql/codeql-configuration.yml
languages: javascript
- name: Autobuild
uses: github/codeql-action/autobuild@v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4

138
.github/workflows/docs.yml vendored Normal file
View File

@ -0,0 +1,138 @@
name: Docs workflow
on:
workflow_dispatch:
schedule:
- cron: '0 15 * * 6'
permissions:
contents: read
jobs:
create:
if: github.event.repository.fork == false
permissions:
contents: none
name: Create
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-24.04, ubuntu-22.04, windows-2022, macos-15-intel]
php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: none
- name: Create file with all extensions for Linux and macOS
env:
file: php${{ matrix.php-versions }}-${{ matrix.operating-system }}.md
version: ${{ matrix.php-versions }}
if: matrix.operating-system != 'windows-2022'
run: |
php -m >> "$file.all"
- name: Create file with all extensions for Windows
env:
file: php${{ matrix.php-versions }}-${{ matrix.operating-system }}.md
version: ${{ matrix.php-versions }}
if: matrix.operating-system == 'windows-2022'
run: |
php -m | Out-File -FilePath "$env:file.all" -Append
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: none
tools: none
- name: Create final file for Linux and macOS
env:
file: php${{ matrix.php-versions }}-${{ matrix.operating-system }}.md
version: ${{ matrix.php-versions }}
if: matrix.operating-system != 'windows-2022'
run: |
echo "## PHP $version" >> "$file"
printf "\n" >> "$file"
echo "\`\`\`" >> "$file"
php -m >> "$file.builtin"
while IFS= read -r line; do
if [[ $line == [* || -z "${line// }" ]]; then
echo "$line" >> "$file"
elif grep -q "^$line" "$file.builtin"; then
echo "$line (builtin)" >> "$file"
else
echo "$line (shared)" >> "$file"
fi
done < "$file.all"
echo "\`\`\`" >> "$file"
printf "\n" >> "$file"
rm "$file.all" "$file.builtin"
- name: Create final file for Windows
env:
file: php${{ matrix.php-versions }}-${{ matrix.operating-system }}.md
version: ${{ matrix.php-versions }}
if: matrix.operating-system == 'windows-2022'
run: |
Write-Output "## PHP ${{ matrix.php-versions }}`n" | Out-File -FilePath "$env:file"
Write-Output "``````" | Out-File -FilePath "$env:file" -Append
php -m | Out-File -FilePath "$env:file.builtin" -Append
Get-Content "$env:file.all" | ForEach-Object {
if ($_.startsWith('[') -or -not $_.trim()) {
Write-Output "$_" | Out-File -FilePath "$env:file" -Append
} elseif ($_ -in (Get-Content "$env:file.builtin")) {
Write-Output "$_ (builtin)" | Out-File -FilePath "$env:file" -Append
} else {
Write-Output "$_ (shared)" | Out-File -FilePath "$env:file" -Append
}
}
Write-Output "```````n" | Out-File -FilePath "$env:file" -Append
Remove-Item "$env:file.all" -Force
Remove-Item "$env:file.builtin" -Force
- name: Upload artifacts
uses: actions/upload-artifact@v7
with:
name: lists-php${{ matrix.php-versions }}-${{ matrix.operating-system }}.md
path: php${{ matrix.php-versions }}-${{ matrix.operating-system }}.md
update:
if: github.event.repository.fork == false
permissions:
contents: write # for Git to git push
name: Update
needs: create
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
repository: ${{ github.repository }}.wiki
- name: Download artifacts
uses: actions/download-artifact@v8
with:
path: ${{ github.workspace }}/lists
pattern: lists-*
merge-multiple: true
- name: Configure Git
run : |
git config --local user.email "${{ secrets.email }}"
git config --local user.name "${{ github.repository_owner }}"
- name: Combine
run: |
for os in ubuntu-24.04 ubuntu-22.04 windows-2025 windows-2022 windows-2019 macos-13 macos-14 macos-15 macos-26; do
echo "These are extensions which are loaded by default on the following PHP versions. More extensions which are available as packages and available on pecl are supported by setup-php. Refer to [php extension support](https://github.com/shivammathur/setup-php#heavy_plus_sign-php-extension-support) for more details." > Php-extensions-loaded-on-"$os".md
for version in 5.3 5.4 5.5 5.6 7.0 7.1 7.2 7.3 7.4 8.0 8.1 8.2 8.3 8.4 8.5 8.6; do
if [[ "${os%-*}" = "macos" ]]; then
cat lists/php"$version"-macos-15-intel.md >> Php-extensions-loaded-on-"$os".md
elif [ "${os%-*}" = "windows" ]; then
cat lists/php"$version"-windows-2022.md >> Php-extensions-loaded-on-"$os".md
else
cat lists/php"$version"-"$os".md >> Php-extensions-loaded-on-"$os".md
fi
done
done
rm -rf ./lists
- name: Update
run: |
if [ "$(git status --porcelain=v1 2>/dev/null | wc -l)" != "0" ]; then
git add .
git commit -m "Update PHP extensions on wiki - $(date +'%d-%m-%y')"
git push -f https://${{ github.repository_owner }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git master || true
fi

63
.github/workflows/node.yml vendored Normal file
View File

@ -0,0 +1,63 @@
name: Node workflow
on:
pull_request:
branches:
- main
- develop
- verbose
paths-ignore:
- '**.md'
- 'examples/**'
push:
branches:
- main
- develop
- verbose
paths-ignore:
- '**.md'
- 'examples/**'
permissions:
contents: read
jobs:
run:
name: Run
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 2
- name: Setup Node.js 24.x
uses: actions/setup-node@v6
with:
node-version: 24.x
- name: Install dependencies
run: npm install
- name: Prettier Format Check
run: npm run format-check
- name: ESLint Check
run: npm run lint
- name: Run tests
run: npm test
- name: Run npm audit
run: npm audit
- name: Send Coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/lcov.info
name: github-actions-codecov-${{ matrix.operating-system }}
fail_ci_if_error: false
verbose: true

93
.github/workflows/php.yml vendored Normal file
View File

@ -0,0 +1,93 @@
name: Main workflow
on:
workflow_dispatch:
pull_request:
branches:
- main
- develop
- verbose
paths-ignore:
- '**.md'
- 'examples/**'
push:
branches:
- main
- develop
- verbose
paths-ignore:
- '**.md'
- 'examples/**'
permissions:
contents: read
env:
default-php-version: '8.2'
jobs:
run:
name: Run
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-24.04, ubuntu-22.04, windows-2022, macos-15-intel]
php-versions: ['5.3', '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6']
include:
- operating-system: ubuntu-24.04
php-versions: ''
php-version-file: 'php-version-file'
env:
extensions: xml, opcache, xdebug, pcov, gd
key: cache-v5
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup cache environment
id: cache-env
uses: shivammathur/cache-extensions@develop
with:
php-version: ${{ matrix.php-versions || env.default-php-version }}
extensions: ${{ env.extensions }}
key: ${{ env.key }}
- name: Cache extensions
uses: actions/cache@v5
with:
path: ${{ steps.cache-env.outputs.dir }}
key: ${{ steps.cache-env.outputs.key }}
restore-keys: ${{ steps.cache-env.outputs.key }}
- name: Stage php-version-file
if: ${{ matrix.php-version-file == 'php-version-file' }}
run: |
echo ${{ env.default-php-version }} > php-version-file
- name: Setup PHP with extensions and custom config
run: node dist/index.js
env:
php-version: ${{ matrix.php-versions }}
php-version-file: ${{ matrix.php-version-file }}
extensions: ${{ env.extensions }}
ini-values: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata
- name: Testing PHP version
run: |
php -v
php -r "if(strpos(phpversion(), '${{ matrix.php-versions || env.default-php-version }}') === false) {throw new Exception('Wrong PHP version Installed');}"
- name: Testing Composer version
run: |
composer -V
php -r "if(strpos(@exec('composer -V'), 'Composer version') === false) {throw new Exception('Composer not found');}"
- name: Testing Extensions
run: |
php -m
php -r "if(! extension_loaded('gd')) {throw new Exception('gd not found');}"
php -r "if(! extension_loaded('xml')) {throw new Exception('xml not found');}"
php -r "if(! extension_loaded('Xdebug')) {throw new Exception('Xdebug not found');}"
php -r "if(phpversion()>=7.1 && ! extension_loaded('pcov')) {throw new Exception('PCOV not found');}"
- name: Testing ini values
run: |
php -r "if(ini_get('memory_limit')!='-1') {throw new Exception('memory_limit not disabled');}"
php -r "if(ini_get('post_max_size')!='256M') {throw new Exception('post_max_size not added');}"
php -r "if(ini_get('short_open_tag')!=1) {throw new Exception('short_open_tag not added');}"
php -r "if(ini_get('date.timezone')!='Asia/Kolkata') {throw new Exception('date.timezone not added');}"

62
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,62 @@
name: Publish Package
on:
release:
types: [created]
workflow_dispatch:
inputs:
skip:
description: Skip release to repository
required: false
tag:
description: Tag name
required: true
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout release
if: github.event_name != 'workflow_dispatch'
uses: actions/checkout@v6
- name: Checkout tag
uses: actions/checkout@v6
if: github.event_name == 'workflow_dispatch'
with:
ref: ${{ github.event.inputs.tag }}
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '20.x'
registry-url: https://registry.npmjs.org
- name: Install dependencies and add lib
run: |
npm install
npm run build
sed -i -e '/lib\//d' .gitignore
- name: Publish to NPM
if: "!contains(github.event.inputs.skip, 'skip-npm')"
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Change to GitHub Packages registry
uses: actions/setup-node@v6
with:
registry-url: https://npm.pkg.github.com
scope: '@shivammathur'
- name: Patch package.json
run: |
sed -i 's#"name": "#"name": "@shivammathur/#' package.json
- name: Publish to GitHub Packages
if: "!contains(github.event.inputs.skip, 'skip-github-packages')"
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,82 +0,0 @@
name: Main workflow
on:
pull_request:
branches:
- master
- develop
- verbose
paths-ignore:
- '**.md'
- 'examples/**'
push:
branches:
- master
- develop
- verbose
paths-ignore:
- '**.md'
- 'examples/**'
jobs:
run:
name: Run
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Setup Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install dependencies
run: npm install
- name: Prettier Format Check
run: npm run format-check
- name: ESLint Check
run: npm run lint
- name: Run tests
run: npm test
- name: Send Coverage
continue-on-error: true
timeout-minutes: 1
run: curl -s https://codecov.io/bash | bash -s -- -t ${{secrets.CODECOV_TOKEN}} -f coverage/clover.xml -n github-actions-codecov-${{ matrix.operating-system }}-php${{ matrix.php-versions }}
- name: Setup PHP with extensions and custom config
run: node dist/index.js
env:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xdebug, pcov #optional
ini-values-csv: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata #optional
- name: Testing PHP version
run: |
php -v
php -r "if(strpos(phpversion(), '${{ matrix.php-versions }}') === false) {throw new Exception('Wrong PHP version Installed');}"
- name: Testing Composer version
run: |
composer -V
php -r "if(strpos(@exec('composer -V'), 'Composer version') === false) {throw new Exception('Composer not found');}"
- name: Testing Extensions
run: |
php -m
php -r "if(! extension_loaded('mbstring')) {throw new Exception('mbstring not found');}"
php -r "if(! extension_loaded('Xdebug')) {throw new Exception('Xdebug not found');}"
php -r "if(phpversion()>=7.1 && ! extension_loaded('pcov')) {throw new Exception('PCOV not found');}"
- name: Testing ini values
run: |
php -r "if(ini_get('post_max_size')!='256M') {throw new Exception('post_max_size not added');}"
php -r "if(ini_get('short_open_tag')!=1) {throw new Exception('short_open_tag not added');}"
php -r "if(ini_get('date.timezone')!='Asia/Kolkata') {throw new Exception('date.timezone not added');}"

2
.gitignore vendored
View File

@ -3,7 +3,7 @@ node_modules/
__tests__/runner/* __tests__/runner/*
lib/ lib/
# Rest of the file pulled from https://github.com/github/gitignore/blob/master/Node.gitignore # Rest of the file pulled from https://github.com/github/gitignore/blob/main/Node.gitignore
# Logs # Logs
logs logs
*.log *.log

1
.node-version Normal file
View File

@ -0,0 +1 @@
20

View File

@ -1,11 +1,12 @@
{ {
"arrowParens": "avoid",
"bracketSpacing": false,
"endOfLine": "auto",
"parser": "typescript",
"printWidth": 80, "printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true, "semi": true,
"singleQuote": true, "singleQuote": true,
"tabWidth": 2,
"trailingComma": "none", "trailingComma": "none",
"bracketSpacing": false, "useTabs": false
"arrowParens": "avoid", }
"parser": "typescript"
}

View File

@ -1,7 +1,7 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2019 shivammathur and contributors Copyright (c) shivammathur and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

1183
README.md

File diff suppressed because it is too large Load Diff

View File

@ -1,52 +1,16 @@
import * as config from '../src/config'; import * as config from '../src/config';
describe('Config tests', () => { describe('Config tests', () => {
it('checking addINIValuesOnWindows', async () => { it.each`
let win32: string = await config.addINIValues( ini_values | os | output
'post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata', ${'a=b, c=d'} | ${'win32'} | ${'Add-Content "$php_dir\\php.ini" "a=b\nc=d"'}
'win32' ${'a=b, c=d'} | ${'linux'} | ${'echo "a=b\nc=d" | sudo tee -a "${pecl_file:-${ini_file[@]}}"'}
); ${'a=b, c=d'} | ${'darwin'} | ${'echo "a=b\nc=d" | sudo tee -a "${pecl_file:-${ini_file[@]}}"'}
expect(win32).toContain( ${'a=b & ~c'} | ${'win32'} | ${'Add-Content "$php_dir\\php.ini" "a=\'b & ~c\'"'}
'Add-Content C:\\tools\\php\\php.ini "post_max_size=256M\nshort_open_tag=On\ndate.timezone=Asia/Kolkata"' ${'a="~(b)"'} | ${'win32'} | ${'Add-Content "$php_dir\\php.ini" "a=\'~(b)\'"'}
); ${'a="b, c"'} | ${'win32'} | ${'Add-Content "$php_dir\\php.ini" "a=b, c"'}
${'a=b, c=d'} | ${'openbsd'} | ${'Platform openbsd is not supported'}
win32 = await config.addINIValues( `('checking addINIValues on $os', async ({ini_values, os, output}) => {
'post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata', expect(await config.addINIValues(ini_values, os)).toContain(output);
'fedora'
);
expect(win32).toContain('Platform fedora is not supported');
});
it('checking addINIValuesOnLinux', async () => {
let linux: string = await config.addINIValues(
'post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata',
'linux',
true
);
expect(linux).toContain(
'echo "post_max_size=256M\nshort_open_tag=On\ndate.timezone=Asia/Kolkata"'
);
linux = await config.addINIValues(
'post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata',
'fedora'
);
expect(linux).toContain('Platform fedora is not supported');
});
it('checking addINIValuesOnDarwin', async () => {
let darwin: string = await config.addINIValues(
'post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata',
'darwin'
);
expect(darwin).toContain(
'echo "post_max_size=256M\nshort_open_tag=On\ndate.timezone=Asia/Kolkata"'
);
darwin = await config.addINIValues(
'post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata',
'fedora'
);
expect(darwin).toContain('Platform fedora is not supported');
}); });
}); });

106
__tests__/core.test.ts Normal file
View File

@ -0,0 +1,106 @@
import * as core from '../src/core';
describe('Core tests', () => {
const originalEnv = process.env;
const originalExitCode = process.exitCode;
let stdoutOutput: string;
const originalWrite = process.stdout.write;
beforeEach(() => {
process.env = {...originalEnv};
process.exitCode = undefined;
stdoutOutput = '';
process.stdout.write = jest.fn((chunk: string | Uint8Array): boolean => {
stdoutOutput += chunk.toString();
return true;
}) as unknown as typeof process.stdout.write;
});
afterEach(() => {
process.env = originalEnv;
process.exitCode = originalExitCode;
process.stdout.write = originalWrite;
});
it('checking issueCommand with no properties', () => {
core.issueCommand('warning', {}, 'test message');
expect(stdoutOutput).toContain('::warning::test message');
});
it('checking issueCommand with properties', () => {
core.issueCommand('error', {file: 'test.ts', line: '10'}, 'error message');
expect(stdoutOutput).toContain(
'::error file=test.ts,line=10::error message'
);
});
it('checking issueCommand escapes special characters in message', () => {
core.issueCommand('warning', {}, 'line1\nline2\rline3%percent');
expect(stdoutOutput).toContain(
'::warning::line1%0Aline2%0Dline3%25percent'
);
});
it('checking issueCommand escapes special characters in properties', () => {
core.issueCommand('error', {file: 'path:to,file'}, 'message');
expect(stdoutOutput).toContain('::error file=path%3Ato%2Cfile::message');
});
it('checking issueCommand with Error object', () => {
const error = new Error('test error');
core.issueCommand('error', {}, error);
expect(stdoutOutput).toContain('::error::Error: test error');
});
it('checking issueCommand filters empty properties', () => {
core.issueCommand('warning', {file: 'test.ts', line: ''}, 'message');
expect(stdoutOutput).toContain('::warning file=test.ts::message');
});
it('checking error', () => {
core.error('error message');
expect(stdoutOutput).toContain('::error::error message');
});
it('checking error with Error object', () => {
core.error(new Error('error instance'));
expect(stdoutOutput).toContain('::error::Error: error instance');
});
it('checking setFailed', () => {
core.setFailed('failure message');
expect(process.exitCode).toBe(1);
expect(stdoutOutput).toContain('::error::failure message');
});
it('checking setFailed with Error object', () => {
core.setFailed(new Error('failure error'));
expect(process.exitCode).toBe(1);
expect(stdoutOutput).toContain('::error::Error: failure error');
});
it('checking getInput returns value', () => {
process.env['INPUT_TEST-INPUT'] = 'test value';
expect(core.getInput('test-input')).toBe('test value');
});
it('checking getInput trims value', () => {
process.env['INPUT_TEST-INPUT'] = ' trimmed ';
expect(core.getInput('test-input')).toBe('trimmed');
});
it('checking getInput returns empty string for missing input', () => {
expect(core.getInput('missing-input')).toBe('');
});
it('checking getInput throws for required missing input', () => {
expect(() => core.getInput('missing-input', true)).toThrow(
'Input required and not supplied: missing-input'
);
});
it('checking getInput handles spaces in name', () => {
process.env['INPUT_INPUT_WITH_SPACES'] = 'spaced value';
expect(core.getInput('input with spaces')).toBe('spaced value');
});
});

View File

@ -1,82 +1,44 @@
import * as coverage from '../src/coverage'; import * as coverage from '../src/coverage';
jest.mock('../src/extensions', () => ({
addExtension: jest.fn().mockImplementation(extension => {
return 'addExtension ' + extension + '\n';
})
}));
describe('Config tests', () => { describe('Config tests', () => {
it('checking addCoverage with PCOV on windows', async () => { it.each`
let win32: string = await coverage.addCoverage('pcov', '7.4', 'win32'); driver | php | os | output
expect(win32).toContain('addExtension pcov'); ${'PCOV'} | ${'7.4'} | ${'win32'} | ${'Add-Extension pcov,Disable-Extension xdebug false'}
expect(win32).toContain( ${'pcov'} | ${'7.4'} | ${'win32'} | ${'$pcov_version = php -r "echo phpversion(\'pcov\');"'}
'if(php -m | findstr -i xdebug) { Disable-PhpExtension xdebug C:\\tools\\php' ${'pcov'} | ${'7.4'} | ${'win32'} | ${'PCOV $pcov_version enabled as coverage driver'}
); ${'pcov'} | ${'7.0'} | ${'win32'} | ${'PHP 7.1 or newer is required'}
${'pcov'} | ${'5.6'} | ${'win32'} | ${'PHP 7.1 or newer is required'}
win32 = await coverage.addCoverage('pcov', '7.0', 'win32'); ${'pcov'} | ${'7.4'} | ${'win32'} | ${'Add-Extension pcov,Disable-Extension xdebug false'}
expect(win32).toContain('PHP 7.1 or newer is required'); ${'pcov'} | ${'7.4'} | ${'linux'} | ${'add_extension pcov,disable_extension xdebug false'}
${'pcov'} | ${'7.4'} | ${'darwin'} | ${'add_brew_extension pcov,disable_extension xdebug false'}
win32 = await coverage.addCoverage('pcov', '5.6', 'win32'); ${'xdebug'} | ${'7.4'} | ${'win32'} | ${'Add-Extension xdebug'}
expect(win32).toContain('PHP 7.1 or newer is required'); ${'xdebug3'} | ${'7.1'} | ${'win32'} | ${'xdebug3 is not supported on PHP 7.1'}
}); ${'xdebug2'} | ${'7.4'} | ${'win32'} | ${'Add-Extension xdebug stable 2.9.8'}
${'xdebug'} | ${'8.0'} | ${'linux'} | ${'add_extension xdebug'}
it('checking addCoverage with PCOV on linux', async () => { ${'xdebug3'} | ${'8.0'} | ${'linux'} | ${'add_extension xdebug'}
const linux: string = await coverage.addCoverage('pcov', '7.4', 'linux'); ${'xdebug2'} | ${'7.4'} | ${'linux'} | ${'add_pecl_extension xdebug 2.9.8 zend_extension'}
expect(linux).toContain('addExtension pcov'); ${'xdebug'} | ${'7.4'} | ${'linux'} | ${'xdebug_version="$(php -r "echo phpversion(\'xdebug\');")"'}
expect(linux).toContain('sudo sed -i "/xdebug/d" $ini_file'); ${'xdebug'} | ${'7.4'} | ${'linux'} | ${'Xdebug $xdebug_version enabled as coverage driver'}
expect(linux).toContain('sudo phpdismod -v 7.4 xdebug'); ${'xdebug'} | ${'7.4'} | ${'darwin'} | ${'add_brew_extension xdebug'}
}); ${'xdebug3'} | ${'7.1'} | ${'darwin'} | ${'xdebug3 is not supported on PHP 7.1'}
${'xdebug2'} | ${'7.4'} | ${'darwin'} | ${'add_brew_extension xdebug2'}
it('checking addCoverage with PCOV on darwin', async () => { ${'xdebug2'} | ${'8.0'} | ${'darwin'} | ${'xdebug2 is not supported on PHP 8.0'}
const darwin: string = await coverage.addCoverage('pcov', '7.4', 'darwin'); ${'none'} | ${'7.4'} | ${'win32'} | ${'Disable-Extension xdebug false,Disable-Extension pcov false'}
expect(darwin).toContain('addExtension pcov'); ${'none'} | ${'7.4'} | ${'linux'} | ${'disable_extension xdebug false,disable_extension pcov false'}
}); ${'none'} | ${'7.4'} | ${'darwin'} | ${'disable_extension xdebug false,disable_extension pcov false'}
${'nocov'} | ${'7.x'} | ${'any'} | ${''}
it('checking addCoverage with Xdebug on windows', async () => { ${''} | ${'7.x'} | ${'any'} | ${''}
const win32: string = await coverage.addCoverage('xdebug', '7.3', 'win32'); `(
expect(win32).toContain('addExtension xdebug'); 'checking addCoverage with $driver on $os',
}); async ({driver, php, os, output}) => {
const script: string = await coverage.addCoverage(driver, php, os);
it('checking addCoverage with Xdebug on linux', async () => { if (output) {
const linux: string = await coverage.addCoverage('xdebug', '7.4', 'linux'); output.split(',').forEach((command: string) => {
expect(linux).toContain('addExtension xdebug'); expect(script).toContain(command);
}); });
} else {
it('checking addCoverage with Xdebug on darwin', async () => { expect(script).toEqual(output);
const darwin: string = await coverage.addCoverage( }
'xdebug', }
'7.4', );
'darwin'
);
expect(darwin).toContain('addExtension xdebug');
});
it('checking disableCoverage windows', async () => {
const win32 = await coverage.addCoverage('none', '7.4', 'win32');
expect(win32).toContain('Disable-PhpExtension xdebug');
expect(win32).toContain('Disable-PhpExtension pcov');
});
it('checking disableCoverage on linux', async () => {
const linux: string = await coverage.addCoverage('none', '7.4', 'linux');
expect(linux).toContain('sudo phpdismod -v 7.4 xdebug');
expect(linux).toContain('sudo phpdismod -v 7.4 pcov');
expect(linux).toContain('sudo sed -i "/xdebug/d" $ini_file');
expect(linux).toContain('sudo sed -i "/pcov/d" $ini_file');
});
it('checking disableCoverage on darwin', async () => {
const darwin: string = await coverage.addCoverage('none', '7.4', 'darwin');
expect(darwin).toContain('sudo sed -i \'\' "/xdebug/d" $ini_file');
expect(darwin).toContain('sudo sed -i \'\' "/pcov/d" $ini_file');
});
it('checking no or invalid coverage driver', async () => {
let nocov: string = await coverage.addCoverage('nocov', '7.x', 'any');
expect(nocov).toEqual('');
nocov = await coverage.addCoverage('', '7.x', 'any');
expect(nocov).toEqual('');
});
}); });

View File

@ -1,97 +1,161 @@
import * as fs from 'fs';
import * as extensions from '../src/extensions'; import * as extensions from '../src/extensions';
describe('Extension tests', () => { describe('Extension tests', () => {
it('checking addExtensionOnWindows', async () => { it.each`
let win32: string = await extensions.addExtension( extension | version | output
'xdebug, pcov, redis', ${'none'} | ${'7.4'} | ${'Disable-AllShared'}
'7.4', ${':intl'} | ${'7.4'} | ${'Disable-Extension intl'}
'win32' ${'ast-beta'} | ${'7.4'} | ${'Add-Extension ast beta'}
); ${'blackfire'} | ${'7.3'} | ${'Add-Blackfire blackfire'}
expect(win32).toContain('Add-Extension xdebug'); ${'blackfire-1.31.0'} | ${'7.3'} | ${'Add-Blackfire blackfire-1.31.0'}
expect(win32).toContain('Add-Extension pcov'); ${'grpc-1.2.3'} | ${'7.4'} | ${'Add-Extension grpc stable 1.2.3'}
expect(win32).toContain('Add-Extension redis beta'); ${'inotify-1.2.3alpha2'} | ${'7.4'} | ${'Add-Extension inotify alpha 1.2.3'}
${'ioncube'} | ${'7.4'} | ${'Add-Ioncube'}
${'mongodb-mongodb/mongo-php-driver@master'} | ${'7.3'} | ${'Add-Log "$cross" "mongodb-mongodb/mongo-php-driver@master" "mongodb-mongodb/mongo-php-driver@master is not supported on PHP 7.3"'}
${'mysql'} | ${'7.4'} | ${'Add-Extension mysqli\nAdd-Extension mysqlnd'}
${'mysql'} | ${'5.5'} | ${'Add-Extension mysql\nAdd-Extension mysqli\nAdd-Extension mysqlnd'}
${'oci8'} | ${'7.4'} | ${'Add-Oci oci8'}
${'pcov'} | ${'5.6'} | ${'Add-Log "$cross" "pcov" "pcov is not supported on PHP 5.6"'}
${'pdo_oci'} | ${'7.4'} | ${'Add-Oci pdo_oci'}
${'ibm_db2'} | ${'7.4'} | ${'Add-Ibm ibm_db2'}
${'pdo_ibm'} | ${'7.4'} | ${'Add-Ibm pdo_ibm'}
${'pecl_http'} | ${'7.4'} | ${'Add-Http'}
${'pdo_sqlsrv'} | ${'7.4'} | ${'Add-Sqlsrv pdo_sqlsrv'}
${'phalcon3'} | ${'7.2'} | ${'Add-Phalcon phalcon3'}
${'phalcon4'} | ${'7.4'} | ${'Add-Phalcon phalcon4'}
${'sqlite'} | ${'7.4'} | ${'Add-Extension sqlite3'}
${'sqlsrv'} | ${'5.6'} | ${'Add-Extension sqlsrv'}
${'sqlsrv'} | ${'7.4'} | ${'Add-Sqlsrv sqlsrv'}
${'sqlsrv-1.2.3preview1'} | ${'7.4'} | ${'Add-Extension sqlsrv devel 1.2.3'}
${'Xdebug'} | ${'7.4'} | ${'Add-Extension xdebug'}
${'xdebug2'} | ${'7.2'} | ${'Add-Extension xdebug stable 2.9.8'}
${'zephir_parser'} | ${'7.2'} | ${'Add-ZephirParser zephir_parser'}
`(
'checking addExtensionOnWindows for extension $extension on version $version',
async ({extension, version, output}) => {
expect(
await extensions.addExtension(extension, version, 'win32')
).toContain(output);
}
);
win32 = await extensions.addExtension( it.each`
'does_not_exist', extension | version | output
'7.2', ${'none'} | ${'7.4'} | ${'disable_all_shared'}
'win32', ${':intl'} | ${'7.4'} | ${'disable_extension intl'}
true ${'ast-beta'} | ${'7.4'} | ${'add_unstable_extension ast beta extension'}
); ${'blackfire'} | ${'7.3'} | ${'add_blackfire blackfire'}
expect(win32).toContain('Add-Extension does_not_exist'); ${'blackfire-1.31.0'} | ${'7.3'} | ${'add_blackfire blackfire-1.31.0'}
${'couchbase'} | ${'7.4'} | ${'add_couchbase'}
${'gearman'} | ${'5.6'} | ${'add_gearman'}
${'geos'} | ${'7.3'} | ${'add_geos'}
${'grpc-1.2.3'} | ${'7.4'} | ${'add_pecl_extension grpc 1.2.3 extension'}
${'http-1.2.3'} | ${'7.3'} | ${'add_http http-1.2.3'}
${'intl-65.1'} | ${'5.6'} | ${'add_intl intl-65.1'}
${'ioncube'} | ${'7.3'} | ${'add_ioncube'}
${'memcache-8.2'} | ${'8.2'} | ${'add_pecl_extension memcache 8.2 extension'}
${'mongodb-mongodb/mongo-php-driver@master'} | ${'7.3'} | ${'add_extension_from_source mongodb https://github.com mongodb mongo-php-driver master extension'}
${'oci8'} | ${'7.3'} | ${'add_oci oci8'}
${'pcov'} | ${'5.6'} | ${'add_log "$cross" "pcov" "pcov is not supported on PHP 5.6'}
${'ibm_db2'} | ${'7.3'} | ${'add_ibm ibm_db2'}
${'pdo-odbc'} | ${'7.4'} | ${'add_pdo_extension odbc'}
${'pdo_cubrid'} | ${'7.0'} | ${'add_cubrid pdo_cubrid'}
${'pdo_cubrid'} | ${'7.4'} | ${'add_pdo_extension cubrid'}
${'pdo_mysql'} | ${'7.4'} | ${'add_pdo_extension mysql'}
${'pdo_oci'} | ${'7.3'} | ${'add_oci pdo_oci'}
${'pdo_ibm'} | ${'7.3'} | ${'add_ibm pdo_ibm'}
${'pdo_sqlsrv'} | ${'7.4'} | ${'add_sqlsrv pdo_sqlsrv'}
${'pecl_http'} | ${'7.3'} | ${'add_http'}
${'phalcon3'} | ${'7.3'} | ${'add_phalcon phalcon3'}
${'relay'} | ${'7.4'} | ${'add_relay relay'}
${'relay-v1.2.3'} | ${'7.4'} | ${'add_relay relay-v1.2.3'}
${'sqlite'} | ${'7.4'} | ${'add_extension sqlite3'}
${'sqlsrv-1.2.3-beta1'} | ${'7.4'} | ${'add_pecl_extension sqlsrv 1.2.3beta1 extension'}
${'Xdebug'} | ${'7.4'} | ${'add_extension xdebug'}
${'xdebug-alpha'} | ${'7.4'} | ${'add_unstable_extension xdebug alpha zend_extension'}
${'xdebug2'} | ${'7.2'} | ${'add_pecl_extension xdebug 2.9.8 zend_extension'}
${'zephir_parser-1.2.3'} | ${'7.2'} | ${'add_zephir_parser zephir_parser-1.2.3'}
`(
'checking addExtensionOnLinux for extension $extension on version $version',
async ({extension, version, output}) => {
expect(
await extensions.addExtension(extension, version, 'linux')
).toContain(output);
}
);
win32 = await extensions.addExtension('xdebug', '7.2', 'fedora'); it.each`
expect(win32).toContain('Platform fedora is not supported'); extension | version | output
}); ${'none'} | ${'7.2'} | ${'disable_all_shared'}
${':intl'} | ${'7.2'} | ${'disable_extension intl'}
${'ast-beta'} | ${'7.2'} | ${'add_unstable_extension ast beta extension'}
${'blackfire'} | ${'7.3'} | ${'add_blackfire blackfire'}
${'blackfire-1.31.0'} | ${'7.3'} | ${'add_blackfire blackfire-1.31.0'}
${'couchbase'} | ${'5.6'} | ${'add_couchbase'}
${'does_not_exist'} | ${'7.2'} | ${'add_extension does_not_exist'}
${'geos'} | ${'7.3'} | ${'add_geos'}
${'grpc-1.2.3'} | ${'7.2'} | ${'add_pecl_extension grpc 1.2.3 extension'}
${'http-1.2.3'} | ${'7.3'} | ${'add_http http-1.2.3'}
${'imagick'} | ${'5.5'} | ${'add_extension imagick'}
${'ioncube'} | ${'7.3'} | ${'add_ioncube'}
${'mongodb-mongodb/mongo-php-driver@master'} | ${'7.2'} | ${'add_extension_from_source mongodb https://github.com mongodb mongo-php-driver master extension'}
${'oci8'} | ${'7.3'} | ${'add_oci oci8'}
${'pcov'} | ${'5.6'} | ${'add_log "$cross" "pcov" "pcov is not supported on PHP 5.6"'}
${'pdo_oci'} | ${'7.3'} | ${'add_oci pdo_oci'}
${'pecl_http'} | ${'7.3'} | ${'add_http'}
${'relay-1.2.3'} | ${'7.4'} | ${'add_relay relay-1.2.3'}
${'sqlite'} | ${'7.2'} | ${'add_extension sqlite3'}
${'zephir_parser-v1.2.3'} | ${'7.2'} | ${'add_zephir_parser zephir_parser-v1.2.3'}
`(
'checking addExtensionOnDarwin for extension $extension on version $version',
async ({extension, version, output}) => {
expect(
await extensions.addExtension(extension, version, 'darwin')
).toContain(output);
}
);
it('checking addExtensionOnLinux', async () => { const data: string[][] = fs
let linux: string = await extensions.addExtension( .readFileSync('src/configs/brew_extensions')
'xdebug, pcov, redis', .toString()
'7.4', .split(/\r?\n/)
'linux' .filter(Boolean)
); .map(line => {
expect(linux).toContain( const [formula, extension]: string[] = line.split('=');
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php7.4-xdebug' const prefix: string =
); extension == 'xdebug' ? 'zend_extension' : 'extension';
expect(linux).toContain('pecl install xdebug'); const ext_name = extension.replace(/\d+|(pdo|pecl)[_-]/, '');
expect(linux).toContain( const output: string = fs.existsSync(
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php7.4-pcov' `src/scripts/extensions/${ext_name}.sh`
); )
expect(linux).toContain('pecl install pcov'); ? `add_${ext_name}`
expect(linux).toContain( : `add_brew_extension ${formula} ${prefix}`;
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php7.4-igbinary php7.4-redis' return [
); formula,
formula.match(/phalcon3|lua|propro/) ? '7.3' : '8.1',
output
];
});
linux = await extensions.addExtension('phalcon3, phalcon4', '7.2', 'linux'); it.each(data)(
expect(linux).toContain('phalcon.sh master 7.2'); 'checking addExtensionOnDarwin for brew extension %s',
expect(linux).toContain('phalcon.sh 4.0.x 7.2'); async (extension, version, output) => {
expect(
await extensions.addExtension(extension, version, 'darwin')
).toContain(output);
}
);
linux = await extensions.addExtension('phalcon3, phalcon4', '7.3', 'linux'); it.each`
expect(linux).toContain('phalcon.sh master 7.3'); extension | version | output
expect(linux).toContain('phalcon.sh 4.0.x 7.3'); ${'xdebug'} | ${'7.2'} | ${'Platform openbsd is not supported'}
`(
linux = await extensions.addExtension('phalcon4', '7.4', 'linux'); 'checking addExtension on openbsd for extension $extension on version $version',
expect(linux).toContain('phalcon.sh 4.0.x 7.4'); async ({extension, version, output}) => {
expect(
linux = await extensions.addExtension('xdebug', '7.2', 'fedora'); await extensions.addExtension(extension, version, 'openbsd')
expect(linux).toContain('Platform fedora is not supported'); ).toContain(output);
}); }
);
it('checking addExtensionOnDarwin', async () => {
let darwin: string = await extensions.addExtension(
'xdebug, pcov',
'7.2',
'darwin'
);
expect(darwin).toContain('sudo pecl install xdebug');
expect(darwin).toContain('sudo pecl install pcov');
darwin = await extensions.addExtension('pcov', '5.6', 'darwin');
expect(darwin).toContain('sudo pecl install pcov');
darwin = await extensions.addExtension('pcov', '7.2', 'darwin');
expect(darwin).toContain('sudo pecl install pcov');
darwin = await extensions.addExtension('xdebug', '5.6', 'darwin');
expect(darwin).toContain('sudo pecl install xdebug-2.5.5');
darwin = await extensions.addExtension('xdebug', '7.2', 'darwin');
expect(darwin).toContain('sudo pecl install xdebug');
darwin = await extensions.addExtension('redis', '5.6', 'darwin');
expect(darwin).toContain('sudo pecl install redis-2.2.8');
darwin = await extensions.addExtension('redis', '7.2', 'darwin');
expect(darwin).toContain('sudo pecl install redis');
darwin = await extensions.addExtension(
'does_not_exist',
'7.2',
'darwin',
false
);
expect(darwin).toContain('add_extension does_not_exist');
darwin = await extensions.addExtension('xdebug', '7.2', 'fedora');
expect(darwin).toContain('Platform fedora is not supported');
});
}); });

45
__tests__/fetch.test.ts Normal file
View File

@ -0,0 +1,45 @@
import * as fetch from '../src/fetch';
import nock from 'nock';
it('checking fetch', async () => {
const host_url = 'https://example.com';
const manifest_url = host_url + '/manifest';
const ping_url = host_url + '/ping';
nock(host_url)
.get('/manifest')
.reply(200, {latest: 'latest'})
.get('/manifest', '', {
reqheaders: {authorization: 'Bearer invalid_token'}
})
.reply(401, {error: '401: Unauthorized'})
.get('/ping')
.twice()
.reply(301, undefined, {
Location: host_url + '/pong'
})
.get('/pong')
.reply(200, 'pong')
.get('/error')
.replyWithError('Network failure');
let response: Record<string, string> = await fetch.fetch(manifest_url);
expect(response.error).toBe(undefined);
expect(response.data).toContain('latest');
response = await fetch.fetch(ping_url, '', 1);
expect(response.error).toBe(undefined);
expect(response.data).toContain('pong');
response = await fetch.fetch(ping_url, '', 0);
expect(response.error).toBe('301: Redirect error');
expect(response.data).toBe(undefined);
response = await fetch.fetch(manifest_url, 'invalid_token');
expect(response.error).not.toBe(undefined);
expect(response.data).toBe(undefined);
response = await fetch.fetch(host_url + '/error');
expect(response.error).toContain('Fetch error:');
expect(response.data).toBe(undefined);
});

View File

@ -1,146 +1,87 @@
import * as install from '../src/install'; import * as install from '../src/install';
import * as utils from '../src/utils';
/** /**
* Mock install.ts * Mock install.ts
*/ */
jest.mock('../src/install', () => ({ jest.mock('../src/install', () => ({
build: jest.fn().mockImplementation( getScript: jest
async ( .fn()
filename: string, .mockImplementation(async (os: string): Promise<string> => {
version: string, const filename = os + (await utils.scriptExtension(os));
os_version: string const version: string = await utils.parseVersion(
): Promise<string> => { await utils.readPHPVersion()
const extension_csv: string = process.env['extension-csv'] || ''; );
const ini_values_csv: string = process.env['ini-values-csv'] || ''; const ini_file: string = await utils.parseIniFile(
await utils.getInput('ini-file', false)
);
const extension_csv: string = process.env['extensions'] || '';
const ini_values_csv: string = process.env['ini-values'] || '';
const coverage_driver: string = process.env['coverage'] || ''; const coverage_driver: string = process.env['coverage'] || '';
const tools_csv: string = process.env['tools'] || '';
let script = 'initial script ' + filename + version + os_version; let script = await utils.joins(filename, version, ini_file);
if (extension_csv) { script += extension_csv ? ' install extensions' : '';
script += 'install extensions'; script += tools_csv ? ' add_tool' : '';
} script += coverage_driver ? ' set coverage driver' : '';
if (ini_values_csv) { script += ini_values_csv ? ' edit php.ini' : '';
script += 'edit php.ini';
}
if (coverage_driver) {
script += 'set coverage driver';
}
return script; return script;
} }),
), run: jest.fn().mockImplementation(async (): Promise<string> => {
run: jest.fn().mockImplementation( const os: string = process.env['RUNNER_OS'] || '';
async (): Promise<string> => { const tool = await utils.scriptTool(os);
const os_version: string = process.env['RUNNER_OS'] || ''; return tool + (await install.getScript(os));
const version: string = process.env['php-version'] || ''; })
let script = '';
switch (os_version) {
case 'darwin':
script = await install.build(os_version + '.sh', version, os_version);
script += 'sh script.sh ' + version + ' ' + __dirname;
break;
case 'linux': {
const pecl: string = process.env['pecl'] || '';
script = await install.build(os_version + '.sh', version, os_version);
script += 'sh script.sh ' + version + ' ' + pecl + ' ' + __dirname;
break;
}
case 'win32':
script = await install.build(os_version + '.sh', version, os_version);
script +=
'pwsh script.ps1 -version ' + version + ' -dir ' + __dirname;
break;
default:
script += os_version + ' is not supported';
}
return script;
}
)
})); }));
/** /**
* Function to set the process.env * Mock fetch.ts
*
* @param version
* @param os
* @param extension_csv
* @param ini_values_csv
* @param coverage_driver
*/ */
function setEnv( jest.mock('../src/fetch', () => ({
version: string, fetch: jest.fn().mockImplementation(() => {
os: string, return {
extension_csv: string, data: '{ "latest": "8.3", "lowest": "8.1", "highest": "8.3", "nightly": "8.4", "5.x": "5.6" }'
ini_values_csv: string, };
coverage_driver: string, })
pecl: string }));
): void {
process.env['php-version'] = version;
process.env['RUNNER_OS'] = os;
process.env['extension-csv'] = extension_csv;
process.env['ini-values-csv'] = ini_values_csv;
process.env['coverage'] = coverage_driver;
process.env['pecl'] = pecl;
}
describe('Install', () => { describe('Install', () => {
it('Test install on windows', async () => { it.each`
setEnv('7.3', 'win32', '', '', '', ''); version | os | extension_csv | ini_file | ini_values_csv | coverage_driver | tools | output
// @ts-ignore ${'7.3'} | ${'darwin'} | ${''} | ${'production'} | ${''} | ${''} | ${''} | ${'bash darwin.sh 7.3 production'}
let script: string = await install.run(); ${'7.3'} | ${'darwin'} | ${'a, b'} | ${'development'} | ${'a=b'} | ${'x'} | ${''} | ${'bash darwin.sh 7.3 development install extensions set coverage driver edit php.ini'}
expect(script).toContain('initial script'); ${'7.4.1'} | ${'darwin'} | ${''} | ${'none'} | ${''} | ${''} | ${''} | ${'bash darwin.sh 7.4 none'}
expect(script).toContain('pwsh script.ps1 -version 7.3 -dir ' + __dirname); ${'8'} | ${'darwin'} | ${''} | ${''} | ${''} | ${''} | ${''} | ${'bash darwin.sh 8.0 production'}
${'8.0'} | ${'darwin'} | ${''} | ${'development'} | ${''} | ${''} | ${''} | ${'bash darwin.sh 8.0 development'}
setEnv('7.3', 'win32', 'a, b', 'a=b', 'x', ''); ${'8.1'} | ${'darwin'} | ${''} | ${'none'} | ${''} | ${''} | ${''} | ${'bash darwin.sh 8.1 none'}
// @ts-ignore ${'7.3'} | ${'linux'} | ${''} | ${'invalid'} | ${''} | ${''} | ${''} | ${'bash linux.sh 7.3 production'}
script = await install.run(); ${'7.3'} | ${'linux'} | ${'a, b'} | ${'development'} | ${'a=b'} | ${'x'} | ${'phpunit'} | ${'bash linux.sh 7.3 development install extensions add_tool set coverage driver edit php.ini'}
expect(script).toContain('initial script'); ${'latest'} | ${'linux'} | ${''} | ${'none'} | ${''} | ${''} | ${''} | ${'bash linux.sh 8.3 none'}
expect(script).toContain('install extensions'); ${'lowest'} | ${'linux'} | ${''} | ${'none'} | ${''} | ${''} | ${''} | ${'bash linux.sh 8.1 none'}
expect(script).toContain('edit php.ini'); ${'highest'} | ${'linux'} | ${''} | ${'none'} | ${''} | ${''} | ${''} | ${'bash linux.sh 8.3 none'}
expect(script).toContain('set coverage driver'); ${'nightly'} | ${'linux'} | ${''} | ${'none'} | ${''} | ${''} | ${''} | ${'bash linux.sh 8.4 none'}
expect(script).toContain('pwsh script.ps1 -version 7.3 -dir ' + __dirname); ${'7.0'} | ${'win32'} | ${''} | ${'production'} | ${''} | ${''} | ${''} | ${'pwsh win32.ps1 7.0 production'}
}); ${'7.3'} | ${'win32'} | ${''} | ${'development'} | ${''} | ${''} | ${''} | ${'pwsh win32.ps1 7.3 development'}
${'7.3'} | ${'win32'} | ${'a, b'} | ${'none'} | ${'a=b'} | ${'x'} | ${''} | ${'pwsh win32.ps1 7.3 none install extensions set coverage driver edit php.ini'}
it('Test install on linux', async () => { `(
setEnv('7.3', 'linux', '', '', '', ''); 'Test install on $os for $version with extensions=$extension_csv, ini_values=$ini_values_csv, coverage_driver=$coverage_driver, tools=$tools',
// @ts-ignore async ({
let script: string = await install.run(); version,
expect(script).toContain('initial script'); os,
expect(script).toContain('sh script.sh 7.3 '); extension_csv,
ini_file,
setEnv('7.3', 'linux', 'a, b', 'a=b', 'x', 'true'); ini_values_csv,
// @ts-ignore coverage_driver,
script = await install.run(); tools,
expect(script).toContain('initial script'); output
expect(script).toContain('install extensions'); }) => {
expect(script).toContain('edit php.ini'); process.env['php-version'] = version.toString();
expect(script).toContain('set coverage driver'); process.env['RUNNER_OS'] = os;
expect(script).toContain('sh script.sh 7.3 true'); process.env['extensions'] = extension_csv;
process.env['ini-file'] = ini_file;
setEnv('7.3', 'linux', 'a, b', 'a=b', 'x', 'true'); process.env['ini-values'] = ini_values_csv;
// @ts-ignore process.env['coverage'] = coverage_driver;
script = await install.run(); process.env['tools'] = tools;
expect(script).toContain('initial script'); expect(await install.run()).toBe(output);
expect(script).toContain('install extensions'); }
expect(script).toContain('edit php.ini'); );
expect(script).toContain('set coverage driver');
expect(script).toContain('sh script.sh 7.3 true');
});
it('Test install on darwin', async () => {
setEnv('7.3', 'darwin', '', '', '', '');
// @ts-ignore
let script: string = await install.run();
expect(script).toContain('initial script');
expect(script).toContain('sh script.sh 7.3 ' + __dirname);
setEnv('7.3', 'darwin', 'a, b', 'a=b', 'x', '');
// @ts-ignore
script = await install.run();
expect(script).toContain('initial script');
expect(script).toContain('install extensions');
expect(script).toContain('edit php.ini');
expect(script).toContain('set coverage driver');
expect(script).toContain('sh script.sh 7.3 ' + __dirname);
});
}); });

View File

@ -0,0 +1,50 @@
import * as packagist from '../src/packagist';
import nock from 'nock';
describe('search function', () => {
const mockResponse = {
packages: {
'test-package': [
{
require: {
php: '8.0.0'
},
version: '1.0.0'
},
{
version: '2.0.0'
}
]
}
};
test('should return the version if matching php version is found', async () => {
nock('https://repo.packagist.org')
.get('/p2/test-package.json')
.reply(200, mockResponse);
const result = await packagist.search('test-package', '8.0');
expect(result).toBe('1.0.0');
});
test('should return null if no matching php version is found', async () => {
nock('https://repo.packagist.org')
.get('/p2/test-package.json')
.reply(200, mockResponse);
const result = await packagist.search('test-package', '5.6');
expect(result).toBeNull();
});
test('should return null if fetch fails', async () => {
nock('https://repo.packagist.org').get('/p2/test-package.json').reply(404);
const result = await packagist.search('test-package', '8.0');
expect(result).toBeNull();
});
test('should return null if the response is empty', async () => {
nock('https://repo.packagist.org')
.get('/p2/test-package.json')
.reply(200, {error: true, data: '[]'});
const result = await packagist.search('test-package', '8.0');
expect(result).toBeNull();
});
});

715
__tests__/tools.test.ts Normal file
View File

@ -0,0 +1,715 @@
import * as fs from 'fs';
import * as tools from '../src/tools';
import {ToolData, ToolInput} from '../src/tools';
function getData(data: Partial<ToolData>): ToolData {
const tool = data.tool || 'tool';
const version = data.version || '';
return {
tool,
version,
url: data.url || '',
domain: data.domain || 'https://example.com',
extension: data.extension || '.phar',
os: data.os || 'linux',
php_version: data.php_version || '7.4',
release: data.release || [tool, version].join(':'),
repository: data.repository || '',
scope: data.scope || 'global',
type: data.type || 'phar',
fetch_latest: data.fetch_latest || 'false',
version_parameter: data.version_parameter || '-V',
version_prefix: data.version_prefix || '',
github: data.github || 'https://github.com',
prefix: data.prefix || 'releases',
verb: data.verb || 'download',
packagist: data.packagist || data.repository || '',
function: data.function,
alias: data.alias,
uri: data.uri,
error: data.error
};
}
/**
* Mock fetch.ts
*/
jest.mock('../src/fetch', () => ({
fetch: jest
.fn()
.mockImplementation(
async (url: string, token?: string): Promise<Record<string, string>> => {
if (url.includes('deployer')) {
return {
data: '[{"version": "1.2.3", "url": "https://deployer.org/releases/v1.2.3/deployer.phar"}]'
};
} else if (url.includes('atom') && !url.includes('no-')) {
return {
data: '"releases/tag/1.2.3", "releases/tag/3.2.1", "releases/tag/2.3.1"'
};
} else if (url.includes('no-data')) {
return {};
} else if (url.includes('no-release')) {
return {data: 'no-release'};
} else if (!token || token === 'valid_token') {
return {data: `[{"ref": "refs/tags/1.2.3", "url": "${url}"}]`};
} else if (token === 'beta_token') {
return {data: `[{"ref": "refs/tags/1.2.3beta1", "url": "${url}"}]`};
} else if (token === 'rc_token') {
return {
data: `[{"ref":"refs/tags/3.0.0RC1"},{"ref":"refs/tags/3.0.0RC2"}]`
};
} else if (token === 'non_semver_tags') {
return {
data: `[{"ref":"refs/tags/release-2025-09-18"},{"ref":"refs/tags/release-2025-09-17"}]`
};
} else if (token === 'undefined_ref') {
return {
data: `[{"url":"${url}"},{"ref":"refs/tags/v1.2.4","url":"${url}"}]`
};
} else if (token === 'multi_refs') {
return {
data: `[{"ref":"refs/tags/v1.2.3","url":"${url}"},{"ref":"refs/tags/1.2.4","url":"${url}"}]`
};
} else if (token === 'no_data') {
return {data: '[]'};
} else {
return {error: 'Invalid token'};
}
}
)
}));
jest.mock('../src/packagist', () => ({
search: jest
.fn()
.mockImplementation(
async (
package_name: string,
php_version: string
): Promise<string | null> => {
if (package_name === 'phpunit/phpunit') {
return php_version + '.0';
}
return null;
}
)
}));
describe('Tools tests', () => {
it.each`
token | version
${'invalid_token'} | ${'1.2'}
${'valid_token'} | ${'1.2.3'}
${'beta_token'} | ${'1.2.3beta1'}
${'undefined_ref'} | ${'1.2.4'}
${'multi_refs'} | ${'1.2.4'}
${'non_semver_tags'} | ${'release-2025-09-18'}
${''} | ${'1.2.3'}
`('checking getSemverVersion: $token', async ({token, version}) => {
process.env['GITHUB_TOKEN'] = token;
expect(
await tools.getSemverVersion(getData({tool: 'tool', version: '1.2'}))
).toBe(version);
});
it('checking getSemverVersion triggers ?? fallback via Map#get mock', async () => {
process.env['GITHUB_TOKEN'] = 'rc_token';
const spy = jest
.spyOn(Map.prototype as Map<string, string>, 'get')
.mockImplementation(function (
this: Map<string, string>,
key: string
): string | undefined {
if (key === '3.0.0-RC2') {
return undefined;
}
return Map.prototype.get.call(this, key);
});
const result = await tools.getSemverVersion(
getData({tool: 'tool', version: '3.0.0'})
);
expect(result).toBe('3.0.0-RC2');
spy.mockRestore();
});
it.each`
tool | fetch_latest | version
${'tool'} | ${'true'} | ${'3.2.1'}
${'tool-no-data'} | ${'true'} | ${'latest'}
${'tool-no-release'} | ${'true'} | ${'latest'}
${'tool'} | ${'false'} | ${'latest'}
`(
'checking getLatestVersion: $tool, $fetch_latest, $version',
async ({tool, fetch_latest, version}) => {
expect(
await tools.getLatestVersion(
getData({
tool: tool,
repository: 'user/' + tool,
fetch_latest: fetch_latest
})
)
).toBe(version);
}
);
it('checking getLatestVersion with fetch_latest=true but no repository', async () => {
expect(
await tools.getLatestVersion(
getData({
tool: 'tool',
repository: '',
fetch_latest: 'true'
})
)
).toBe('latest');
});
it.each`
version | tool | type | expected
${'latest'} | ${'tool'} | ${'phar'} | ${'latest'}
${'1'} | ${'composer'} | ${'phar'} | ${'1'}
${'1.2'} | ${'tool'} | ${'composer'} | ${'1.2.*'}
${'^1.2.3'} | ${'tool'} | ${'phar'} | ${'1.2.3'}
${'>=1.2.3'} | ${'tool'} | ${'phar'} | ${'1.2.3'}
${'>1.2.3'} | ${'tool'} | ${'phar'} | ${'1.2.3'}
${'1.2.3-ALPHA'} | ${'tool'} | ${'phar'} | ${'1.2.3-ALPHA'}
${'1.2.3-alpha'} | ${'tool'} | ${'phar'} | ${'1.2.3-alpha'}
${'1.2.3-beta'} | ${'tool'} | ${'phar'} | ${'1.2.3-beta'}
${'1.2.3-rc'} | ${'tool'} | ${'phar'} | ${'1.2.3-rc'}
${'1.2.3-dev'} | ${'tool'} | ${'phar'} | ${'1.2.3-dev'}
${'1.2.3-alpha1'} | ${'tool'} | ${'phar'} | ${'1.2.3-alpha1'}
${'1.2.3-alpha.1'} | ${'tool'} | ${'phar'} | ${'1.2.3-alpha.1'}
`(
'checking getVersion: $version, $tool, $type',
async ({version, tool, type, expected}) => {
expect(
await tools.getVersion(
version,
getData({tool: tool, version: version, type: type})
)
).toBe(expected);
}
);
it.each`
input | expected
${'tool'} | ${'tool'}
${'alias:1.2.3'} | ${'tool:1.2.3'}
${'tool:1.2.3'} | ${'tool:1.2.3'}
${'tool:^1.2.3'} | ${'tool:^1.2.3'}
${'tool:>=1.2.3'} | ${'tool:>=1.2.3'}
${'tool:>1.2.3'} | ${'tool:>1.2.3'}
${'tool:1.2.3-ALPHA'} | ${'tool:1.2.3-ALPHA'}
${'tool:1.2.3-beta'} | ${'tool:1.2.3-beta'}
${'tool:1.2.3-rc'} | ${'tool:1.2.3-rc'}
${'tool:1.2.3-dev'} | ${'tool:1.2.3-dev'}
${'tool:1.2.3-alpha1'} | ${'tool:1.2.3-alpha1'}
${'tool:1.2.3-alpha.1'} | ${'tool:1.2.3-alpha.1'}
${'user/tool:^1.2.3'} | ${'tool:^1.2.3'}
`('checking getRelease: $input', async ({input, expected}) => {
expect(
await tools.getRelease(input, getData({tool: 'tool', version: 'latest'}))
).toBe(expected);
});
it.each`
input_list | filtered_list
${'a, b'} | ${'composer, a, b'}
${'a, b, composer'} | ${'composer, a, b'}
${'a, b, composer:1.2.3'} | ${'composer:1.2.3, a, b'}
${'a, b, composer:v1.2.3'} | ${'composer:1.2.3, a, b'}
${'a, b, composer:snapshot'} | ${'composer:snapshot, a, b'}
${'a, b, composer:preview'} | ${'composer:preview, a, b'}
${'a, b, composer:1'} | ${'composer:1, a, b'}
${'a, b, composer:2'} | ${'composer:2, a, b'}
${'a, b, composer:v1'} | ${'composer:1, a, b'}
${'a, b, composer:v2'} | ${'composer:2, a, b'}
`('checking filterList $input_list', async ({input_list, filtered_list}) => {
expect(await tools.filterList(input_list.split(', '))).toStrictEqual(
filtered_list.split(', ')
);
});
it.each`
version | version_prefix | url_suffix
${'latest'} | ${'v'} | ${'latest/download/tool.phar'}
${'1.2.3'} | ${'v'} | ${'download/v1.2.3/tool.phar'}
${'1.2.3'} | ${''} | ${'download/1.2.3/tool.phar'}
`(
'checking getUrl: $version_prefix$version',
async ({version, version_prefix, url_suffix}) => {
const data = getData({
tool: 'tool',
version: version,
version_prefix: version_prefix
});
expect(await tools.getUrl(data)).toContain(url_suffix);
}
);
it('checking getUrl handles undefined version without double slash', async () => {
const data: ToolInput = {
...getData({
tool: 'cs2pr',
repository: 'staabm/annotate-pull-request-from-checkstyle',
domain: 'https://github.com'
}),
version: undefined
};
data.extension = '';
expect(await tools.getUrl(data)).toBe(
'https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr'
);
});
it.each`
version | version_prefix | url
${'latest'} | ${''} | ${'https://example.com/tool.phar'}
${'1.2.3'} | ${'v'} | ${'https://example.com/tool-v1.2.3.phar'}
`(
'checking getPharUrl: $version_prefix$version',
async ({version, version_prefix, url}) => {
const data = getData({
tool: 'tool',
version: version,
version_prefix: version_prefix
});
expect(await tools.getPharUrl(data)).toBe(url);
}
);
it.each`
os | script
${'linux'} | ${'add_tool https://example.com/tool.phar tool "-v"'}
${'darwin'} | ${'add_tool https://example.com/tool.phar tool "-v"'}
${'win32'} | ${'Add-Tool https://example.com/tool.phar tool "-v"'}
${'openbsd'} | ${'Platform openbsd is not supported'}
`('checking addArchive: $os', async ({os, script}) => {
const data = getData({
tool: 'tool',
version: 'latest',
version_parameter: JSON.stringify('-v'),
os: os,
url: 'https://example.com/tool.phar'
});
expect(await tools.addArchive(data)).toContain(script);
});
it.each`
os | script | scope
${'linux'} | ${'add_composer_tool tool tool:1.2.3 user/ global'} | ${'global'}
${'darwin'} | ${'add_composer_tool tool tool:1.2.3 user/ scoped'} | ${'scoped'}
${'win32'} | ${'Add-ComposerTool tool tool:1.2.3 user/ scoped'} | ${'scoped'}
${'openbsd'} | ${'Platform openbsd is not supported'} | ${'global'}
`('checking addPackage: $os, $scope', async ({os, script, scope}) => {
const data = getData({
tool: 'tool',
version: '1.2.3',
repository: 'user/tool',
os: os,
scope: scope
});
data['release'] = [data['tool'], data['version']].join(':');
expect(await tools.addPackage(data)).toContain(script);
});
it.each`
version | php_version | os | script
${'latest'} | ${'8.0'} | ${'linux'} | ${'add_tool https://github.com/phar-io/phive/releases/download/3.2.1/phive-3.2.1.phar phive'}
${'1.2.3'} | ${'8.0'} | ${'darwin'} | ${'add_tool https://github.com/phar-io/phive/releases/download/1.2.3/phive-1.2.3.phar phive'}
${'1.2.3'} | ${'7.4'} | ${'win32'} | ${'Add-Tool https://github.com/phar-io/phive/releases/download/0.15.3/phive-0.15.3.phar phive'}
${'1.2.3'} | ${'7.2'} | ${'win32'} | ${'Add-Tool https://github.com/phar-io/phive/releases/download/0.14.5/phive-0.14.5.phar phive'}
${'1.2.3'} | ${'7.1'} | ${'win32'} | ${'Add-Tool https://github.com/phar-io/phive/releases/download/0.13.5/phive-0.13.5.phar phive'}
${'latest'} | ${'5.6'} | ${'win32'} | ${'Add-Tool https://github.com/phar-io/phive/releases/download/0.12.1/phive-0.12.1.phar phive'}
${'latest'} | ${'5.5'} | ${'win32'} | ${'Phive is not supported on PHP 5.5'}
`(
'checking addPhive: $version, $php_version, $os',
async ({version, php_version, os, script}) => {
const data = getData({
tool: 'phive',
repository: 'phar-io/phive',
version_parameter: 'status',
version: version,
php_version: php_version,
os: os
});
script = await tools.addPhive(data);
expect(script).toContain(script);
}
);
it.each`
os | version | php_version | url
${'linux'} | ${'latest'} | ${'8.1'} | ${'https://get.blackfire.io/blackfire-player.phar'}
${'linux'} | ${'1.2.3'} | ${'7.4'} | ${'https://get.blackfire.io/blackfire-player-v1.2.3.phar'}
${'linux'} | ${'latest'} | ${'7.4'} | ${'https://get.blackfire.io/blackfire-player-v1.22.0.phar'}
${'linux'} | ${'latest'} | ${'5.5'} | ${'https://get.blackfire.io/blackfire-player-v1.9.3.phar'}
${'linux'} | ${'latest'} | ${'7.0'} | ${'https://get.blackfire.io/blackfire-player-v1.9.3.phar'}
${'win32'} | ${'latest'} | ${'7.0'} | ${'blackfire-player is not a windows tool'}
`(
'checking addBlackfirePlayer: $os, $version, $php_version',
async ({os, version, php_version, url}) => {
const data = getData({
os: os,
tool: 'blackfire-player',
domain: 'https://get.blackfire.io',
version_prefix: 'v',
version: version,
php_version: php_version
});
expect(await tools.addBlackfirePlayer(data)).toContain(url);
}
);
it.each`
version | url
${'latest'} | ${'https://deployer.org/deployer.phar'}
${'1.2.3'} | ${'https://deployer.org/releases/v1.2.3/deployer.phar'}
${'3.2.1'} | ${'Version missing in deployer manifest'}
`('checking addDeployer: $version', async ({version, url}) => {
const data = getData({
tool: 'deployer',
domain: 'https://deployer.org',
version: version
});
expect(await tools.addDeployer(data)).toContain(url);
});
it.each`
version | php_version | no_tool_cache | cache_url | source_url
${'latest'} | ${'7.4'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar'} | ${'https://getcomposer.org/composer-stable.phar'}
${'stable'} | ${'7.4'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar'} | ${'https://getcomposer.org/composer-stable.phar'}
${'snapshot'} | ${'7.4'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-snapshot.phar'} | ${'https://getcomposer.org/composer.phar'}
${'preview'} | ${'7.4'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-preview.phar'} | ${'https://getcomposer.org/composer-preview.phar'}
${'1'} | ${'7.4'} | ${'false'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-1.phar'} | ${'https://getcomposer.org/composer-1.phar'}
${'2'} | ${'7.4'} | ${'false'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-2.phar'} | ${'https://getcomposer.org/composer-2.phar'}
${'latest'} | ${'7.4'} | ${'true'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar'} | ${'https://getcomposer.org/composer-stable.phar'}
${'stable'} | ${'7.4'} | ${'true'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar'} | ${'https://getcomposer.org/composer-stable.phar'}
${'snapshot'} | ${'7.4'} | ${'true'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-snapshot.phar'} | ${'https://getcomposer.org/composer.phar'}
${'preview'} | ${'7.4'} | ${'true'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-preview.phar'} | ${'https://getcomposer.org/composer-preview.phar'}
${'1'} | ${'7.4'} | ${'false'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-1.phar'} | ${'https://getcomposer.org/composer-1.phar'}
${'2'} | ${'7.4'} | ${'false'} | ${'https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-2.phar'} | ${'https://getcomposer.org/composer-2.phar'}
${'latest'} | ${'7.4'} | ${'true'} | ${'https://artifacts.setup-php.com/composer/composer-7.4-stable.phar'} | ${'https://getcomposer.org/composer-stable.phar'}
${'stable'} | ${'7.4'} | ${'true'} | ${'https://artifacts.setup-php.com/composer/composer-7.4-stable.phar'} | ${'https://getcomposer.org/composer-stable.phar'}
${'snapshot'} | ${'7.4'} | ${'true'} | ${'https://artifacts.setup-php.com/composer/composer-7.4-snapshot.phar'} | ${'https://getcomposer.org/composer.phar'}
${'preview'} | ${'7.4'} | ${'true'} | ${'https://artifacts.setup-php.com/composer/composer-7.4-preview.phar'} | ${'https://getcomposer.org/composer-preview.phar'}
${'1'} | ${'7.4'} | ${'false'} | ${'https://artifacts.setup-php.com/composer/composer-7.4-1.phar'} | ${'https://getcomposer.org/composer-1.phar'}
${'2'} | ${'7.4'} | ${'false'} | ${'https://artifacts.setup-php.com/composer/composer-7.4-2.phar'} | ${'https://getcomposer.org/composer-2.phar'}
${'latest'} | ${'7.1'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-stable.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
${'stable'} | ${'7.1'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-stable.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
${'snapshot'} | ${'7.1'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-snapshot.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
${'preview'} | ${'7.1'} | ${'true'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-preview.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
${'1'} | ${'7.1'} | ${'false'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-1.phar'} | ${'https://getcomposer.org/composer-1.phar'}
${'2'} | ${'7.1'} | ${'false'} | ${'https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.1-2.phar'} | ${'https://getcomposer.org/download/latest-2.2.x/composer.phar'}
${'1.2.3'} | ${'7.4'} | ${'false'} | ${'https://github.com/composer/composer/releases/download/1.2.3/composer.phar'} | ${'https://getcomposer.org/download/1.2.3/composer.phar'}
${'1.2.3-RC1'} | ${'7.4'} | ${'false'} | ${'https://github.com/composer/composer/releases/download/1.2.3-RC1/composer.phar'} | ${'https://getcomposer.org/download/1.2.3-RC1/composer.phar'}
`(
'checking addComposer: $version, $php_version, $no_tool_cache',
async ({version, php_version, no_tool_cache, cache_url, source_url}) => {
const data = getData({
tool: 'composer',
php_version: php_version,
domain: 'https://getcomposer.org',
repository: 'composer/composer',
version: version
});
process.env['no_tools_cache'] = no_tool_cache;
expect(await tools.addComposer(data)).toContain(source_url);
if (no_tool_cache !== 'true') {
expect(await tools.addComposer(data)).toContain(cache_url);
}
}
);
it.each`
version | uri
${'latest'} | ${'wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true'}
${'1.2.3'} | ${'wp-cli/wp-cli/releases/download/v1.2.3/wp-cli-1.2.3.phar'}
`('checking addWPCLI: $version', async ({version, uri}) => {
const data = getData({
tool: 'wp-cli',
repository: 'wp-cli/wp-cli',
php_version: '7.4',
version_prefix: 'v',
version: version
});
expect(await tools.addWPCLI(data)).toContain(uri);
});
it.each`
tool | os | script
${'phpize'} | ${'linux'} | ${'add_devtools phpize'}
${'php-config'} | ${'linux'} | ${'add_devtools php-config'}
${'phpize'} | ${'darwin'} | ${'add_devtools phpize'}
${'php-config'} | ${'darwin'} | ${'add_devtools php-config'}
${'phpize'} | ${'win32'} | ${'Add-Log "$tick" "phpize" "phpize is not a windows tool"'}
${'php-config'} | ${'win32'} | ${'Add-Log "$tick" "php-config" "php-config is not a windows tool"'}
${'phpize'} | ${'openbsd'} | ${'Platform openbsd is not supported'}
`('checking addDevTools: $tool, $os', async ({tool, os, script}) => {
const data = getData({
version: '7.4',
tool: tool,
os: os
});
expect(await tools.addDevTools(data)).toContain(script);
});
it.each([
[
'blackfire, blackfire-player, box, churn, cs2pr, flex, grpc_php_plugin, mago, name-collision-detector, parallel-lint, php-cs-fixer, php-scoper, phpDocumentor, phplint, phpstan, phpunit, pecl, phing, phinx, phinx:1.2.3, phive, phpunit-bridge, phpunit-polyfills, pint, php-config, phpize, protoc, symfony, vapor, wp, pie',
[
'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://artifacts.setup-php.com/composer/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer',
'add_blackfire',
'add_tool https://get.blackfire.io/blackfire-player-v1.22.0.phar blackfire-player "-V"',
'add_tool https://github.com/box-project/box/releases/latest/download/box.phar box "--version"',
'add_tool https://github.com/bmitch/churn-php/releases/latest/download/churn.phar churn "-V"',
'add_tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr cs2pr "-V"',
'add_composer_tool flex flex symfony/ global',
'add_grpc_php_plugin latest',
'add_mago',
'add_composer_tool name-collision-detector name-collision-detector shipmonk/ scoped',
'add_tool https://github.com/php-parallel-lint/PHP-Parallel-Lint/releases/latest/download/parallel-lint.phar parallel-lint "--version"',
'add_tool https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/download/v3.2.1/php-cs-fixer.phar php-cs-fixer "-V"',
'add_tool https://github.com/humbug/php-scoper/releases/latest/download/php-scoper.phar php-scoper "--version"',
'add_tool https://github.com/phpDocumentor/phpDocumentor/releases/latest/download/phpDocumentor.phar phpDocumentor "--version"',
'add_composer_tool phplint phplint overtrue/',
'add_tool https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar phpstan "-V"',
'add_tool https://phar.phpunit.de/phpunit-7.4.0.phar,https://phar.phpunit.de/phpunit-7.phar phpunit "--version"',
'add_pecl',
'add_tool https://www.phing.info/get/phing-latest.phar phing "-v"',
'add_composer_tool phinx phinx robmorgan/ scoped',
'add_composer_tool phinx phinx:1.2.3 robmorgan/ scoped',
'add_tool https://github.com/phar-io/phive/releases/download/0.15.3/phive-0.15.3.phar phive "status"',
'add_composer_tool phpunit-bridge phpunit-bridge symfony/ global',
'add_composer_tool phpunit-polyfills phpunit-polyfills yoast/ global',
'add_tool https://github.com/laravel/pint/releases/latest/download/pint.phar pint "-V"',
'add_devtools php-config',
'add_devtools phpize',
'add_protoc latest',
'add_symfony latest',
'add_composer_tool vapor-cli vapor-cli laravel/ scoped',
'add_tool https://github.com/wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true wp-cli "--version"',
'add_tool https://github.com/php/pie/releases/latest/download/pie.phar pie "-V"'
]
]
])('checking addTools on linux', async (tools_csv, scripts) => {
const expected = await tools.addTools(tools_csv, '7.4', 'linux');
scripts.forEach(script => {
expect(expected).toContain(script);
});
});
it.each([
[
'backward-compatibility-check, behat, blackfire, blackfire-player, churn, composer-dependency-analyser, composer-normalize, composer-require-checker, composer-unused, cs2pr:1.2.3, ecs, flex, grpc_php_plugin:1.2.3, infection, mago:0.26.1, name-collision-detector, phan, phan:1.2.3, phing:1.2.3, phinx, phive:1.2.3, php-config, phpcbf, phpcpd, phpcs, phpdoc, phpize, phpmd, phpspec, phpunit-bridge:5.6, phpunit-polyfills:1.0.1, protoc:v1.2.3, psalm, rector, symfony-cli, vapor-cli, wp-cli, pie',
[
'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://artifacts.setup-php.com/composer/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer',
'add_composer_tool behat behat behat/ scoped',
'add_blackfire',
'add_tool https://get.blackfire.io/blackfire-player-v1.22.0.phar blackfire-player "-V"',
'add_tool https://github.com/bmitch/churn-php/releases/latest/download/churn.phar churn "-V"',
'add_tool https://github.com/ergebnis/composer-normalize/releases/latest/download/composer-normalize.phar composer-normalize "diagnose"',
'add_composer_tool composer-dependency-analyser composer-dependency-analyser shipmonk/ scoped',
'add_composer_tool composer-require-checker composer-require-checker maglnet/ scoped',
'add_tool https://github.com/composer-unused/composer-unused/releases/latest/download/composer-unused.phar composer-unused "-V"',
'add_tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/download/1.2.3/cs2pr cs2pr "-V"',
'add_composer_tool flex flex symfony/ global',
'add_grpc_php_plugin 1.2.3',
'add_tool https://github.com/infection/infection/releases/latest/download/infection.phar infection "-V"',
'add_mago 0.26.1',
'add_composer_tool name-collision-detector name-collision-detector shipmonk/ scoped',
'add_tool https://github.com/phan/phan/releases/latest/download/phan.phar phan "-v"',
'add_tool https://github.com/phan/phan/releases/download/1.2.3/phan.phar phan "-v"',
'add_tool https://www.phing.info/get/phing-1.2.3.phar,https://github.com/phingofficial/phing/releases/download/1.2.3/phing-1.2.3.phar phing "-v"',
'add_composer_tool phinx phinx robmorgan/ scoped',
'add_tool https://github.com/phar-io/phive/releases/download/0.15.3/phive-0.15.3.phar phive',
'add_devtools php-config',
'add_tool https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/latest/download/phpcbf.phar phpcbf "--version"',
'add_tool https://phar.phpunit.de/phpcpd.phar phpcpd "--version"',
'add_tool https://github.com/PHPCSStandards/PHP_CodeSniffer/releases/latest/download/phpcs.phar phpcs "--version"',
'add_tool https://github.com/phpDocumentor/phpDocumentor/releases/latest/download/phpDocumentor.phar phpDocumentor "--version"',
'add_devtools phpize',
'add_tool https://github.com/phpmd/phpmd/releases/latest/download/phpmd.phar phpmd "--version"',
'add_tool https://github.com/phpspec/phpspec/releases/latest/download/phpspec.phar phpspec "-V"',
'add_composer_tool phpunit-bridge phpunit-bridge:5.6.* symfony/ global',
'add_composer_tool phpunit-polyfills phpunit-polyfills:1.0.1 yoast/ global',
'add_protoc 1.2.3',
'add_tool https://github.com/vimeo/psalm/releases/latest/download/psalm.phar psalm "-v"',
'add_composer_tool rector rector rector/ scoped',
'add_composer_tool backward-compatibility-check backward-compatibility-check roave/ scoped',
'add_symfony latest',
'add_composer_tool vapor-cli vapor-cli laravel/ scoped',
'add_tool https://github.com/wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true wp-cli "--version"',
'add_composer_tool easy-coding-standard easy-coding-standard symplify/ scoped',
'add_tool https://github.com/php/pie/releases/latest/download/pie.phar pie "-V"'
]
]
])('checking addTools on darwin', async (tools_csv, scripts) => {
const expected = await tools.addTools(tools_csv, '7.4', 'darwin');
scripts.forEach(script => {
expect(expected).toContain(script);
});
});
it.each([
[
'blackfire, blackfire-player:1.2.3, cs2pr, churn, deployer, does_not_exist, flex, mago, name-collision-detector, phinx, phive:0.13.2, php-config, phpize, phpmd, simple-phpunit, symfony, wp, pie',
[
'Add-Tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://artifacts.setup-php.com/composer/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer',
'Add-Blackfire',
'blackfire-player is not a windows tool',
'Add-Tool https://github.com/staabm/annotate-pull-request-from-checkstyle/releases/latest/download/cs2pr cs2pr "-V"',
'Add-Tool https://github.com/bmitch/churn-php/releases/latest/download/churn.phar churn "-V"',
'Add-Tool https://deployer.org/deployer.phar deployer "-V"',
'Tool does_not_exist is not supported',
'Add-ComposerTool flex flex symfony/ global',
'Add-Mago',
'Add-ComposerTool name-collision-detector name-collision-detector shipmonk/ scoped',
'Add-ComposerTool phinx phinx robmorgan/ scoped',
'Add-Tool https://github.com/phar-io/phive/releases/download/0.15.3/phive-0.15.3.phar phive "status"',
'php-config is not a windows tool',
'phpize is not a windows tool',
'Add-Tool https://github.com/phpmd/phpmd/releases/latest/download/phpmd.phar phpmd "--version"',
'Add-ComposerTool phpunit-bridge phpunit-bridge symfony/ global',
'Add-Symfony',
'Add-Tool https://github.com/wp-cli/builds/blob/gh-pages/phar/wp-cli.phar?raw=true wp-cli "--version"',
'Add-Tool https://github.com/php/pie/releases/latest/download/pie.phar pie "-V"'
]
]
])('checking addTools on Windows', async (tools_csv, scripts) => {
const expected = await tools.addTools(tools_csv, '7.4', 'win32');
scripts.forEach(script => {
expect(expected).toContain(script);
});
});
it.each([
[
'composer:v1, codeception/codeception, prestissimo, hirak/prestissimo, composer-prefetcher, narrowspark/automatic-composer-prefetcher, phinx: 1.2, robmorgan/phinx: ^1.2, user/tool:1.2.3, user/tool:~1.2',
[
'Add-Tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-1.phar,https://artifacts.setup-php.com/composer/composer-7.4-1.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-1.phar,https://getcomposer.org/composer-1.phar composer',
'Add-ComposerTool codeception codeception codeception/ global',
'Add-ComposerTool prestissimo prestissimo hirak/ global',
'Add-ComposerTool automatic-composer-prefetcher automatic-composer-prefetcher narrowspark/ global',
'Add-ComposerTool phinx phinx:1.2.* robmorgan/ scoped',
'Add-ComposerTool phinx phinx:^1.2 robmorgan/ global',
'Add-ComposerTool tool tool:1.2.3 user/ global',
'Add-ComposerTool tool tool:~1.2 user/ global'
]
]
])(
'checking addTools with composer tool using user/tool as input',
async (tools_csv, scripts) => {
const expected = await tools.addTools(tools_csv, '7.4', 'win32');
scripts.forEach(script => {
expect(expected).toContain(script);
});
}
);
it.each`
version | os | uri
${'latest'} | ${'linux'} | ${'releases/latest/download/castor.linux-amd64.phar'}
${'0.5.1'} | ${'linux'} | ${'releases/download/v0.5.1/castor.linux-amd64.phar'}
${'latest'} | ${'darwin'} | ${'releases/latest/download/castor.darwin-amd64.phar'}
${'0.5.1'} | ${'darwin'} | ${'releases/download/v0.5.1/castor.darwin-amd64.phar'}
${'latest'} | ${'win32'} | ${'releases/latest/download/castor.windows-amd64.phar'}
${'0.5.1'} | ${'win32'} | ${'releases/download/v0.5.1/castor.windows-amd64.phar castor -V'}
${'latest'} | ${'openbsd'} | ${'Platform openbsd is not supported'}
`('checking addCastor: $version, $os', async ({version, os, uri}) => {
const data = getData({
tool: 'castor',
php_version: '8.1',
version_prefix: 'v',
version: version,
os: os
});
if (os === 'win32' && version === '0.5.1') {
fs.writeFileSync('castor.php', '');
expect(await tools.addCastor(data)).toContain(uri);
fs.unlinkSync('castor.php');
} else {
expect(await tools.addCastor(data)).toContain(uri);
}
});
it.each`
tools_csv | script
${'none'} | ${''}
${'none, phpunit'} | ${'\nstep_log "Setup Tools"\nadd_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-stable.phar,https://artifacts.setup-php.com/composer/composer-7.4-stable.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-stable.phar,https://getcomposer.org/composer-stable.phar composer latest\n\nadd_tool https://phar.phpunit.de/phpunit-7.4.0.phar,https://phar.phpunit.de/phpunit-7.phar phpunit "--version"'}
${'composer:preview'} | ${'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-preview.phar,https://artifacts.setup-php.com/composer/composer-7.4-preview.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-preview.phar,https://getcomposer.org/composer-preview.phar composer preview'}
${'composer, composer:v1'} | ${'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-1.phar,https://artifacts.setup-php.com/composer/composer-7.4-1.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-1.phar,https://getcomposer.org/composer-1.phar composer'}
${'composer:v1, composer:preview, composer:snapshot'} | ${'add_tool https://github.com/shivammathur/composer-cache/releases/latest/download/composer-7.4-snapshot.phar,https://artifacts.setup-php.com/composer/composer-7.4-snapshot.phar,https://dl.cloudsmith.io/public/shivammathur/composer-cache/raw/files/composer-7.4-snapshot.phar,https://getcomposer.org/composer.phar composer snapshot'}
`('checking composer setup: $tools_csv', async ({tools_csv, script}) => {
expect(await tools.addTools(tools_csv, '7.4', 'linux')).toContain(script);
});
it.each`
tools_csv | token | script
${'cs2pr:1.2'} | ${'invalid_token'} | ${'add_log "$cross" "cs2pr" "Invalid token"'}
${'phpunit:1.2'} | ${'invalid_token'} | ${'add_log "$cross" "phpunit" "Invalid token"'}
${'phpunit:0.1'} | ${'no_data'} | ${'add_log "$cross" "phpunit" "No version found with prefix 0.1."'}
`('checking error: $tools_csv', async ({tools_csv, token, script}) => {
process.env['GITHUB_TOKEN'] = token;
expect(await tools.addTools(tools_csv, '7.4', 'linux')).toContain(script);
});
it('checking error when custom-function tool is missing function field', async () => {
const brokenToolsJson = JSON.stringify({
composer: {
type: 'custom-function',
domain: 'https://getcomposer.org',
repository: 'composer/composer',
function: 'composer'
},
'broken-tool': {
type: 'custom-function'
}
});
let result: string = '';
await jest.isolateModulesAsync(async () => {
jest.doMock('fs', () => ({
...jest.requireActual('fs'),
readFileSync: (
filePath: fs.PathOrFileDescriptor,
options?: unknown
) => {
if (String(filePath).includes('tools.json')) {
return brokenToolsJson;
}
return (jest.requireActual('fs') as typeof fs).readFileSync(
filePath,
options as fs.ObjectEncodingOptions & {flag?: string}
);
}
}));
const isolatedTools = await import('../src/tools');
result = await isolatedTools.addTools('broken-tool', '7.4', 'linux');
});
expect(result).toContain(
'add_log "$cross" "broken-tool" "broken-tool has no function defined. Please report this issue."'
);
});
it.each`
tools_csv | php_version | resolved
${'phpunit'} | ${'8.2'} | ${'/phpunit-8.2.0.phar'}
${'phpunit'} | ${'8.1'} | ${'/phpunit-8.1.0.phar'}
${'phpunit'} | ${'8.0'} | ${'/phpunit-8.0.0.phar'}
${'phpunit'} | ${'7.3'} | ${'/phpunit-7.3.0.phar'}
${'phpunit'} | ${'7.2'} | ${'/phpunit-7.2.0.phar'}
${'phpunit'} | ${'7.1'} | ${'/phpunit-7.1.0.phar'}
${'phpunit'} | ${'7.0'} | ${'/phpunit-7.0.0.phar'}
`(
'checking error: $tools_csv',
async ({tools_csv, php_version, resolved}) => {
expect(await tools.addTools(tools_csv, php_version, 'linux')).toContain(
resolved
);
}
);
});

View File

@ -1,54 +1,73 @@
import * as fs from 'fs'; import fs from 'fs';
import * as path from 'path'; import * as path from 'path';
import * as utils from '../src/utils'; import * as utils from '../src/utils';
import * as fetchModule from '../src/fetch';
jest.mock('@actions/core', () => ({
getInput: jest.fn().mockImplementation(key => {
return ['setup-php'].indexOf(key) !== -1 ? key : '';
})
}));
async function cleanup(path: string): Promise<void> {
fs.unlink(path, error => {
if (error) {
console.log(error);
}
});
}
describe('Utils tests', () => { describe('Utils tests', () => {
it('checking getInput', async () => { it('checking readEnv', async () => {
process.env['test'] = 'setup-php'; process.env['test'] = 'setup-php';
process.env['undefined'] = ''; process.env['test-hyphen'] = 'setup-php';
expect(await utils.getInput('test', false)).toBe('setup-php'); expect(await utils.readEnv('test')).toBe('setup-php');
expect(await utils.getInput('undefined', false)).toBe(''); expect(await utils.readEnv('TEST')).toBe('setup-php');
expect(await utils.getInput('setup-php', false)).toBe('setup-php'); expect(await utils.readEnv('test_hyphen')).toBe('setup-php');
expect(await utils.getInput('DoesNotExist', false)).toBe(''); expect(await utils.readEnv('TEST_HYPHEN')).toBe('setup-php');
expect(await utils.readEnv('undefined')).toBe('');
}); });
it('checking getVersion', async () => { it('checking getInput', async () => {
process.env['php-version'] = '7.3'; process.env['test'] = 'setup-php';
expect(await utils.getVersion()).toBe('7.3'); process.env['INPUT_SETUP-PHP'] = 'setup-php';
process.env['php-version'] = '7.4'; expect(await utils.getInput('test', false)).toBe('setup-php');
expect(await utils.getVersion()).toBe('7.4'); expect(await utils.getInput('setup-php', false)).toBe('setup-php');
process.env['php-version'] = '8.0'; expect(await utils.getInput('DoesNotExist', false)).toBe('');
expect(await utils.getVersion()).toBe('7.4'); await expect(async () => {
process.env['php-version'] = '8.0-dev'; await utils.getInput('DoesNotExist', true);
expect(await utils.getVersion()).toBe('7.4'); }).rejects.toThrow('Input required and not supplied: DoesNotExist');
process.env['php-version'] = '7.4nightly'; delete process.env['INPUT_SETUP-PHP'];
expect(await utils.getVersion()).toBe('7.4'); });
process.env['php-version'] = '7.4snapshot';
expect(await utils.getVersion()).toBe('7.4'); it('checking getManifestURL', async () => {
process.env['php-version'] = 'nightly'; for (const url of await utils.getManifestURLS()) {
expect(await utils.getVersion()).toBe('7.4'); expect(url).toContain('php-versions.json');
}
});
it('checking parseVersion', async () => {
const fetchSpy = jest
.spyOn(fetchModule, 'fetch')
.mockResolvedValue({data: '{ "latest": "8.1", "5.x": "5.6" }'});
expect(await utils.parseVersion('latest')).toBe('8.1');
expect(await utils.parseVersion('7')).toBe('7.0');
expect(await utils.parseVersion('7.4')).toBe('7.4');
expect(await utils.parseVersion('5.x')).toBe('5.6');
expect(await utils.parseVersion('4.x')).toBe(undefined);
fetchSpy.mockReset();
fetchSpy.mockResolvedValueOnce({}).mockResolvedValueOnce({});
await expect(utils.parseVersion('latest')).rejects.toThrow(
'Could not fetch the PHP version manifest.'
);
expect(fetchSpy).toHaveBeenCalledTimes(2);
});
it('checking parseIniFile', async () => {
expect(await utils.parseIniFile('production')).toBe('production');
expect(await utils.parseIniFile('development')).toBe('development');
expect(await utils.parseIniFile('none')).toBe('none');
expect(await utils.parseIniFile('php.ini-production')).toBe('production');
expect(await utils.parseIniFile('php.ini-development')).toBe('development');
expect(await utils.parseIniFile('invalid')).toBe('production');
}); });
it('checking asyncForEach', async () => { it('checking asyncForEach', async () => {
const array: Array<string> = ['a', 'b', 'c']; const array: Array<string> = ['a', 'b', 'c'];
let concat = ''; let concat = '';
await utils.asyncForEach(array, async function(str: string): Promise<void> { await utils.asyncForEach(
concat += str; array,
}); async function (str: string): Promise<void> {
concat += str;
}
);
expect(concat).toBe('abc'); expect(concat).toBe('abc');
}); });
@ -59,58 +78,40 @@ describe('Utils tests', () => {
expect(await utils.color('warning')).toBe('33'); expect(await utils.color('warning')).toBe('33');
}); });
it('checking readScripts', async () => {
const darwin: string = fs.readFileSync(
path.join(__dirname, '../src/scripts/darwin.sh'),
'utf8'
);
const linux: string = fs.readFileSync(
path.join(__dirname, '../src/scripts/linux.sh'),
'utf8'
);
const win32: string = fs.readFileSync(
path.join(__dirname, '../src/scripts/win32.ps1'),
'utf8'
);
expect(await utils.readScript('darwin.sh', '7.4', 'darwin')).toBe(darwin);
expect(await utils.readScript('darwin.sh', '7.3', 'darwin')).toBe(darwin);
expect(await utils.readScript('linux.sh', '7.4', 'linux')).toBe(linux);
expect(await utils.readScript('linux.sh', '7.3', 'linux')).toBe(linux);
expect(await utils.readScript('win32.ps1', '7.4', 'win32')).toBe(win32);
expect(await utils.readScript('win32.ps1', '7.3', 'win32')).toBe(win32);
});
it('checking writeScripts', async () => {
const testString = 'sudo apt-get install php';
const runner_dir: string = process.env['RUNNER_TOOL_CACHE'] || '';
const script_path: string = path.join(runner_dir, 'test.sh');
await utils.writeScript('test.sh', testString);
await fs.readFile(script_path, function(error: Error | null, data: Buffer) {
expect(testString).toBe(data.toString());
});
await cleanup(script_path);
});
it('checking extensionArray', async () => { it('checking extensionArray', async () => {
expect(await utils.extensionArray('a, b, php_c, php-d')).toEqual([ expect(
'a', await utils.extensionArray('a, :b, php_c, none, php-d, Zend e, :Zend f')
'b', ).toEqual(['none', 'a', ':b', 'c', 'd', 'e', ':f']);
'c',
'd'
]);
expect(await utils.extensionArray('')).toEqual([]); expect(await utils.extensionArray('')).toEqual([]);
expect(await utils.extensionArray(' ')).toEqual([]); expect(await utils.extensionArray(' ')).toEqual([]);
}); });
it('checking INIArray', async () => { it('checking INIArray', async () => {
expect(await utils.INIArray('a=1, b=2, c=3')).toEqual([ expect(await utils.CSVArray('a=1, b=2, c=3')).toEqual([
'a=1', 'a=1',
'b=2', 'b=2',
'c=3' 'c=3'
]); ]);
expect(await utils.INIArray('')).toEqual([]); expect(await utils.CSVArray('\'a=1,2\', "b=3, 4", c=5, d=~e~')).toEqual([
expect(await utils.INIArray(' ')).toEqual([]); 'a=1,2',
'b=3, 4',
'c=5',
"d='~e~'"
]);
expect(await utils.CSVArray('a=\'1,2\', b="3, 4", c=5')).toEqual([
'a=1,2',
'b=3, 4',
'c=5'
]);
expect(
await utils.CSVArray('a=E_ALL, b=E_ALL & ~ E_ALL, c="E_ALL", d=\'E_ALL\'')
).toEqual(['a=E_ALL', 'b=E_ALL & ~ E_ALL', 'c=E_ALL', 'd=E_ALL']);
expect(
await utils.CSVArray('a="b=c;d=e", b=\'c=d,e\', c="g=h,i=j", d=g=h, a===')
).toEqual(["a='b=c;d=e'", "b='c=d,e'", "c='g=h,i=j'", "d='g=h'", "a='=='"]);
expect(await utils.CSVArray('')).toEqual([]);
expect(await utils.CSVArray(' ')).toEqual([]);
}); });
it('checking log', async () => { it('checking log', async () => {
@ -143,8 +144,8 @@ describe('Utils tests', () => {
expect(step_log).toEqual('step_log "Test message"'); expect(step_log).toEqual('step_log "Test message"');
step_log = await utils.stepLog(message, 'darwin'); step_log = await utils.stepLog(message, 'darwin');
expect(step_log).toEqual('step_log "Test message"'); expect(step_log).toEqual('step_log "Test message"');
step_log = await utils.stepLog(message, 'fedora'); step_log = await utils.stepLog(message, 'openbsd');
expect(step_log).toContain('Platform fedora is not supported'); expect(step_log).toContain('Platform openbsd is not supported');
let add_log: string = await utils.addLog( let add_log: string = await utils.addLog(
'tick', 'tick',
@ -157,8 +158,8 @@ describe('Utils tests', () => {
expect(add_log).toEqual('add_log "tick" "xdebug" "enabled"'); expect(add_log).toEqual('add_log "tick" "xdebug" "enabled"');
add_log = await utils.addLog('tick', 'xdebug', 'enabled', 'darwin'); add_log = await utils.addLog('tick', 'xdebug', 'enabled', 'darwin');
expect(add_log).toEqual('add_log "tick" "xdebug" "enabled"'); expect(add_log).toEqual('add_log "tick" "xdebug" "enabled"');
add_log = await utils.addLog('tick', 'xdebug', 'enabled', 'fedora'); add_log = await utils.addLog('tick', 'xdebug', 'enabled', 'openbsd');
expect(add_log).toContain('Platform fedora is not supported'); expect(add_log).toContain('Platform openbsd is not supported');
}); });
it('checking getExtensionPrefix', async () => { it('checking getExtensionPrefix', async () => {
@ -167,6 +168,7 @@ describe('Utils tests', () => {
); );
expect(await utils.getExtensionPrefix('xsl')).toEqual('extension'); expect(await utils.getExtensionPrefix('xsl')).toEqual('extension');
expect(await utils.getExtensionPrefix('xdebug')).toEqual('zend_extension'); expect(await utils.getExtensionPrefix('xdebug')).toEqual('zend_extension');
expect(await utils.getExtensionPrefix('xdebug3')).toEqual('zend_extension');
expect(await utils.getExtensionPrefix('opcache')).toEqual('zend_extension'); expect(await utils.getExtensionPrefix('opcache')).toEqual('zend_extension');
}); });
@ -174,8 +176,144 @@ describe('Utils tests', () => {
expect(await utils.suppressOutput('win32')).toEqual(' >$null 2>&1'); expect(await utils.suppressOutput('win32')).toEqual(' >$null 2>&1');
expect(await utils.suppressOutput('linux')).toEqual(' >/dev/null 2>&1'); expect(await utils.suppressOutput('linux')).toEqual(' >/dev/null 2>&1');
expect(await utils.suppressOutput('darwin')).toEqual(' >/dev/null 2>&1'); expect(await utils.suppressOutput('darwin')).toEqual(' >/dev/null 2>&1');
expect(await utils.suppressOutput('fedora')).toContain( expect(await utils.suppressOutput('openbsd')).toContain(
'Platform fedora is not supported' 'Platform openbsd is not supported'
); );
}); });
it('checking getUnsupportedLog', async () => {
expect(await utils.getUnsupportedLog('ext', '5.6', 'linux')).toContain(
'add_log "$cross" "ext" "ext is not supported on PHP 5.6"'
);
});
it('checking getCommand', async () => {
expect(await utils.getCommand('linux', 'tool')).toBe('add_tool ');
expect(await utils.getCommand('darwin', 'tool')).toBe('add_tool ');
expect(await utils.getCommand('win32', 'tool')).toBe('Add-Tool ');
expect(await utils.getCommand('win32', 'tool_name')).toBe('Add-ToolName ');
expect(await utils.getCommand('openbsd', 'tool')).toContain(
'Platform openbsd is not supported'
);
});
it('checking joins', async () => {
expect(await utils.joins('a', 'b', 'c')).toBe('a b c');
});
it('checking scriptExtension', async () => {
expect(await utils.scriptExtension('linux')).toBe('.sh');
expect(await utils.scriptExtension('darwin')).toBe('.sh');
expect(await utils.scriptExtension('win32')).toBe('.ps1');
expect(await utils.scriptExtension('openbsd')).toContain(
'Platform openbsd is not supported'
);
});
it('checking scriptTool', async () => {
expect(await utils.scriptTool('linux')).toBe('bash ');
expect(await utils.scriptTool('darwin')).toBe('bash ');
expect(await utils.scriptTool('win32')).toBe('pwsh ');
expect(await utils.scriptTool('openbsd')).toContain(
'Platform openbsd is not supported'
);
});
it('checking customPackage', async () => {
const script_path: string = path.join('ext', 'pkg.sh');
expect(await utils.customPackage('pkg', 'ext', '1.2.3', 'linux')).toContain(
script_path + '\nadd_pkg 1.2.3'
);
expect(
await utils.customPackage('pdo_pkg', 'ext', '1.2.3', 'linux')
).toContain(script_path + '\nadd_pkg 1.2.3');
expect(
await utils.customPackage('pkg8', 'ext', '1.2.3', 'linux')
).toContain(script_path + '\nadd_pkg 1.2.3');
});
it('checking parseExtensionSource', async () => {
expect(
await utils.parseExtensionSource(
'ext-org-name/repo-name@release',
'extension'
)
).toContain(
'\nadd_extension_from_source ext https://github.com org-name repo-name release extension'
);
expect(
await utils.parseExtensionSource(
'ext-https://sub.domain.tld/org/repo@release',
'extension'
)
).toContain(
'\nadd_extension_from_source ext https://sub.domain.tld org repo release extension'
);
expect(
await utils.parseExtensionSource(
'ext-https://sub.domain.XN--tld/org/repo@release',
'extension'
)
).toContain(
'\nadd_extension_from_source ext https://sub.domain.XN--tld org repo release extension'
);
});
it('checking readPHPVersion', async () => {
expect(await utils.readPHPVersion()).toBe('latest');
process.env['php-version-file'] = '.phpenv-version';
await expect(utils.readPHPVersion()).rejects.toThrow(
"Could not find '.phpenv-version' file."
);
const existsSync = jest.spyOn(fs, 'existsSync').mockImplementation();
const readFileSync = jest.spyOn(fs, 'readFileSync').mockImplementation();
existsSync.mockReturnValue(true);
readFileSync.mockReturnValue('8.1');
expect(await utils.readPHPVersion()).toBe('8.1');
process.env['php-version'] = '8.2';
expect(await utils.readPHPVersion()).toBe('8.2');
delete process.env['php-version-file'];
delete process.env['php-version'];
existsSync.mockReturnValue(true);
readFileSync.mockReturnValue('ruby 1.2.3\nphp 8.4.2\nnode 20.1.2');
expect(await utils.readPHPVersion()).toBe('8.4.2');
existsSync.mockReturnValue(true);
readFileSync.mockReturnValue('setup-php');
expect(await utils.readPHPVersion()).toBe('setup-php');
existsSync.mockReturnValueOnce(false).mockReturnValueOnce(true);
readFileSync.mockReturnValue(
'{ "platform-overrides": { "php": "7.3.25" } }'
);
expect(await utils.readPHPVersion()).toBe('7.3.25');
existsSync
.mockReturnValueOnce(false)
.mockReturnValueOnce(false)
.mockReturnValueOnce(true);
readFileSync.mockReturnValue(
'{ "config": { "platform": { "php": "7.4.33" } } }'
);
expect(await utils.readPHPVersion()).toBe('7.4.33');
existsSync.mockClear();
readFileSync.mockClear();
});
it('checking setVariable', async () => {
let script: string = await utils.setVariable('var', 'command', 'linux');
expect(script).toEqual('\nvar="$(command)"\n');
script = await utils.setVariable('var', 'command', 'darwin');
expect(script).toEqual('\nvar="$(command)"\n');
script = await utils.setVariable('var', 'command', 'win32');
expect(script).toEqual('\n$var = command\n');
});
}); });

View File

@ -1,25 +1,38 @@
name: 'Setup PHP Action' name: 'Setup PHP Action'
author: shivammathur author: shivammathur
description: 'GitHub action to setup PHP with required extensions, php.ini configuration, code-coverage support and composer' description: 'GitHub Action for PHP'
branding: branding:
color: 'purple' color: 'purple'
icon: 'play-circle'
inputs: inputs:
php-version: php-version:
description: 'Setup PHP version.' description: 'Setup PHP version.'
default: '7.4' required: false
required: true php-version-file:
extension-csv: description: 'Setup PHP version from a file.'
required: false
extensions:
description: 'Setup PHP extensions.' description: 'Setup PHP extensions.'
required: false required: false
ini-values-csv: ini-file:
description: 'Set base ini file.'
required: false
default: 'production'
ini-values:
description: 'Add values to php.ini.' description: 'Add values to php.ini.'
required: false required: false
coverage: coverage:
description: 'Setup code coverage driver.' description: 'Setup code coverage driver.'
required: false required: false
pecl: tools:
description: 'Setup PECL on ubuntu' description: 'Setup popular tools globally.'
required: false required: false
github-token:
description: 'GitHub token to use for authentication.'
default: ${{ github.token }}
outputs:
php-version:
description: 'PHP version in semver format'
runs: runs:
using: 'node12' using: 'node24'
main: 'dist/index.js' main: 'dist/index.js'

1804
dist/index.js vendored

File diff suppressed because one or more lines are too long

49
eslint.config.mjs Normal file
View File

@ -0,0 +1,49 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import importPlugin from 'eslint-plugin-import';
import jest from 'eslint-plugin-jest';
import prettierRecommended from 'eslint-plugin-prettier/recommended';
import eslintConfigPrettier from 'eslint-config-prettier';
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import js from '@eslint/js';
export default [
js.configs.recommended,
...typescriptEslint.configs['flat/recommended'],
importPlugin.flatConfigs.errors,
importPlugin.flatConfigs.warnings,
importPlugin.flatConfigs.typescript,
prettierRecommended,
eslintConfigPrettier,
{
plugins: {
jest
},
languageOptions: {
globals: {
...globals.node,
...globals.jest
},
parser: tsParser,
ecmaVersion: 2021,
sourceType: 'module'
},
settings: {
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: './tsconfig.json'
},
node: {
extensions: ['.js', '.ts']
}
},
'import/parsers': {
'@typescript-eslint/parser': ['.ts']
}
}
}
];

View File

@ -8,23 +8,31 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
php-versions: ['7.1', '7.2', '7.3', '7.4'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v1
- uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: composer install -n --prefer-dist run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: PHP test - name: PHP test
run: composer test run: composer test

View File

@ -0,0 +1,36 @@
# GitHub Action for Blackfire Player
name: Play a Blackfire Scenario
on: [push, pull_request]
jobs:
blackfire-player:
name: Blackfire (PHP ${{ matrix.php-versions }})
# Add your Blackfire credentials securely using GitHub Secrets
env:
BLACKFIRE_SERVER_ID: ${{ secrets.BLACKFIRE_SERVER_ID }}
BLACKFIRE_SERVER_TOKEN: ${{ secrets.BLACKFIRE_SERVER_TOKEN }}
BLACKFIRE_CLIENT_ID: ${{ secrets.BLACKFIRE_CLIENT_ID }}
BLACKFIRE_CLIENT_TOKEN: ${{ secrets.BLACKFIRE_CLIENT_TOKEN }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.4', '8.0', '8.1']
# blackfire-player supports PHP >= 5.5
steps:
- name: Checkout
uses: actions/checkout@v6
# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: blackfire
# Setup Blackfire CLI and player
tools: blackfire, blackfire-player
coverage: none
# Refer to https://blackfire.io/docs/player/index#usage
- name: Play the scenario
run: blackfire-player run scenario.bkf

37
examples/blackfire.yml Normal file
View File

@ -0,0 +1,37 @@
# GitHub Action for Blackfire
name: Profiling with blackfire
on: [push, pull_request]
jobs:
blackfire:
name: Blackfire (PHP ${{ matrix.php-versions }})
# Add your Blackfire credentials securely using GitHub Secrets
env:
BLACKFIRE_SERVER_ID: ${{ secrets.BLACKFIRE_SERVER_ID }}
BLACKFIRE_SERVER_TOKEN: ${{ secrets.BLACKFIRE_SERVER_TOKEN }}
BLACKFIRE_CLIENT_ID: ${{ secrets.BLACKFIRE_CLIENT_ID }}
BLACKFIRE_CLIENT_TOKEN: ${{ secrets.BLACKFIRE_CLIENT_TOKEN }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.4', '8.0', '8.1']
# Blackfire supports PHP >= 5.3 on Ubuntu and macOS, and PHP >= 5.4 on Windows
steps:
- name: Checkout
uses: actions/checkout@v6
# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
# Setup Blackfire extension and CLI
extensions: blackfire
tools: blackfire
# Disable Xdebug and PCOV coverage drivers
coverage: none
# Refer to https://blackfire.io/docs/cookbooks/profiling-cli
- name: Profile
run: blackfire run php my-script.php

138
examples/cakephp-mysql.yml Normal file
View File

@ -0,0 +1,138 @@
# GitHub Action for CakePHP with MySQL and Redis
# Tested with https://github.com/cakephp/app
name: Testing CakePHP with MySQL
on: [push, pull_request]
jobs:
tests:
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1']
runs-on: ubuntu-latest
# Docs: https://docs.github.com/en/actions/using-containerized-services
services:
mysql:
image: mysql:latest
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: cakephp
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis
ports:
- 6379/tcp
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v6
# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
# You can also use ext-apcu or ext-memcached instead of ext-redis
# Install memcached if using ext-memcached
extensions: mbstring, intl, redis, pdo_mysql
coverage: pcov
# Local MySQL service in GitHub hosted environments is disabled by default.
# If you are using it instead of service containers, make sure you start it.
# - name: Start mysql service
# run: sudo systemctl start mysql.service
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer install --no-progress --prefer-dist --optimize-autoloader
composer run-script post-install-cmd
# Add a step to run migrations if required
- name: Test with phpunit
run: vendor/bin/phpunit --coverage-text
env:
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
DB_DSN: "mysql://root:password@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/cakephp?init[]=SET sql_mode = \"STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION\""
coding-standard:
name: Coding Standard
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: PHP CodeSniffer
run: composer cs-check
static-analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl
tools: phpstan
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Static Analysis using PHPStan
run: phpstan analyse --no-progress src/

View File

@ -0,0 +1,138 @@
# GitHub Action for CakePHP with PostgreSQL and Redis
# Tested with https://github.com/cakephp/app
name: Testing CakePHP with PostgreSQL
on: [push, pull_request]
jobs:
tests:
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1']
runs-on: ubuntu-latest
# Docs: https://docs.github.com/en/actions/using-containerized-services
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432/tcp
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
redis:
image: redis
ports:
- 6379/tcp
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v6
# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
# You can also use ext-apcu or ext-memcached instead of ext-redis
# Install memcached if using ext-memcached
extensions: mbstring, intl, redis, pdo_pgsql
coverage: pcov
# Local PostgreSQL service in GitHub hosted environments is disabled by default.
# If you are using it instead of service containers, make sure you start it.
# - name: Start postgresql service
# run: sudo systemctl start postgresql.service
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer install --no-progress --prefer-dist --optimize-autoloader
composer run-script post-install-cmd
# Add a step to run migrations if required
- name: Test with phpunit
run: vendor/bin/phpunit --coverage-text
env:
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
DB_DSN: postgres://postgres@127.0.0.1:${{ job.services.postgres.ports['5432'] }}/postgres
coding-standard:
name: Coding Standard
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: PHP CodeSniffer
run: composer cs-check
static-analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl
tools: phpstan
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Static Analysis using PHPStan
run: phpstan analyse --no-progress src/

109
examples/cakephp.yml Normal file
View File

@ -0,0 +1,109 @@
# GitHub Action for CakePHP
# Tested with https://github.com/cakephp/app
name: Testing CakePHP
on: [push, pull_request]
jobs:
tests:
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.4', '8.0', '8.1']
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v6
# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, pdo_sqlite, pdo_mysql
coverage: pcov
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer install --no-progress --prefer-dist --optimize-autoloader
composer run-script post-install-cmd
- name: Test with phpunit
run: vendor/bin/phpunit --coverage-text
coding-standard:
name: Coding Standard
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: PHP CodeSniffer
run: composer cs-check
static-analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, intl
tools: phpstan
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Static Analysis using PHPStan
run: phpstan analyse --no-progress src/

View File

@ -5,28 +5,36 @@ jobs:
build: build:
strategy: strategy:
matrix: matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest] operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.2', '7.3'] php-versions: ['7.4', '8.0', '8.1']
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, intl, curl, dom extensions: mbstring, intl, curl, dom
coverage: xdebug #optional coverage: xdebug
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies - name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Test with phpunit - name: Test with phpunit
run: vendor/bin/phpunit --coverage-text run: vendor/bin/phpunit --coverage-text

39
examples/laminas-mvc.yml Normal file
View File

@ -0,0 +1,39 @@
# GitHub Action for Laminas framework MVC projects
name: Testing Zend Framework
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.4', '8.0', '8.1']
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v6
# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Test with phpunit
run: vendor/bin/phpunit --coverage-text

View File

@ -12,17 +12,20 @@ jobs:
BROADCAST_DRIVER: log BROADCAST_DRIVER: log
CACHE_DRIVER: redis CACHE_DRIVER: redis
QUEUE_CONNECTION: redis QUEUE_CONNECTION: redis
SESSION_DRIVER: redis SESSION_DRIVER: redis
# Docs: https://docs.github.com/en/actions/using-containerized-services
services: services:
mysql: mysql:
image: mysql:5.7 image: mysql:latest
env: env:
MYSQL_ALLOW_EMPTY_PASSWORD: false MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: password MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: laravel MYSQL_DATABASE: laravel
ports: ports:
- 3306 - 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis: redis:
image: redis image: redis
ports: ports:
@ -31,38 +34,56 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
php-versions: ['7.2', '7.3', '7.4'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, mysql extensions: mbstring, dom, fileinfo, mysql
coverage: xdebug #optional coverage: xdebug
# Local MySQL service in GitHub hosted environments is disabled by default.
# If you are using it instead of service containers, make sure you start it.
# - name: Start mysql service
# run: sudo systemctl start mysql.service
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Prepare the application - name: Prepare the application
run: | run: |
php -r "file_exists('.env') || copy('.env.example', '.env');" php -r "file_exists('.env') || copy('.env.example', '.env');"
php artisan key:generate php artisan key:generate
- name: Clear Config - name: Clear Config
run: php artisan config:clear run: php artisan config:clear
- name: Run Migration - name: Run Migration
run: php artisan migrate -v run: php artisan migrate -v
env: env:
DB_PORT: ${{ job.services.mysql.ports['3306'] }} DB_PORT: ${{ job.services.mysql.ports['3306'] }}
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
- name: Test with phpunit - name: Test with phpunit
run: vendor/bin/phpunit --coverage-text run: vendor/bin/phpunit --coverage-text
env: env:
DB_PORT: ${{ job.services.mysql.ports['3306'] }} DB_PORT: ${{ job.services.mysql.ports['3306'] }}
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}

View File

@ -15,9 +15,11 @@ jobs:
DB_PASSWORD: postgres DB_PASSWORD: postgres
DB_USERNAME: postgres DB_USERNAME: postgres
DB_DATABASE: postgres DB_DATABASE: postgres
# Docs: https://docs.github.com/en/actions/using-containerized-services
services: services:
postgres: postgres:
image: postgres:10.8 image: postgres:latest
env: env:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
@ -25,6 +27,7 @@ jobs:
ports: ports:
- 5432/tcp - 5432/tcp
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
redis: redis:
image: redis image: redis
ports: ports:
@ -33,38 +36,56 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
php-versions: ['7.2', '7.3', '7.4'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, pgsql extensions: mbstring, dom, fileinfo, pgsql
coverage: xdebug #optional coverage: xdebug
# Local PostgreSQL service in GitHub hosted environments is disabled by default.
# If you are using it instead of service containers, make sure you start it.
# - name: Start postgresql service
# run: sudo systemctl start postgresql.service
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Prepare the application - name: Prepare the application
run: | run: |
php -r "file_exists('.env') || copy('.env.example', '.env');" php -r "file_exists('.env') || copy('.env.example', '.env');"
php artisan key:generate php artisan key:generate
- name: Clear Config - name: Clear Config
run: php artisan config:clear run: php artisan config:clear
- name: Run Migration - name: Run Migration
run: php artisan migrate -v run: php artisan migrate -v
env: env:
DB_PORT: ${{ job.services.postgres.ports[5432] }} DB_PORT: ${{ job.services.postgres.ports[5432] }}
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
- name: Test with phpunit - name: Test with phpunit
run: vendor/bin/phpunit --coverage-text run: vendor/bin/phpunit --coverage-text
env: env:
DB_PORT: ${{ job.services.postgres.ports[5432] }} DB_PORT: ${{ job.services.postgres.ports[5432] }}
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}

View File

@ -8,33 +8,43 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest] operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.2', '7.3'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo extensions: mbstring, dom, fileinfo
coverage: xdebug #optional coverage: xdebug
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Prepare the application - name: Prepare the application
run: | run: |
php -r "file_exists('.env') || copy('.env.example', '.env');" php -r "file_exists('.env') || copy('.env.example', '.env');"
php artisan key:generate php artisan key:generate
- name: Clear Config - name: Clear Config
run: php artisan config:clear run: php artisan config:clear
- name: Test with phpunit - name: Test with phpunit
run: vendor/bin/phpunit --coverage-text run: vendor/bin/phpunit --coverage-text

View File

@ -13,16 +13,19 @@ jobs:
CACHE_DRIVER: redis CACHE_DRIVER: redis
QUEUE_CONNECTION: redis QUEUE_CONNECTION: redis
SESSION_DRIVER: redis SESSION_DRIVER: redis
# Docs: https://docs.github.com/en/actions/using-containerized-services
services: services:
mysql: mysql:
image: mysql:5.7 image: mysql:latest
env: env:
MYSQL_ALLOW_EMPTY_PASSWORD: false MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: password MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: lumen MYSQL_DATABASE: lumen
ports: ports:
- 3306 - 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis: redis:
image: redis image: redis
ports: ports:
@ -31,38 +34,56 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
php-versions: ['7.2', '7.3'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, mysql extensions: mbstring, dom, fileinfo, mysql
coverage: xdebug #optional coverage: xdebug
# Local MySQL service in GitHub hosted environments is disabled by default.
# If you are using it instead of service containers, make sure you start it.
# - name: Start mysql service
# run: sudo systemctl start mysql.service
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: | run: |
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader composer install --no-progress --prefer-dist --optimize-autoloader
composer require predis/predis illuminate/redis composer require predis/predis illuminate/redis
- name: Prepare the application - name: Prepare the application
run: php -r "file_exists('.env') || copy('.env.example', '.env');" run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Register Redis as service provider - name: Register Redis as service provider
run: sed -i '$i\$app->register(Illuminate\\Redis\\RedisServiceProvider::class);' bootstrap/app.php run: sed -i '$i\$app->register(Illuminate\\Redis\\RedisServiceProvider::class);' bootstrap/app.php
- name: Run Migration - name: Run Migration
run: php artisan migrate -v run: php artisan migrate -v
env: env:
DB_PORT: ${{ job.services.mysql.ports['3306'] }} DB_PORT: ${{ job.services.mysql.ports['3306'] }}
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
- name: Test with phpunit - name: Test with phpunit
run: vendor/bin/phpunit --coverage-text run: vendor/bin/phpunit --coverage-text
env: env:
DB_PORT: ${{ job.services.mysql.ports['3306'] }} DB_PORT: ${{ job.services.mysql.ports['3306'] }}
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}

View File

@ -15,9 +15,11 @@ jobs:
DB_PASSWORD: postgres DB_PASSWORD: postgres
DB_USERNAME: postgres DB_USERNAME: postgres
DB_DATABASE: postgres DB_DATABASE: postgres
# Docs: https://docs.github.com/en/actions/using-containerized-services
services: services:
postgres: postgres:
image: postgres:10.8 image: postgres:latest
env: env:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
@ -25,6 +27,7 @@ jobs:
ports: ports:
- 5432/tcp - 5432/tcp
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3 options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
redis: redis:
image: redis image: redis
ports: ports:
@ -33,38 +36,56 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
php-versions: ['7.2', '7.3'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, pgsql extensions: mbstring, dom, fileinfo, pgsql
coverage: xdebug #optional coverage: xdebug
# Local PostgreSQL service in GitHub hosted environments is disabled by default.
# If you are using it instead of service containers, make sure you start it.
# - name: Start postgresql service
# run: sudo systemctl start postgresql.service
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: | run: |
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader composer install --no-progress --prefer-dist --optimize-autoloader
composer require predis/predis illuminate/redis composer require predis/predis illuminate/redis
- name: Prepare the application - name: Prepare the application
run: php -r "file_exists('.env') || copy('.env.example', '.env');" run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Register Redis as service provider - name: Register Redis as service provider
run: sed -i '$i\$app->register(Illuminate\\Redis\\RedisServiceProvider::class);' bootstrap/app.php run: sed -i '$i\$app->register(Illuminate\\Redis\\RedisServiceProvider::class);' bootstrap/app.php
- name: Run Migration - name: Run Migration
run: php artisan migrate -v run: php artisan migrate -v
env: env:
DB_PORT: ${{ job.services.postgres.ports[5432] }} DB_PORT: ${{ job.services.postgres.ports[5432] }}
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}
- name: Test with phpunit - name: Test with phpunit
run: vendor/bin/phpunit --coverage-text run: vendor/bin/phpunit --coverage-text
env: env:
DB_PORT: ${{ job.services.postgres.ports[5432] }} DB_PORT: ${{ job.services.postgres.ports[5432] }}
REDIS_PORT: ${{ job.services.redis.ports['6379'] }}

View File

@ -8,29 +8,38 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest] operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.2', '7.3'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, mysql extensions: mbstring, dom, fileinfo, mysql
coverage: xdebug #optional coverage: xdebug
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Prepare the application - name: Prepare the application
run: php -r "file_exists('.env') || copy('.env.example', '.env');" run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Test with phpunit - name: Test with phpunit
run: vendor/bin/phpunit --coverage-text run: vendor/bin/phpunit --coverage-text

View File

@ -16,42 +16,61 @@ jobs:
DB_PASSWORD: password DB_PASSWORD: password
CODECEPTION_URL: 127.0.0.1 CODECEPTION_URL: 127.0.0.1
CODECEPTION_PORT: 8888 CODECEPTION_PORT: 8888
# Docs: https://docs.github.com/en/actions/using-containerized-services
services: services:
mysql: mysql:
image: mysql:5.7 image: mysql:latest
env: env:
MYSQL_ALLOW_EMPTY_PASSWORD: false MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: password MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: phalcon MYSQL_DATABASE: phalcon
ports: ports:
- 3306 - 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
php-versions: ['7.2', '7.3', '7.4'] php-versions: ['7.2', '7.3', '7.4']
# For phalcon 3.x, use
# php-versions: ['7.0', '7.1', '7.2', '7.3']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, zip, phalcon4, mysql #use phalcon3 for the phalcon 3.x. # Use phalcon3 for the phalcon 3.x.
coverage: xdebug #optional extensions: mbstring, dom, zip, phalcon4, mysql
coverage: xdebug
# Local MySQL service in GitHub hosted environments is disabled by default.
# If you are using it instead of service containers, make sure you start it.
# - name: Start mysql service
# run: sudo systemctl start mysql.service
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Prepare the application - name: Prepare the application
run: php -r "file_exists('.env') || copy('.env.example', '.env');" run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Run Migration - name: Run Migration
run: | run: |
if [ ! -e phinx.yml ]; then vendor/bin/phinx init; fi if [ ! -e phinx.yml ]; then vendor/bin/phinx init; fi
@ -59,10 +78,11 @@ jobs:
vendor/bin/phinx seed:run vendor/bin/phinx seed:run
env: env:
DB_PORT: ${{ job.services.mysql.ports['3306'] }} DB_PORT: ${{ job.services.mysql.ports['3306'] }}
- name: Run Tests - name: Run Tests
run: | run: |
(cd public && nohup php -S $CODECEPTION_URL:$CODECEPTION_PORT > phalcon.log 2>&1 &) (cd public && nohup php -S $CODECEPTION_URL:$CODECEPTION_PORT > phalcon.log 2>&1 &)
vendor/bin/codecept build vendor/bin/codecept build
vendor/bin/codecept run vendor/bin/codecept run
env: env:
DB_PORT: ${{ job.services.mysql.ports['3306'] }} DB_PORT: ${{ job.services.mysql.ports['3306'] }}

View File

@ -17,9 +17,11 @@ jobs:
CODECEPTION_URL: 127.0.0.1 CODECEPTION_URL: 127.0.0.1
CODECEPTION_PORT: 8888 CODECEPTION_PORT: 8888
DB_CONNECTION: pgsql DB_CONNECTION: pgsql
# Docs: https://docs.github.com/en/actions/using-containerized-services
services: services:
postgres: postgres:
image: postgres:10.8 image: postgres:latest
env: env:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
@ -31,26 +33,39 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
php-versions: ['7.2', '7.3', '7.4'] php-versions: ['7.2', '7.3', '7.4']
# For phalcon 3.x, use
# php-versions: ['7.0', '7.1', '7.2', '7.3']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, zip, phalcon4, pgsql #use phalcon3 for the phalcon 3.x # Use phalcon3 for the phalcon 3.x
coverage: xdebug #optional extensions: mbstring, dom, zip, phalcon4, pgsql
coverage: xdebug
# Local PostgreSQL service in GitHub hosted environments is disabled by default.
# If you are using it instead of service containers, make sure you start it.
# - name: Start postgresql service
# run: sudo systemctl start postgresql.service
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Prepare the application - name: Prepare the application
run: php -r "file_exists('.env') || copy('.env.example', '.env');" run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Run Migration - name: Run Migration

View File

@ -8,48 +8,62 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
php-versions: ['7.1', '7.2', '7.3', '7.4'] php-versions: ['7.4', '8.0', '8.1']
node-versions: ['8', '10'] node-versions: ['16']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v1 uses: actions/setup-node@v5
with: with:
node-version: ${{ matrix.node-versions }} node-version: ${{ matrix.node-versions }}
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring extensions: mbstring
- name: Check node versions - name: Check node versions
run: node -v run: node -v
- name: Get yarn cache - name: Get yarn cache
id: yarn-cache id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)" run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v1
- uses: actions/cache@v3
with: with:
path: ${{ steps.yarn-cache.outputs.dir }} path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn- restore-keys: ${{ runner.os }}-yarn-
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install yarn dependencies - name: Install yarn dependencies
run: yarn -V run: yarn -V
- name: Install Composer dependencies - name: Install Composer dependencies
run: composer install -o --prefer-dist --no-interaction run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Yarn test and build - name: Yarn test and build
run: | run: |
yarn run test yarn run test
yarn run build yarn run build
yarn run rmdist yarn run rmdist
yarn run "build:production" yarn run "build:production"
- name: PHP test - name: PHP test
run: composer test run: composer test

View File

@ -5,28 +5,36 @@ jobs:
build: build:
strategy: strategy:
matrix: matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest] operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.2', '7.3'] php-versions: ['7.4', '8.0', '8.1']
runs-on: ${{ matrix.operating-system }} runs-on: ${{ matrix.operating-system }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, simplexml, dom extensions: mbstring, simplexml, dom
coverage: xdebug #optional coverage: xdebug
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies - name: Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Test with phpunit - name: Test with phpunit
run: vendor/bin/phpunit --coverage-text run: vendor/bin/phpunit --coverage-text

View File

@ -5,49 +5,66 @@ jobs:
symfony: symfony:
name: Symfony (PHP ${{ matrix.php-versions }}) name: Symfony (PHP ${{ matrix.php-versions }})
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Docs: https://docs.github.com/en/actions/using-containerized-services
services: services:
mysql: mysql:
image: mysql:5.7 image: mysql:latest
env: env:
MYSQL_ALLOW_EMPTY_PASSWORD: false MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: symfony MYSQL_ROOT_PASSWORD: symfony
MYSQL_DATABASE: symfony MYSQL_DATABASE: symfony
ports: ports:
- 3306 - 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
php-versions: ['7.3'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xml, ctype, iconv, mysql tools: phpunit-bridge
coverage: xdebug #optional extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, mysql
coverage: xdebug
# Local MySQL service in GitHub hosted environments is disabled by default.
# If you are using it instead of service containers, make sure you start it.
# - name: Start mysql service
# run: sudo systemctl start mysql.service
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: | run: composer install --no-progress --prefer-dist --optimize-autoloader
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Run Migration - name: Run Migration
run: | run: |
composer require symfony/orm-pack composer require --dev symfony/orm-pack
php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed" php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed"
php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed" php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
env: env:
DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony DATABASE_URL: mysql://root:symfony@127.0.0.1:${{ job.services.mysql.ports['3306'] }}/symfony
- name: Run Tests
run: | - name: Install PHPUnit
composer require phpunit run: simple-phpunit install
php bin/phpunit --coverage-text
- name: Run tests
run: simple-phpunit --coverage-text

View File

@ -5,9 +5,11 @@ jobs:
symfony: symfony:
name: Symfony (PHP ${{ matrix.php-versions }}) name: Symfony (PHP ${{ matrix.php-versions }})
runs-on: ubuntu-latest runs-on: ubuntu-latest
# Docs: https://docs.github.com/en/actions/using-containerized-services
services: services:
postgres: postgres:
image: postgres:10.8 image: postgres:latest
env: env:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
@ -18,36 +20,51 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
php-versions: ['7.3'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xml, ctype, iconv, pgsql tools: phpunit-bridge
coverage: xdebug #optional extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite, pgsql
coverage: xdebug
# Local PostgreSQL service in GitHub hosted environments is disabled by default.
# If you are using it instead of service containers, make sure you start it.
# - name: Start postgresql service
# run: sudo systemctl start postgresql.service
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: | run: composer install --no-progress --prefer-dist --optimize-autoloader
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: Run Migration - name: Run Migration
run: | run: |
composer require symfony/orm-pack composer require --dev symfony/orm-pack
php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed" php bin/console doctrine:schema:update --force || echo "No migrations found or schema update failed"
php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed" php bin/console doctrine:migrations:migrate || echo "No migrations found or migration failed"
env: env:
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8 DATABASE_URL: postgres://postgres:postgres@127.0.0.1:${{ job.services.postgres.ports[5432] }}/postgres?charset=UTF-8
- name: Run Tests
run: | - name: Install PHPUnit
composer require phpunit run: simple-phpunit install
php bin/phpunit --coverage-text
- name: Run tests
run: simple-phpunit --coverage-text

View File

@ -8,31 +8,39 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest] operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.3'] php-versions: ['7.4', '8.0', '8.1']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xml, ctype, iconv tools: phpunit-bridge
coverage: xdebug #optional extensions: mbstring, xml, ctype, iconv, intl, pdo_sqlite
coverage: xdebug
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: | run: composer install --no-progress --prefer-dist --optimize-autoloader
composer require symfony/orm-pack
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader - name: Install PHPUnit
- name: Run Tests run: simple-phpunit install
run: |
composer require phpunit - name: Run tests
php bin/phpunit --coverage-text run: simple-phpunit --coverage-text

View File

@ -11,44 +11,60 @@ jobs:
TEST_DB_USERNAME: root TEST_DB_USERNAME: root
TEST_DB_PASSWORD: yii TEST_DB_PASSWORD: yii
DB_CHARSET: utf8 DB_CHARSET: utf8
# Docs: https://docs.github.com/en/actions/using-containerized-services
services: services:
mysql: mysql:
image: mysql:5.7 image: mysql:latest
env: env:
MYSQL_ALLOW_EMPTY_PASSWORD: false MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: yii MYSQL_ROOT_PASSWORD: yii
MYSQL_DATABASE: yii MYSQL_DATABASE: yii
ports: ports:
- 3306 - 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
php-versions: ['7.2', '7.3', '7.4'] php-versions: ['7.4', '8.0']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Set Node.js 10.x - name: Set Node.js 10.x
uses: actions/setup-node@v1 uses: actions/setup-node@v5
with: with:
node-version: 10.x node-version: 10.x
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, intl, gd, imagick, zip, dom, mysql extensions: mbstring, intl, gd, imagick, zip, dom, mysql
coverage: xdebug #optional coverage: xdebug
# Local MySQL service in GitHub hosted environments is disabled by default.
# If you are using it instead of service containers, make sure you start it.
# - name: Start mysql service
# run: sudo systemctl start mysql.service
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Prepare the application - name: Prepare the application
run: | run: |
php -r "file_exists('.env') || copy('.env.dist', '.env');" php -r "file_exists('.env') || copy('.env.dist', '.env');"
@ -58,6 +74,7 @@ jobs:
env: env:
DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
TEST_DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii TEST_DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
- name: Run Tests - name: Run Tests
run: | run: |
vendor/bin/codecept build vendor/bin/codecept build
@ -66,4 +83,4 @@ jobs:
vendor/bin/codecept run vendor/bin/codecept run
env: env:
DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii
TEST_DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii TEST_DB_DSN: mysql:host=127.0.0.1;port=${{ job.services.mysql.ports['3306'] }};dbname=yii

View File

@ -11,9 +11,11 @@ jobs:
TEST_DB_USERNAME: postgres TEST_DB_USERNAME: postgres
TEST_DB_PASSWORD: postgres TEST_DB_PASSWORD: postgres
DB_CHARSET: utf8 DB_CHARSET: utf8
# Docs: https://docs.github.com/en/actions/using-containerized-services
services: services:
postgres: postgres:
image: postgres:10.8 image: postgres:latest
env: env:
POSTGRES_USER: postgres POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres POSTGRES_PASSWORD: postgres
@ -24,31 +26,45 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
php-versions: ['7.2', '7.3', '7.4'] php-versions: ['7.4', '8.0']
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v6
- name: Set Node.js 10.x - name: Set Node.js 10.x
uses: actions/setup-node@v1 uses: actions/setup-node@v5
with: with:
node-version: 10.x node-version: 10.x
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php # Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, intl, gd, imagick, zip, dom, pgsql extensions: mbstring, intl, gd, imagick, zip, dom, pgsql
coverage: xdebug #optional coverage: xdebug
# Local PostgreSQL service in GitHub hosted environments is disabled by default.
# If you are using it instead of service containers, make sure you start it.
# - name: Start postgresql service
# run: sudo systemctl start postgresql.service
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)" run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache composer dependencies - name: Cache composer dependencies
uses: actions/cache@v1 uses: actions/cache@v3
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer- restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies - name: Install Composer dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader run: composer install --no-progress --prefer-dist --optimize-autoloader
- name: Prepare the application - name: Prepare the application
run: | run: |
php -r "file_exists('.env') || copy('.env.dist', '.env');" php -r "file_exists('.env') || copy('.env.dist', '.env');"
@ -58,6 +74,7 @@ jobs:
env: env:
DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres
TEST_DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres TEST_DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres
- name: Run Tests - name: Run Tests
run: | run: |
vendor/bin/codecept build vendor/bin/codecept build
@ -66,4 +83,4 @@ jobs:
vendor/bin/codecept run vendor/bin/codecept run
env: env:
DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres
TEST_DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres TEST_DB_DSN: pgsql:host=127.0.0.1;port=${{ job.services.postgres.ports['5432'] }};dbname=postgres

View File

@ -1,34 +0,0 @@
# GitHub Action for Zend Framework
name: Testing Zend Framework
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
php-versions: ['7.2', '7.3']
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, bcmath, curl, intl
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
composer require --dev phpunit/phpunit squizlabs/php_codesniffer zendframework/zend-test
- name: Test with phpunit
run: vendor/bin/phpunit --coverage-text

View File

@ -9,4 +9,4 @@ module.exports = {
}, },
verbose: true, verbose: true,
collectCoverage: true collectCoverage: true
}; };

13073
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,25 @@
{ {
"name": "setup-php", "name": "setup-php",
"version": "1.5.8", "version": "2.36.0",
"private": false, "private": false,
"description": "Setup PHP for use with GitHub Actions", "description": "Setup PHP for use with GitHub Actions",
"main": "dist/index.js", "main": "lib/install.js",
"types": "lib/install.d.ts",
"directories": {
"lib": "lib",
"test": "__tests__",
"src": "src"
},
"files": [
"lib",
"src"
],
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"lint": "eslint **/*.ts --cache", "lint": "eslint **/src/*.ts **/__tests__/*.ts --cache --fix",
"format": "prettier --write **/*.ts && git add .", "format": "prettier --write **/src/*.ts **/__tests__/*.ts && git add -f __tests__/ ",
"format-check": "prettier --check **/*.ts", "format-check": "prettier --check **/src/*.ts **/__tests__/*.ts",
"release": "ncc build src/install.ts -o dist && git add -f dist/", "release": "ncc build -m -o dist && git add -f dist/",
"test": "jest" "test": "jest"
}, },
"repository": { "repository": {
@ -24,32 +34,41 @@
"author": "shivammathur", "author": "shivammathur",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@actions/core": "^1.2.0", "@actions/exec": "^2.0.0",
"@actions/exec": "^1.0.1", "compare-versions": "^6.1.1"
"fs": "0.0.1-security"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^24.0.21", "@eslint/compat": "^2.0.2",
"@types/node": "^12.12.0", "@eslint/js": "^9.39.1",
"@typescript-eslint/eslint-plugin": "^2.7.0", "@types/jest": "^30.0.0",
"@typescript-eslint/parser": "^2.7.0", "@types/node": "^25.2.2",
"@zeit/ncc": "^0.20.5", "@typescript-eslint/eslint-plugin": "^8.54.0",
"eslint": "^6.6.0", "@typescript-eslint/parser": "^8.54.0",
"eslint-config-prettier": "^6.5.0", "@vercel/ncc": "^0.38.4",
"eslint-plugin-import": "^2.18.2", "eslint": "^9.39.1",
"eslint-plugin-jest": "^23.0.3", "eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^3.1.1", "eslint-import-resolver-typescript": "^4.4.4",
"husky": "^3.0.9", "eslint-plugin-import": "^2.32.0",
"jest": "^24.9.0", "eslint-plugin-jest": "^29.12.2",
"jest-circus": "^24.9.0", "eslint-plugin-prettier": "^5.5.5",
"prettier": "^1.17.1", "globals": "^17.3.0",
"ts-jest": "^24.1.0", "jest": "^30.2.0",
"typescript": "^3.7.3" "jest-circus": "^30.2.0",
"nock": "^14.0.10",
"prettier": "^3.8.1",
"simple-git-hooks": "^2.13.1",
"ts-jest": "^29.4.6",
"typescript": "^5.9.3"
}, },
"husky": { "overrides": {
"skipCI": true, "test-exclude": "^7.0.1",
"hooks": { "glob": "^11.1.0",
"pre-commit": "npm run build && npm run format && npm run release" "minimatch": "^10.2.1"
} },
"bugs": {
"url": "https://github.com/shivammathur/setup-php/issues"
},
"simple-git-hooks": {
"pre-commit": "npm run format && npm run lint && npm run test && npm run build && npm run release"
} }
} }

View File

@ -8,13 +8,18 @@ import * as utils from './utils';
export async function addINIValuesUnix( export async function addINIValuesUnix(
ini_values_csv: string ini_values_csv: string
): Promise<string> { ): Promise<string> {
const ini_values: Array<string> = await utils.INIArray(ini_values_csv); const ini_values: Array<string> = await utils.CSVArray(ini_values_csv);
let script = '\n'; let script = '';
await utils.asyncForEach(ini_values, async function(line: string) { await utils.asyncForEach(ini_values, async function (line: string) {
script += script +=
(await utils.addLog('$tick', line, 'Added to php.ini', 'linux')) + '\n'; '\n' + (await utils.addLog('$tick', line, 'Added to php.ini', 'linux'));
}); });
return 'echo "' + ini_values.join('\n') + '" >> $ini_file' + script; return (
'echo "' +
ini_values.join('\n') +
'" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null 2>&1' +
script
);
} }
/** /**
@ -25,17 +30,14 @@ export async function addINIValuesUnix(
export async function addINIValuesWindows( export async function addINIValuesWindows(
ini_values_csv: string ini_values_csv: string
): Promise<string> { ): Promise<string> {
const ini_values: Array<string> = await utils.INIArray(ini_values_csv); const ini_values: Array<string> = await utils.CSVArray(ini_values_csv);
let script = '\n'; let script = '\n';
await utils.asyncForEach(ini_values, async function(line: string) { await utils.asyncForEach(ini_values, async function (line: string) {
script += script +=
(await utils.addLog('$tick', line, 'Added to php.ini', 'win32')) + '\n'; (await utils.addLog('$tick', line, 'Added to php.ini', 'win32')) + '\n';
}); });
return ( return (
'Add-Content C:\\tools\\php\\php.ini "' + 'Add-Content "$php_dir\\php.ini" "' + ini_values.join('\n') + '"' + script
ini_values.join('\n') +
'"' +
script
); );
} }
@ -43,27 +45,28 @@ export async function addINIValuesWindows(
* Function to add custom ini values * Function to add custom ini values
* *
* @param ini_values_csv * @param ini_values_csv
* @param os_version * @param os
* @param no_step
*/ */
export async function addINIValues( export async function addINIValues(
ini_values_csv: string, ini_values_csv: string,
os_version: string, os: string,
no_step = false no_step = false
): Promise<string> { ): Promise<string> {
let script = '\n'; let script = '\n';
switch (no_step) { switch (no_step) {
case true: case true:
script += script +=
(await utils.stepLog('Add php.ini values', os_version)) + (await utils.stepLog('Add php.ini values', os)) +
(await utils.suppressOutput(os_version)) + (await utils.suppressOutput(os)) +
'\n'; '\n';
break; break;
case false: case false:
default: default:
script += (await utils.stepLog('Add php.ini values', os_version)) + '\n'; script += (await utils.stepLog('Add php.ini values', os)) + '\n';
break; break;
} }
switch (os_version) { switch (os) {
case 'win32': case 'win32':
return script + (await addINIValuesWindows(ini_values_csv)); return script + (await addINIValuesWindows(ini_values_csv));
case 'darwin': case 'darwin':
@ -71,8 +74,8 @@ export async function addINIValues(
return script + (await addINIValuesUnix(ini_values_csv)); return script + (await addINIValuesUnix(ini_values_csv));
default: default:
return await utils.log( return await utils.log(
'Platform ' + os_version + ' is not supported', 'Platform ' + os + ' is not supported',
os_version, os,
'error' 'error'
); );
} }

View File

@ -0,0 +1,65 @@
amqp=amqp
apcu=apcu
ast=ast
brotli=brotli
couchbase=couchbase
ds=ds
event=event
excimer=excimer
expect=expect
gearman=gearman
gmagick=gmagick
gnupg=gnupg
grpc=grpc
igbinary=igbinary
imagick=imagick
imap=imap
interbase=interbase
lua=lua
mailparse=mailparse
maxminddb=maxminddb
mcrypt=mcrypt
memcache=memcache
memcached=memcached
mongodb=mongodb
mongodb1=mongodb1
msgpack=msgpack
newrelic=newrelic
oauth=oauth
opentelemetry=opentelemetry
pcov=pcov
pdo_firebird=pdo_firebird
pdo_sqlsrv=pdo_sqlsrv
pecl_http=http
phalcon3=phalcon
phalcon4=phalcon
phalcon5=phalcon
pinba=pinba
propro=propro
protobuf=protobuf
psr=psr
raphf=raphf
rdkafka=rdkafka
phpredis=redis
redis=redis
seaslog=seaslog
scalar_objects=scalar_objects
snmp=snmp
sqlsrv=sqlsrv
spx=spx
ssh2=ssh2
swoole=swoole
swow=swow
uopz=uopz
uploadprogress=uploadprogress
uuid=uuid
v8js=v8js
vips=vips
vld=vld
xdebug=xdebug
xdebug2=xdebug
xhprof=xhprof
xlswriter=xlswriter
yaml=yaml
zmq=zmq
zstd=zstd

3
src/configs/composer.env Normal file
View File

@ -0,0 +1,3 @@
COMPOSER_PROCESS_TIMEOUT=0
COMPOSER_NO_INTERACTION=1
COMPOSER_NO_AUDIT=1

View File

@ -1,58 +0,0 @@
variants:
dev:
bcmath:
calendar:
cli:
ctype:
dom:
fileinfo:
filter:
ipc:
iconv:
json:
mbregex:
mbstring:
mhash:
mcrypt:
pcntl:
pcre:
pdo:
phar:
posix:
sockets:
tokenizer:
xml:
curl:
openssl:
zip:
gd:
- --with-freetype
- --with-pdo-mysql=mysqlnd
- --with-mysqli=mysqlnd
- --with-pgsql
- --with-pdo-pgsql
- --with-gmp=/usr/local/opt/gmp
- --with-openssl
- --with-pear
- --with-zip
- --with-libxml
- --with-kerberos
- --with-gd
- --with-ffi
- --with-curl
- --with-mhash
- --with-readline=/usr/local/opt/readline
- --with-iconv=/usr/local/opt/libiconv
- --with-icu-dir=/usr/local/opt/icu4c
- --with-config-file-path=/etc
- --enable-intl
- --enable-xml
- --enable-sysvsem
- --enable-sysvshm
- --enable-sysvmsg
- --enable-phpdbg
- --enable-exif
- --enable-gd
- --enable-soap
- --enable-xmlreader
- --enable-zend-test=shared

22
src/configs/darwin_libs Normal file
View File

@ -0,0 +1,22 @@
amqp=rabbitmq-c
decimal=mpdecimal
ev=libev
event=libevent
geoip=geoip
gmagick=graphicsmagick
gnupg=gpgme
grpc=grpc protobuf
imagick=imagemagick
memcached=libmemcached libevent
protobuf=protobuf
rdkafka=librdkafka
snappy=snappy
sodium=libsodium
ssh2=libssh2
uv=libuv
uuid=util-linux
vips=vips
yaz=yaz
yaml=libyaml
zstd=zstd
zmq=zeromq

3
src/configs/ini/jit.ini Normal file
View File

@ -0,0 +1,3 @@
opcache.enable=1
opcache.jit_buffer_size=256M
opcache.jit=1235

View File

@ -0,0 +1,3 @@
opcache.enable=1
opcache.jit_buffer_size=128M
opcache.jit=1235

2
src/configs/ini/php.ini Normal file
View File

@ -0,0 +1,2 @@
date.timezone=UTC
memory_limit=-1

View File

@ -0,0 +1 @@
xdebug.mode=coverage

22
src/configs/linux_libs Normal file
View File

@ -0,0 +1,22 @@
amqp=librabbitmq-dev
decimal=libmpdec-dev
ev=libev-dev
event=libevent-dev
geoip=libgeoip-dev
gmagick=graphicsmagick-libmagick-dev-compat
gnupg=libgpgme-dev
grpc=libgrpc-dev libprotobuf-dev protobuf-compiler
imagick=libmagickwand-dev libmagickcore-dev
memcached=libmemcached-dev libevent-dev
protobuf=libprotobuf-dev protobuf-compiler
rdkafka=librdkafka-dev
snappy=libsnappy-dev
sodium=libsodium-dev
ssh2=libssh2-1-dev
uv=libuv1-dev
uuid=uuid-dev
vips=libvips-dev
yaz=libyaz-dev
yaml=libyaml-dev
zstd=libzstd-dev
zmq=libzmq3-dev

31
src/configs/mod_priority Normal file
View File

@ -0,0 +1,31 @@
apc=25
apcu_bc=25
apcu-bc=25
blackfire=30
couchbase=30
decimal=30
ds=30
event=30
ev=30
grpc=30
http=25
pecl_http=25
pecl-http=25
inotify=30
libvirt-php=40
mailparse=25
maxminddb=30
memcached=25
mysqlnd=10
mysqlnd_ms=30
opcache=10
openswoole=25
pdo=10
phalcon=35
protobuf=30
psr=15
rdkafka=30
swoole=25
vips=30
xml=15
zstd=30

View File

@ -0,0 +1,24 @@
8,jessie
9,stretch
10,buster
11,bullseye
12,bookworm
13,trixie
16.04 LTS,xenial
16.10,yakkety
17.04,zesty
17.10,artful
18.04 LTS,bionic
18.10,cosmic
19.04,disco
19.10,eoan
20.04 LTS,focal
20.10,groovy
21.04,hirsute
21.10,impish
22.04,jammy
23.04,lunar
23.10,mantic
24.04,noble
24.10,oracular
25.10,plucky
1 8 jessie
2 9 stretch
3 10 buster
4 11 bullseye
5 12 bookworm
6 13 trixie
7 16.04 LTS xenial
8 16.10 yakkety
9 17.04 zesty
10 17.10 artful
11 18.04 LTS bionic
12 18.10 cosmic
13 19.04 disco
14 19.10 eoan
15 20.04 LTS focal
16 20.10 groovy
17 21.04 hirsute
18 21.10 impish
19 22.04 jammy
20 23.04 lunar
21 23.10 mantic
22 24.04 noble
23 24.10 oracular
24 25.10 plucky

View File

@ -0,0 +1,10 @@
{
"lowest": "8.1",
"highest": "8.5",
"latest": "8.5",
"nightly": "8.6",
"master": "8.6",
"5.x": "5.6",
"7.x": "7.4",
"8.x": "8.5"
}

View File

@ -0,0 +1,11 @@
cgi
cli
curl
fpm
intl
mbstring
mysql
opcache
pgsql
xml
zip

12
src/configs/php_packages Normal file
View File

@ -0,0 +1,12 @@
cgi
cli
curl
dev
fpm
intl
mbstring
mysql
opcache
pgsql
xml
zip

29
src/configs/pm/php.json Normal file
View File

@ -0,0 +1,29 @@
{
"problemMatcher": [
{
"owner": "php_native_error",
"severity": "error",
"pattern": [
{
"regexp": "^(.*error):\\s+\\s+(.+) in (.+) on line (\\d+)$",
"code": 1,
"message": 2,
"file": 3,
"line": 4
}
]
}, {
"owner": "php_native_warning",
"severity": "warning",
"pattern": [
{
"regexp": "^(.*Warning|.*Deprecated|.*Notice):\\s+\\s+(.+) in (.+) on line (\\d+)$",
"code": 1,
"message": 2,
"file": 3,
"line": 4
}
]
}
]
}

View File

@ -0,0 +1,24 @@
{
"problemMatcher": [
{
"owner": "phpunit",
"pattern": [
{
"regexp": "^\\d+\\)\\s.*$"
},
{
"regexp": "^(.*Failed\\sasserting\\sthat.*)$",
"message": 1
},
{
"regexp": "^\\s*$"
},
{
"regexp": "^(.*):(\\d+)$",
"file": 1,
"line": 2
}
]
}
]
}

358
src/configs/tools.json Normal file
View File

@ -0,0 +1,358 @@
{
"backward-compatibility-check": {
"type": "composer",
"repository": "roave/backward-compatibility-check",
"scope": "scoped"
},
"box": {
"type": "phar",
"repository": "box-project/box",
"packagist": "humbug/box",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "--version"
},
"churn": {
"type": "phar",
"repository": "bmitch/churn-php",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "-V"
},
"composer-dependency-analyser": {
"type": "composer",
"repository": "shipmonk/composer-dependency-analyser",
"scope": "scoped"
},
"composer-unused": {
"type": "phar",
"repository": "composer-unused/composer-unused",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "-V"
},
"composer-normalize": {
"type": "phar",
"repository": "ergebnis/composer-normalize",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "diagnose"
},
"cs2pr": {
"type": "phar",
"repository": "staabm/annotate-pull-request-from-checkstyle",
"extension": "",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "-V"
},
"easy-coding-standard": {
"type": "composer",
"alias": "ecs",
"repository": "symplify/easy-coding-standard",
"scope": "scoped"
},
"infection": {
"type": "phar",
"repository": "infection/infection",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "-V"
},
"name-collision-detector": {
"type": "composer",
"repository": "shipmonk/name-collision-detector",
"scope": "scoped"
},
"phan": {
"type": "phar",
"repository": "phan/phan",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "-v"
},
"parallel-lint": {
"type": "phar",
"repository": "php-parallel-lint/PHP-Parallel-Lint",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "v",
"version_parameter": "--version"
},
"php-cs-fixer": {
"type": "phar",
"repository": "PHP-CS-Fixer/PHP-CS-Fixer",
"extension": ".phar",
"domain": "https://github.com",
"fetch_latest": "true",
"version_prefix": "v",
"version_parameter": "-V"
},
"php-scoper": {
"type": "phar",
"repository": "humbug/php-scoper",
"packagist": "humbug/php-scoper",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "--version"
},
"phpcbf": {
"type": "phar",
"repository": "PHPCSStandards/PHP_CodeSniffer",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "--version"
},
"phpcs": {
"type": "phar",
"repository": "PHPCSStandards/PHP_CodeSniffer",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "--version"
},
"phpDocumentor": {
"type": "phar",
"repository": "phpDocumentor/phpDocumentor",
"extension": ".phar",
"domain": "https://github.com",
"alias": "phpdoc",
"version_prefix": "v",
"version_parameter": "--version"
},
"phpmd": {
"type": "phar",
"repository": "phpmd/phpmd",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "--version"
},
"phpspec": {
"type": "phar",
"repository": "phpspec/phpspec",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "-V"
},
"phpstan": {
"type": "phar",
"repository": "phpstan/phpstan",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "-V"
},
"pie": {
"type": "phar",
"repository": "php/pie",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "-V"
},
"pint": {
"type": "phar",
"repository": "laravel/pint",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "v",
"version_parameter": "-V"
},
"psalm": {
"type": "phar",
"repository": "vimeo/psalm",
"extension": ".phar",
"domain": "https://github.com",
"version_prefix": "",
"version_parameter": "-v"
},
"behat": {
"type": "composer",
"repository": "behat/behat",
"scope": "scoped"
},
"codeception": {
"type": "composer",
"repository": "codeception/codeception",
"scope": "scoped"
},
"automatic-composer-prefetcher": {
"type": "composer",
"alias": "composer-prefetcher",
"repository": "narrowspark/automatic-composer-prefetcher",
"scope": "global"
},
"composer-require-checker": {
"type": "composer",
"repository": "maglnet/composer-require-checker",
"scope": "scoped"
},
"flex": {
"type": "composer",
"repository": "symfony/flex",
"scope": "global"
},
"phinx": {
"type": "composer",
"repository": "robmorgan/phinx",
"scope": "scoped"
},
"phplint": {
"type": "composer",
"repository": "overtrue/phplint",
"scope": "scoped"
},
"phpunit-bridge": {
"alias": "simple-phpunit",
"type": "composer",
"repository": "symfony/phpunit-bridge",
"scope": "global"
},
"phpunit-polyfills": {
"type": "composer",
"repository": "yoast/phpunit-polyfills",
"scope": "global"
},
"prestissimo": {
"type": "composer",
"repository": "hirak/prestissimo",
"scope": "global"
},
"vapor-cli": {
"type": "composer",
"alias": "vapor",
"repository": "laravel/vapor-cli",
"scope": "scoped"
},
"rector": {
"type": "composer",
"repository": "rector/rector",
"scope": "scoped"
},
"blackfire": {
"type": "custom-package",
"alias": "blackfire-agent"
},
"grpc_php_plugin": {
"type": "custom-package",
"repository": "grpc/grpc",
"domain": "https://github.com",
"version_prefix": "v"
},
"mago": {
"type": "custom-package",
"repository": "carthage-software/mago",
"domain": "https://github.com",
"version_prefix": ""
},
"protoc": {
"type": "custom-package",
"repository": "protocolbuffers/protobuf",
"domain": "https://github.com",
"version_prefix": "v"
},
"symfony-cli": {
"alias": "symfony",
"type": "custom-package",
"repository": "symfony-cli/symfony-cli",
"domain": "https://github.com",
"version_prefix": "v",
"version_parameter": "-V"
},
"blackfire-player": {
"type": "custom-function",
"domain": "https://get.blackfire.io",
"function": "blackfire_player",
"version_prefix": "v",
"version_parameter": "-V"
},
"castor": {
"type": "custom-function",
"domain": "https://github.com",
"repository": "jolicode/castor",
"function": "castor",
"version_prefix": "v",
"version_parameter": "-V"
},
"composer": {
"type": "custom-function",
"domain": "https://getcomposer.org",
"repository": "composer/composer",
"function": "composer"
},
"deployer": {
"type": "custom-function",
"domain": "https://deployer.org",
"repository": "deployphp/deployer",
"function": "deployer",
"version_prefix": "v",
"version_parameter": "-V"
},
"pecl": {
"type": "custom-function",
"function": "pecl"
},
"phing": {
"type": "custom-function",
"domain": "https://www.phing.info",
"repository": "phingofficial/phing",
"function": "phing",
"extension": ".phar",
"version_prefix": "",
"version_parameter": "-v"
},
"phive": {
"type": "custom-function",
"repository": "phar-io/phive",
"domain": "https://github.com",
"function": "phive",
"version_prefix": "",
"version_parameter": "status"
},
"phpcpd": {
"type": "custom-function",
"repository": "sebastianbergmann/phpcpd",
"domain": "https://phar.phpunit.de",
"function": "phpcpd",
"version_prefix": "",
"version_parameter": "--version"
},
"phpunit": {
"type": "custom-function",
"repository": "sebastianbergmann/phpunit",
"packagist": "phpunit/phpunit",
"domain": "https://phar.phpunit.de",
"function": "phpunit",
"version_prefix": "",
"version_parameter": "--version"
},
"phpize": {
"type": "custom-function",
"function": "dev_tools",
"alias": "php-config"
},
"php-config": {
"type": "custom-function",
"function": "dev_tools"
},
"wp-cli": {
"type": "custom-function",
"function": "wp_cli",
"repository": "wp-cli/wp-cli",
"domain": "https://github.com",
"alias": "wp",
"extension": ".phar",
"version_parameter": "--version",
"version_prefix": "v"
}
}

View File

@ -0,0 +1,136 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/shivammathur/setup-php/develop/src/configs/tools_schema.json",
"type": "object",
"title": "Tools",
"default": {},
"examples": [
{
"tool": {
"alias": "tool_alias",
"domain": "https://example.com",
"extension": ".ext",
"fetch_latest": "true",
"function": "function_name",
"repository": "user/tool",
"packagist": "user/tool",
"scope": "global, scoped",
"type": "phar, composer, custom-package or custom-function",
"version_parameter": "--version",
"version_prefix": "v"
}
}
],
"items": {
"properties": {
"alias": {
"$id": "#/items/properties/alias",
"type": "string",
"title": "The alias schema",
"description": "Alias for a tool.",
"examples": [
"tool_alias"
]
},
"domain": {
"$id": "#/items/properties/domain",
"type": "string",
"title": "The domain schema",
"description": "Domain URL of the tool.",
"examples": [
"https://example.com"
]
},
"extension": {
"$id": "#/items/properties/extension",
"type": "string",
"title": "The extension schema",
"description": "File extension of the tool.",
"examples": [
".ext"
]
},
"fetch_latest": {
"$id": "#/items/properties/fetch_latest",
"type": "string",
"title": "The fetch_latest schema",
"description": "Fetch the latest version from GitHub releases.",
"enum": [
"true",
"false"
]
},
"function": {
"$id": "#/items/properties/function",
"type": "string",
"title": "The function schema",
"description": "Function name in tools.ts which returns the script to setup the tool.",
"examples": [
"function_name"
]
},
"repository": {
"$id": "#/items/properties/repository",
"type": "string",
"title": "The repository schema",
"description": "GitHub repository of the tool.",
"examples": [
"user/tool"
]
},
"packagist": {
"$id": "#/items/properties/packagist",
"type": "string",
"title": "The repository schema",
"description": "Packagist repository of the tool in case different from repository.",
"examples": [
"user/tool"
]
},
"scope": {
"$id": "#/items/properties/scope",
"type": "string",
"title": "The scope schema",
"description": "Scope of tool installation: global or scoped",
"enum": [
"global",
"scoped"
]
},
"type": {
"$id": "#/items/properties/type",
"type": "string",
"title": "The type schema",
"description": "Type of tool: phar, composer, custom-package or custom-function.",
"enum": [
"phar",
"composer",
"custom-package",
"custom-function"
]
},
"version_parameter": {
"$id": "#/items/properties/version_parameter",
"type": "string",
"title": "The version_parameter schema",
"description": "Parameter to get the tool version.",
"examples": [
"--version"
]
},
"version_prefix": {
"$id": "#/items/properties/version_prefix",
"type": "string",
"title": "The version_prefix schema",
"description": "Prefix of the version in the download URL.",
"examples": [
"v"
]
}
},
"required": [
"type"
],
"additionalProperties": true
}
}

View File

@ -0,0 +1,2 @@
xdebug
pcov

112
src/core.ts Normal file
View File

@ -0,0 +1,112 @@
import {EOL} from 'os';
/**
* Commands
*
* Command Format:
* ::name key=value,key=value::message
*
* @see https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions
*/
interface CommandProperties {
[key: string]: string;
}
/**
* Sanitizes the message for use in a workflow command.
* @param message
*/
function toCommandValue(message: string | Error): string {
if (message instanceof Error) {
return message.toString();
}
return message;
}
/**
* Escapes data for safe use in workflow command messages.
* @param s
*/
function escapeData(s: string | Error): string {
return toCommandValue(s)
.replace(/%/g, '%25')
.replace(/\r/g, '%0D')
.replace(/\n/g, '%0A');
}
/**
* Escapes property values for safe use in workflow command properties.
* @param s
*/
function escapeProperty(s: string): string {
return s
.replace(/%/g, '%25')
.replace(/\r/g, '%0D')
.replace(/\n/g, '%0A')
.replace(/:/g, '%3A')
.replace(/,/g, '%2C');
}
/**
* Issues a command to the GitHub Actions runner.
*
* @param command - The command name to issue
* @param properties - Additional properties for the command (key-value pairs)
* @param message - The message to include with the command
*/
export function issueCommand(
command: string,
properties: CommandProperties,
message: string | Error
): void {
let cmdStr = `::${command}`;
if (properties && Object.keys(properties).length > 0) {
cmdStr += ' ';
const props = Object.entries(properties)
.filter(([, val]) => val)
.map(([key, val]) => `${key}=${escapeProperty(val)}`)
.join(',');
cmdStr += props;
}
cmdStr += `::${escapeData(message)}`;
process.stdout.write(cmdStr + EOL);
}
/**
* Adds an error issue.
* @param message - error issue message
*/
export function error(message: string | Error): void {
issueCommand('error', {}, message);
}
/**
* Sets the action status to failed.
* When the action exits it will be with an exit code of 1.
* @param message - add error issue message
*/
export function setFailed(message: string | Error): void {
process.exitCode = 1;
error(message);
}
/**
* Gets the value of an input.
* The value is trimmed.
* Returns an empty string if the value is not defined.
*
* @param name - name of the input to get
* @param required - whether the input is required
* @returns string
*/
export function getInput(name: string, required = false): string {
const val: string =
process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';
if (required && !val) {
throw new Error(`Input required and not supplied: ${name}`);
}
return val.trim();
}

View File

@ -2,85 +2,92 @@ import * as utils from './utils';
import * as extensions from './extensions'; import * as extensions from './extensions';
import * as config from './config'; import * as config from './config';
/** export async function checkXdebugError(
* Function to setup Xdebug extension: string,
* version: string
* @param version
* @param os_version
*/
export async function addCoverageXdebug(
version: string,
os_version: string
): Promise<string> { ): Promise<string> {
return ( if (
(await extensions.addExtension('xdebug', version, os_version, true)) + (/^5\.[3-6]$|^7\.[0-1]$/.test(version) && extension == 'xdebug3') ||
(await utils.suppressOutput(os_version)) + (/^8\.[0-9]$/.test(version) && extension == 'xdebug2')
'\n' + ) {
(await utils.addLog( return extension + ' is not supported on PHP ' + version;
'$tick', }
'xdebug', return '';
'Xdebug enabled as coverage driver',
os_version
))
);
} }
/** /**
* Function to setup PCOV * Function to set up Xdebug
*
* @param extension
* @param version
* @param os
* @param pipe
*/
export async function addCoverageXdebug(
extension: string,
version: string,
os: string,
pipe: string
): Promise<string> {
let script = '\n';
const error: string = await checkXdebugError(extension, version);
if (!error) {
script +=
(await extensions.addExtension(':pcov:false', version, os, true)) + pipe;
extension = extension == 'xdebug3' ? 'xdebug' : extension;
script +=
(await extensions.addExtension(extension, version, os, true)) + pipe;
script += await utils.setVariable(
'xdebug_version',
'php -r "echo phpversion(\'xdebug\');"',
os
);
script +=
(await utils.getCommand(os, 'extension_log')) +
'xdebug "Xdebug $xdebug_version enabled as coverage driver"';
} else {
script += await utils.addLog('$cross', extension, error, os);
}
return script;
}
/**
* Function to set up PCOV
* *
* @param version * @param version
* @param os_version * @param os
* @param pipe
*/ */
export async function addCoveragePCOV( export async function addCoveragePCOV(
version: string, version: string,
os_version: string os: string,
pipe: string
): Promise<string> { ): Promise<string> {
let script = '\n'; let script = '\n';
switch (version) { switch (true) {
default: default:
script += script +=
(await extensions.addExtension('pcov', version, os_version, true)) + (await extensions.addExtension(':xdebug:false', version, os, true)) +
(await utils.suppressOutput(os_version)) + pipe;
'\n';
script += script +=
(await config.addINIValues('pcov.enabled=1', os_version, true)) + '\n'; (await extensions.addExtension('pcov', version, os, true)) + pipe;
script += (await config.addINIValues('pcov.enabled=1', os, true)) + '\n';
// add command to disable xdebug and enable pcov script += await utils.setVariable(
switch (os_version) { 'pcov_version',
case 'linux': 'php -r "echo phpversion(\'pcov\');"',
script += os
'if [ -e /etc/php/' +
version +
'/mods-available/xdebug.ini ]; then sudo phpdismod -v ' +
version +
' xdebug; fi\n';
script += 'sudo sed -i "/xdebug/d" $ini_file\n';
break;
case 'darwin':
script += 'sudo sed -i \'\' "/xdebug/d" $ini_file\n';
break;
case 'win32':
script +=
'if(php -m | findstr -i xdebug) { Disable-PhpExtension xdebug C:\\tools\\php }\n';
break;
}
// success
script += await utils.addLog(
'$tick',
'coverage: pcov',
'PCOV enabled as coverage driver',
os_version
); );
// version is not supported script +=
(await utils.getCommand(os, 'extension_log')) +
'pcov "PCOV $pcov_version enabled as coverage driver"';
break; break;
case '5.6':
case '7.0': case /5\.[3-6]|7\.0/.test(version):
script += await utils.addLog( script += await utils.addLog(
'$cross', '$cross',
'pcov', 'pcov',
'PHP 7.1 or newer is required', 'PHP 7.1 or newer is required',
os_version os
); );
break; break;
} }
@ -92,47 +99,20 @@ export async function addCoveragePCOV(
* Function to disable Xdebug and PCOV * Function to disable Xdebug and PCOV
* *
* @param version * @param version
* @param os_version * @param os
* @param pipe
*/ */
export async function disableCoverage( export async function disableCoverage(
version: string, version: string,
os_version: string os: string,
pipe: string
): Promise<string> { ): Promise<string> {
let script = '\n'; let script = '\n';
switch (os_version) { script +=
case 'linux': (await extensions.addExtension(':pcov:false', version, os, true)) + pipe;
script += script +=
'if [ -e /etc/php/' + (await extensions.addExtension(':xdebug:false', version, os, true)) + pipe;
version + script += await utils.addLog('$tick', 'none', 'Disabled Xdebug and PCOV', os);
'/mods-available/xdebug.ini ]; then sudo phpdismod -v ' +
version +
' xdebug; fi\n';
script +=
'if [ -e /etc/php/' +
version +
'/mods-available/pcov.ini ]; then sudo phpdismod -v ' +
version +
' pcov; fi\n';
script += 'sudo sed -i "/xdebug/d" $ini_file\n';
script += 'sudo sed -i "/pcov/d" $ini_file\n';
break;
case 'darwin':
script += 'sudo sed -i \'\' "/xdebug/d" $ini_file\n';
script += 'sudo sed -i \'\' "/pcov/d" $ini_file\n';
break;
case 'win32':
script +=
'if(php -m | findstr -i xdebug) { Disable-PhpExtension xdebug C:\\tools\\php }\n';
script +=
'if(php -m | findstr -i pcov) { Disable-PhpExtension pcov C:\\tools\\php }\n';
break;
}
script += await utils.addLog(
'$tick',
'none',
'Disabled Xdebug and PCOV',
os_version
);
return script; return script;
} }
@ -142,23 +122,27 @@ export async function disableCoverage(
* *
* @param coverage_driver * @param coverage_driver
* @param version * @param version
* @param os_version * @param os
*/ */
export async function addCoverage( export async function addCoverage(
coverage_driver: string, coverage_driver: string,
version: string, version: string,
os_version: string os: string
): Promise<string> { ): Promise<string> {
coverage_driver.toLowerCase(); coverage_driver = coverage_driver.toLowerCase();
const script: string = const script: string = '\n' + (await utils.stepLog('Setup Coverage', os));
'\n' + (await utils.stepLog('Setup Coverage', os_version)); const pipe: string = (await utils.suppressOutput(os)) + '\n';
switch (coverage_driver) { switch (coverage_driver) {
case 'pcov': case 'pcov':
return script + (await addCoveragePCOV(version, os_version)); return script + (await addCoveragePCOV(version, os, pipe));
case 'xdebug': case 'xdebug':
return script + (await addCoverageXdebug(version, os_version)); case 'xdebug2':
case 'xdebug3':
return (
script + (await addCoverageXdebug(coverage_driver, version, os, pipe))
);
case 'none': case 'none':
return script + (await disableCoverage(version, os_version)); return script + (await disableCoverage(version, os, pipe));
default: default:
return ''; return '';
} }

Binary file not shown.

View File

@ -1,4 +1,3 @@
import * as path from 'path';
import * as utils from './utils'; import * as utils from './utils';
/** /**
@ -12,31 +11,104 @@ export async function addExtensionDarwin(
version: string version: string
): Promise<string> { ): Promise<string> {
const extensions: Array<string> = await utils.extensionArray(extension_csv); const extensions: Array<string> = await utils.extensionArray(extension_csv);
let script = '\n'; let add_script = '\n';
await utils.asyncForEach(extensions, async function(extension: string) { let remove_script = '';
extension = extension.toLowerCase(); await utils.asyncForEach(extensions, async function (extension: string) {
// add script to enable extension is already installed along with php const version_extension: string = version + extension;
let install_command = ''; const [ext_name, ext_version]: string[] = extension.split('-');
switch (version + extension) { const ext_prefix = await utils.getExtensionPrefix(ext_name);
case '5.6xdebug':
install_command = 'sudo pecl install xdebug-2.5.5 >/dev/null 2>&1'; switch (true) {
break; // match :extension
case '5.6redis': case /^:/.test(ext_name):
install_command = 'sudo pecl install redis-2.2.8 >/dev/null 2>&1'; remove_script += '\ndisable_extension' + ext_name.replace(/:/g, ' ');
return;
// Match none
case /^none$/.test(ext_name):
add_script += '\ndisable_all_shared';
return;
// match extensions for compiling from source
case /.+-.+\/.+@.+/.test(extension):
add_script += await utils.parseExtensionSource(extension, ext_prefix);
return;
// match 7.4relay...8.5relay
// match 5.3blackfire...8.5blackfire
// match 5.3blackfire-(semver)...8.5blackfire-(semver)
// match couchbase, event, geos, ibm_db2, pdo_ibm, pdo_oci, oci8, http, pecl_http
// match 5.3ioncube...8.4ioncube
// match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, and 7.4phalcon5...8.4phalcon5
// match 7.0zephir_parser...8.4zephir_parser
case /^(7\.4|8\.[0-5])relay(-v?\d+\.\d+\.\d+|-nightly)?$/.test(
version_extension
):
case /^(5\.[3-6]|7\.[0-4]|8\.[0-5])blackfire(-\d+\.\d+\.\d+)?$/.test(
version_extension
):
case /^couchbase|^event|^gearman$|^geos$|^ibm_db2$|^pdo_ibm$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(
extension
):
case /^(5\.[3-6]|7\.[0-4]|8\.[0-4])ioncube$/.test(version_extension):
case /(5\.6|7\.[0-3])phalcon3|7\.[2-4]phalcon4|(7\.4|8\.[0-4])phalcon5?/.test(
version_extension
):
case /(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(version_extension):
case /^(7\.[0-4]|8\.[0-4])zephir_parser(-v?\d+\.\d+\.\d+)?$/.test(
version_extension
):
add_script += await utils.customPackage(
ext_name,
'extensions',
extension,
'darwin'
);
return;
// match pre-release versions. For example - xdebug-beta
case /.+-(stable|beta|alpha|devel|snapshot|rc|preview)/.test(extension):
add_script += await utils.joins(
'\nadd_unstable_extension',
ext_name,
ext_version,
ext_prefix
);
return;
// match semver
case /.+-\d+(\.\d+\.\d+.*)?/.test(extension):
add_script += await utils.joins(
'\nadd_pecl_extension',
ext_name,
ext_version,
ext_prefix
);
return;
// match 5.3pcov to 7.0pcov
case /(5\.[3-6]|7\.0)pcov/.test(version_extension):
add_script += await utils.getUnsupportedLog('pcov', version, 'darwin');
return;
// match brew extensions
case /(?<!5\.[3-5])(amqp|apcu|brotli|excimer|expect|gmagick|gnupg|grpc|igbinary|imagick|imap|interbase|mailparse|maxminddb|mcrypt|memcache|memcached|mongodb|mongodb1|msgpack|newrelic|oauth|opentelemetry|pdo_firebird|pinba|protobuf|psr|raphf|rdkafka|redis|scalar_objects|seaslog|snmp|spx|ssh2|swoole|uopz|uploadprogress|uuid|vld|xdebug|xdebug2|xhprof|yaml|zmq|zstd)/.test(
version_extension
):
case /(?<!5\.[3-6])(ds|v8js)/.test(version_extension):
case /(5\.6|7\.[0-4])(propro|lua)/.test(version_extension):
case /(?<!5\.[3-6]|7\.0)pcov/.test(version_extension):
case /(?<!5\.[3-6])(ast|vips|xlswriter)/.test(version_extension):
case /^(8\.[0-5])swow$/.test(version_extension):
add_script += await utils.joins(
'\nadd_brew_extension',
ext_name,
ext_prefix
);
return;
// match sqlite
case /^sqlite$/.test(extension):
extension = 'sqlite3';
break; break;
default: default:
install_command = 'sudo pecl install ' + extension + ' >/dev/null 2>&1';
break; break;
} }
script += add_script += await utils.joins('\nadd_extension', extension, ext_prefix);
'\nadd_extension ' +
extension +
' "' +
install_command +
'" ' +
(await utils.getExtensionPrefix(extension));
}); });
return script; return add_script + remove_script;
} }
/** /**
@ -50,19 +122,117 @@ export async function addExtensionWindows(
version: string version: string
): Promise<string> { ): Promise<string> {
const extensions: Array<string> = await utils.extensionArray(extension_csv); const extensions: Array<string> = await utils.extensionArray(extension_csv);
let script = '\n'; let add_script = '\n';
await utils.asyncForEach(extensions, async function(extension: string) { let remove_script = '';
// add script to enable extension is already installed along with php await utils.asyncForEach(extensions, async function (extension: string) {
switch (version + extension) { const [ext_name, ext_version]: string[] = extension.split('-');
case '7.4redis': const version_extension: string = version + extension;
script += '\nAdd-Extension ' + extension + ' beta'; let matches: RegExpExecArray;
switch (true) {
// Match :extension
case /^:/.test(ext_name):
remove_script += '\nDisable-Extension' + ext_name.replace(/:/g, ' ');
break;
// Match none
case /^none$/.test(ext_name):
add_script += '\nDisable-AllShared';
break;
// match 5.3blackfire...8.5blackfire
// match 5.3blackfire-(semver)...8.5blackfire-(semver)
// match ibm_db2, pdo_ibm, pdo_oci and oci8
// match 5.3ioncube...8.4ioncube
// match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, and 7.4phalcon5...8.4phalcon5
// match 7.1pecl_http...8.1pecl_http and 7.1http...8.1http
// match 7.0zephir_parser...8.4zephir_parser
case /^(5\.[3-6]|7\.[0-4]|8\.[0-5])blackfire(-\d+\.\d+\.\d+)?$/.test(
version_extension
):
case /^ibm_db2$|^pdo_ibm$|^pdo_oci$|^oci8$|^pdo_firebird$/.test(
extension
):
case /^(5\.[3-6]|7\.[0-4]|8\.[0-4])ioncube$/.test(version_extension):
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-4])phalcon5?$/.test(
version_extension
):
case /^(7\.[1-4]|8\.1)(pecl_)?http/.test(version_extension):
case /(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(version_extension):
case /^(7\.[0-4]|8\.[0-4])zephir_parser(-v?\d+\.\d+\.\d+)?$/.test(
version_extension
):
add_script += await utils.customPackage(
ext_name,
'extensions',
extension,
'win32'
);
return;
// match pre-release versions. For example - xdebug-beta
case /.+-(stable|beta|alpha|devel|snapshot)/.test(extension):
add_script += await utils.joins(
'\nAdd-Extension',
ext_name,
ext_version.replace('stable', '')
);
break;
// match extensions for compiling from source
case /.+-.+\/.+@.+/.test(extension):
add_script += await utils.getUnsupportedLog(
extension,
version,
'win32'
);
break;
// match semver with state
case /.+-\d+\.\d+\.\d+[a-zA-Z]+\d*/.test(extension):
matches = /.+-(\d+\.\d+\.\d+)([a-zA-Z]+)\d*/.exec(
version_extension
) as RegExpExecArray;
add_script += await utils.joins(
'\nAdd-Extension',
ext_name,
matches[2].replace('preview', 'devel'),
matches[1]
);
break;
// match semver without state
case /.+-\d+(\.\d+\.\d+.*)?/.test(extension):
add_script += await utils.joins(
'\nAdd-Extension',
ext_name,
'stable',
ext_version
);
break;
// match 7.2xdebug2 to 7.4xdebug2
case /7\.[2-4]xdebug2/.test(version_extension):
add_script += '\nAdd-Extension xdebug stable 2.9.8';
break;
// match 5.3pcov to 7.0pcov
case /(5\.[3-6]|7\.0)pcov/.test(version_extension):
add_script += await utils.getUnsupportedLog('pcov', version, 'win32');
break;
// match 5.3 to 5.6 - mysql, mysqli, mysqlnd
case /^5\.[3-6](?<!pdo_)(mysql|mysqli|mysqlnd)$/.test(version_extension):
add_script +=
'\nAdd-Extension mysql\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
break;
// match 7.0 and newer mysql, mysqli and mysqlnd
case /(?<!5\.[3-6])(?<!pdo_)(mysql|mysqli|mysqlnd)$/.test(
version_extension
):
add_script += '\nAdd-Extension mysqli\nAdd-Extension mysqlnd';
break;
// match sqlite
case /^sqlite$/.test(extension):
extension = 'sqlite3';
add_script += await utils.joins('\nAdd-Extension', extension);
break; break;
default: default:
script += '\nAdd-Extension ' + extension; add_script += '\nAdd-Extension ' + extension;
break; break;
} }
}); });
return script; return add_script + remove_script;
} }
/** /**
@ -76,56 +246,110 @@ export async function addExtensionLinux(
version: string version: string
): Promise<string> { ): Promise<string> {
const extensions: Array<string> = await utils.extensionArray(extension_csv); const extensions: Array<string> = await utils.extensionArray(extension_csv);
let script = '\n'; let add_script = '\n';
await utils.asyncForEach(extensions, async function(extension: string) { let remove_script = '';
extension = extension.toLowerCase(); await utils.asyncForEach(extensions, async function (extension: string) {
// add script to enable extension is already installed along with php const version_extension: string = version + extension;
const [ext_name, ext_version]: string[] = extension
.split(/-(.+)/)
.filter(Boolean);
const ext_prefix = await utils.getExtensionPrefix(ext_name);
let install_command = ''; switch (true) {
switch (version + extension) { // Match :extension
case '7.4redis': case /^:/.test(ext_name):
install_command = remove_script += '\ndisable_extension' + ext_name.replace(/:/g, ' ');
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php7.4-igbinary php7.4-redis >/dev/null 2>&1'; return;
break; // Match none
case '7.2phalcon3': case /^none$/.test(ext_name):
case '7.3phalcon3': add_script += '\ndisable_all_shared';
install_command = return;
'sh ' + // match extensions for compiling from source
path.join(__dirname, '../src/scripts/phalcon.sh') + case /.+-.+\/.+@.+/.test(extension):
' master ' + add_script += await utils.parseExtensionSource(extension, ext_prefix);
version + return;
' >/dev/null 2>&1'; // match 7.4relay...8.5relay
break; // match 5.3blackfire...8.5blackfire
case '7.2phalcon4': // match 5.3blackfire-(semver)...8.5blackfire-(semver)
case '7.3phalcon4': // match 5.3pdo_cubrid...7.2php_cubrid, 5.3cubrid...7.4cubrid
case '7.4phalcon4': // match couchbase, geos, ibm_db2, pdo_ibm, pdo_oci, oci8, http, pecl_http
install_command = // match 5.3ioncube...8.4ioncube
'sh ' + // match 7.0phalcon3...7.3phalcon3, 7.2phalcon4...7.4phalcon4, 7.4phalcon5...8.4phalcon5
path.join(__dirname, '../src/scripts/phalcon.sh') + // match 7.0zephir_parser...8.4zephir_parser
' 4.0.x ' + case /^(7\.4|8\.[0-5])relay(-v?\d+\.\d+\.\d+|-nightly)?$/.test(
version + version_extension
' >/dev/null 2>&1'; ):
case /^(5\.[3-6]|7\.[0-4]|8\.[0-5])blackfire(-\d+\.\d+\.\d+)?$/.test(
version_extension
):
case /^((5\.[3-6])|(7\.[0-2]))pdo_cubrid$|^((5\.[3-6])|(7\.[0-4]))cubrid$/.test(
version_extension
):
case /^couchbase|^event|^gearman$|^geos$|^ibm_db2$|^pdo_ibm$|^pdo_oci$|^oci8$|^(pecl_)?http|^pdo_firebird$/.test(
extension
):
case /(?<!5\.[3-5])intl-\d+\.\d+$/.test(version_extension):
case /^(5\.[3-6]|7\.[0-4]|8\.[0-4])ioncube$/.test(version_extension):
case /^7\.[0-3]phalcon3$|^7\.[2-4]phalcon4$|^(7\.4|8\.[0-4])phalcon5?$/.test(
version_extension
):
case /(?<!5\.[3-6])(pdo_)?sqlsrv$/.test(version_extension):
case /^(7\.[0-4]|8\.[0-4])zephir_parser(-v?\d+\.\d+\.\d+)?$/.test(
version_extension
):
add_script += await utils.customPackage(
ext_name,
'extensions',
extension,
'linux'
);
return;
// match pre-release versions. For example - xdebug-beta
case /.+-(stable|beta|alpha|devel|snapshot|rc|preview)/.test(extension):
add_script += await utils.joins(
'\nadd_unstable_extension',
ext_name,
ext_version,
ext_prefix
);
return;
// match semver versions
case /.+-\d+(\.\d+\.\d+.*)?/.test(extension):
add_script += await utils.joins(
'\nadd_pecl_extension',
ext_name,
ext_version,
ext_prefix
);
return;
// match 5.3pcov to 7.0pcov
case /(5\.[3-6]|7\.0)pcov/.test(version_extension):
add_script += await utils.getUnsupportedLog('pcov', version, 'linux');
return;
// match 7.2xdebug2...7.4xdebug2
case /^7\.[2-4]xdebug2$/.test(version_extension):
add_script += await utils.joins(
'\nadd_pecl_extension',
'xdebug',
'2.9.8',
ext_prefix
);
return;
// match pdo extensions
case /^pdo[_-].+/.test(extension):
extension = extension.replace(/pdo[_-]|3/, '');
add_script += '\nadd_pdo_extension ' + extension;
return;
// match sqlite
case /^sqlite$/.test(extension):
extension = 'sqlite3';
break; break;
default: default:
install_command =
'sudo DEBIAN_FRONTEND=noninteractive apt-get install -y php' +
version +
'-' +
extension.replace('pdo_', '').replace('pdo-', '') +
' >/dev/null 2>&1 || sudo pecl install ' +
extension +
' >/dev/null 2>&1';
break; break;
} }
script += add_script += await utils.joins('\nadd_extension', extension, ext_prefix);
'\nadd_extension ' +
extension +
' "' +
install_command +
'" ' +
(await utils.getExtensionPrefix(extension));
}); });
return script; return add_script + remove_script;
} }
/** /**
@ -133,29 +357,28 @@ export async function addExtensionLinux(
* *
* @param extension_csv * @param extension_csv
* @param version * @param version
* @param os_version * @param os
* @param log_prefix * @param no_step
*/ */
export async function addExtension( export async function addExtension(
extension_csv: string, extension_csv: string,
version: string, version: string,
os_version: string, os: string,
no_step = false no_step = false
): Promise<string> { ): Promise<string> {
const log: string = await utils.stepLog('Setup Extensions', os);
let script = '\n'; let script = '\n';
switch (no_step) { switch (no_step) {
case true: case true:
script += script += log + (await utils.suppressOutput(os));
(await utils.stepLog('Setup Extensions', os_version)) +
(await utils.suppressOutput(os_version));
break; break;
case false: case false:
default: default:
script += await utils.stepLog('Setup Extensions', os_version); script += log;
break; break;
} }
switch (os_version) { switch (os) {
case 'win32': case 'win32':
return script + (await addExtensionWindows(extension_csv, version)); return script + (await addExtensionWindows(extension_csv, version));
case 'darwin': case 'darwin':
@ -164,8 +387,8 @@ export async function addExtension(
return script + (await addExtensionLinux(extension_csv, version)); return script + (await addExtensionLinux(extension_csv, version));
default: default:
return await utils.log( return await utils.log(
'Platform ' + os_version + ' is not supported', 'Platform ' + os + ' is not supported',
os_version, os,
'error' 'error'
); );
} }

42
src/fetch.ts Normal file
View File

@ -0,0 +1,42 @@
/**
* Redirect status codes set for O(1) lookup
*/
const REDIRECT_CODES = new Set([301, 302, 303, 307, 308]);
/**
* Function to fetch a URL using native fetch API (Node 24+)
*
* @param input_url
* @param auth_token
* @param redirect_count
*/
export async function fetch(
input_url: string,
auth_token?: string,
redirect_count = 5
): Promise<Record<string, string>> {
const headers: Record<string, string> = {
'User-Agent': `Mozilla/5.0 (${process.platform} ${process.arch}) setup-php`
};
if (auth_token) {
headers['Authorization'] = 'Bearer ' + auth_token;
}
try {
const response = await globalThis.fetch(input_url, {
headers,
redirect: redirect_count > 0 ? 'follow' : 'manual'
});
if (response.ok) {
const data = await response.text();
return {data};
} else if (REDIRECT_CODES.has(response.status) && redirect_count <= 0) {
return {error: `${response.status}: Redirect error`};
} else {
return {error: `${response.status}: ${response.statusText}`};
}
} catch (error) {
return {error: `Fetch error: ${(error as Error).message}`};
}
}

View File

@ -1,72 +1,74 @@
import {exec} from '@actions/exec/lib/exec'; import path from 'path';
import * as core from '@actions/core'; import fs from 'fs';
import {exec} from '@actions/exec';
import * as config from './config'; import * as config from './config';
import * as core from './core';
import * as coverage from './coverage'; import * as coverage from './coverage';
import * as extensions from './extensions'; import * as extensions from './extensions';
import * as tools from './tools';
import * as utils from './utils'; import * as utils from './utils';
/** /**
* Build the script * Build the script
* *
* @param filename * @param os
* @param version
* @param os_version
*/ */
export async function build( export async function getScript(os: string): Promise<string> {
filename: string, const url = 'https://setup-php.com/sponsor';
version: string, const filename = os + (await utils.scriptExtension(os));
os_version: string const script_path = path.join(__dirname, '../src/scripts', filename);
): Promise<string> { const run_path = script_path.replace(os, 'run');
// taking inputs const extension_csv: string = await utils.getInput('extensions', false);
const extension_csv: string = await utils.getInput('extension-csv', false); const ini_values_csv: string = await utils.getInput('ini-values', false);
const ini_values_csv: string = await utils.getInput('ini-values-csv', false);
const coverage_driver: string = await utils.getInput('coverage', false); const coverage_driver: string = await utils.getInput('coverage', false);
const tools_csv: string = await utils.getInput('tools', false);
let script: string = await utils.readScript(filename, version, os_version); const version: string = await utils.parseVersion(
await utils.readPHPVersion()
);
const ini_file: string = await utils.parseIniFile(
await utils.getInput('ini-file', false)
);
let script = await utils.joins('.', script_path, version, ini_file);
if (extension_csv) { if (extension_csv) {
script += await extensions.addExtension(extension_csv, version, os_version); script += await extensions.addExtension(extension_csv, version, os);
}
script += await tools.addTools(tools_csv, version, os);
if (coverage_driver) {
script += await coverage.addCoverage(coverage_driver, version, os);
} }
if (ini_values_csv) { if (ini_values_csv) {
script += await config.addINIValues(ini_values_csv, os_version); script += await config.addINIValues(ini_values_csv, os);
}
if (coverage_driver) {
script += await coverage.addCoverage(coverage_driver, version, os_version);
} }
script += '\n' + (await utils.stepLog(`Sponsor setup-php`, os));
script += '\n' + (await utils.addLog('$tick', 'setup-php', url, os));
return await utils.writeScript(filename, script); fs.writeFileSync(run_path, script, {mode: 0o755});
return run_path;
}
/**
* Function to set environment variables based on inputs.
*/
export async function setEnv(): Promise<void> {
process.env['fail_fast'] = await utils.getInput('fail-fast', false);
process.env['GITHUB_TOKEN'] ??= await utils.getInput('github-token', false);
} }
/** /**
* Run the script * Run the script
*/ */
export async function run(): Promise<void> { export async function run(): Promise<void> {
try { await setEnv();
const os_version: string = process.platform; const os: string = process.platform;
const version: string = await utils.getVersion(); const tool = await utils.scriptTool(os);
// check the os version and run the respective script const run_path = await getScript(os);
let script_path = ''; await exec(tool + run_path);
switch (os_version) {
case 'darwin':
script_path = await build(os_version + '.sh', version, os_version);
await exec('sh ' + script_path + ' ' + version + ' ' + __dirname);
break;
case 'linux': {
const pecl: string = await utils.getInput('pecl', false);
script_path = await build(os_version + '.sh', version, os_version);
await exec('sh ' + script_path + ' ' + version + ' ' + pecl);
break;
}
case 'win32':
script_path = await build('win32.ps1', version, os_version);
await exec(
'pwsh ' + script_path + ' -version ' + version + ' -dir ' + __dirname
);
break;
}
} catch (error) {
core.setFailed(error.message);
}
} }
// call the run function // call the run function
run(); (async () => {
await run();
})().catch(error => {
core.setFailed(error.message);
});

37
src/packagist.ts Normal file
View File

@ -0,0 +1,37 @@
import * as cv from 'compare-versions';
import * as fetch from './fetch';
type RS = Record<string, string>;
type RSRS = Record<string, RS>;
export async function search(
package_name: string,
php_version: string
): Promise<string | null> {
const response = await fetch.fetch(
`https://repo.packagist.org/p2/${package_name}.json`
);
if (response.error || response.data === '[]') {
return null;
}
const data = JSON.parse(response['data']);
if (data && data.packages) {
const versions = data.packages[package_name];
versions.sort((a: RS, b: RS) => cv.compareVersions(b.version, a.version));
const result = versions.find((versionData: RSRS) => {
if (versionData?.require?.php) {
return versionData?.require?.php
.split('|')
.some(
require => require && cv.satisfies(php_version + '.0', require)
);
}
return false;
});
return result ? result.version : null;
}
return null;
}

View File

@ -1,116 +0,0 @@
tick="✓"
cross="✗"
step_log() {
message=$1
printf "\n\033[90;1m==> \033[0m\033[37;1m%s\033[0m\n" "$message"
}
add_log() {
mark=$1
subject=$2
message=$3
if [ "$mark" = "$tick" ]; then
printf "\033[32;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message"
else
printf "\033[31;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message"
fi
}
version='7.4.0'
step_log "Setup dependencies"
for package in pkg-config autoconf bison re2c openssl@1.1 krb5 enchant libffi freetype intltool icu4c libiconv t1lib gd libzip gmp tidyp libxml2 libxslt postgresql curl;
do
brew install "$package" >/dev/null 2>&1
add_log "$tick" "$package" "Installed"
done
brew link icu4c gettext --force >/dev/null 2>&1
for package in gettext gmp krb5 icu4c bison openssl@1.1 libxml2 libffi libxslt libiconv pkgconfig enchant krb5 readline libedit freetype;
do
caps_package=$(echo "$package" | tr '[:lower:]' '[:upper:]')
{
echo 'export PATH="/usr/local/opt/'"$package"'/bin:$PATH"'
echo 'export PKG_CONFIG_PATH="/usr/local/opt/'$package'/lib/pkgconfig:$PKG_CONFIG_PATH"'
echo 'export '"$caps_package"'_LIBS="-L/usr/local/opt/'$package'/lib"'
echo 'export '"$caps_package"'_CFLAGS="-I/usr/local/opt/'$package'/include"'
} >> ~/.bash_profile;
done
{
echo 'export ICONV_LIBS="-L/usr/local/opt/libiconv/lib"'
echo 'export ICONV_CFLAGS="-I/usr/local/opt/libiconv/include"'
echo 'export LIBXML_LIBS="-L/usr/local/opt/libxml2/lib"'
echo 'export LIBXML_CFLAGS="-I/usr/local/opt/libxml2/include"'
echo 'export ICU_LIBS="-L/usr/local/opt/icu4c/lib"'
echo 'export ICU_CFLAGS="-I/usr/local/opt/icu4c/include"'
echo 'export OPENSSL_LIBS="-L/usr/local/opt/openssl@1.1/lib -lcrypto"'
echo 'export OPENSSL_CFLAGS="-I/usr/local/opt/openssl@1.1/include"'
echo 'export OPENSSL_ROOT_DIR="/usr/local/opt/openssl@1.1/"'
echo 'export OPENSSL_LIB_DIR="/usr/local/opt/openssl@1.1/lib"'
echo 'export OPENSSL_INCLUDE_DIR="/usr/local/opt/openssl@1.1/include"'
echo 'export PKG_CONFIG="/usr/local/opt/pkgconfig/bin/pkg-config"'
echo 'export EXTRA_LIBS="/usr/local/opt/readline/lib/libhistory.dylib
/usr/local/opt/readline/lib/libreadline.dylib
/usr/local/opt/openssl@1.1/lib/libssl.dylib
/usr/local/opt/openssl@1.1/lib/libcrypto.dylib
/usr/local/opt/icu4c/lib/libicudata.dylib
/usr/local/opt/icu4c/lib/libicui18n.dylib
/usr/local/opt/icu4c/lib/libicuio.dylib
/usr/local/opt/icu4c/lib/libicutu.dylib
/usr/local/opt/icu4c/lib/libicuuc.dylib"'
} >> ~/.bash_profile
config_file=$2/../src/configs/config.yaml
step_log "Setup PHPBrew"
curl -L -O https://github.com/phpbrew/phpbrew/raw/master/phpbrew >/dev/null 2>&1
chmod +x ./phpbrew
sudo mv phpbrew /usr/local/bin/phpbrew
sudo mkdir -p /opt/phpbrew
sudo mkdir -p /usr/local/lib
sudo mkdir -p /usr/local/bin
sudo phpbrew init --root=/opt/phpbrew --config="$config_file" >/dev/null 2>&1
sudo chmod -R 777 /opt/phpbrew
export PHPBREW_ROOT=/opt/phpbrew
export PHPBREW_HOME=/opt/phpbrew
echo "[[ -e ~/.phpbrew/bashrc ]] && source ~/.phpbrew/bashrc" >> ~/.bashrc
add_log "$tick" "PHPBrew" "Installed"
source ~/.bash_profile >/dev/null 2>&1
source ~/.bashrc >/dev/null 2>&1
step_log "Setup PHP and Composer"
phpbrew install -j 6 github:php/php-src@PHP-$version as php-$version +dev >/dev/null 2>&1
phpbrew switch $version
sudo ln -sf /opt/phpbrew/php/php-$version/bin/* /usr/local/bin/
sudo ln -sf /opt/phpbrew/php/php-$version/etc/php.ini /etc/php.ini
ini_file=$(php --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g")
ext_dir=$(php -i | grep "extension_dir => /opt" | sed -e "s|.*=> s*||")
pecl config-set php_ini "$ini_file" >/dev/null 2>&1
pear config-set php_ini "$ini_file" >/dev/null 2>&1
sudo chmod 777 "$ini_file"
brew install composer >/dev/null 2>&1
add_log "$tick" "PHP" "Installed PHP$version"
add_log "$tick" "Composer" "Installed"
add_extension() {
extension=$1
install_command=$2
prefix=$3
if ! php -m | grep -i -q "$extension" && [ -e "$ext_dir/$extension.so" ]; then
echo "$prefix=$extension" >>"$ini_file" && add_log "$tick" "$extension" "Enabled"
elif php -m | grep -i -q "$extension"; then
add_log "$tick" "$extension" "Enabled"
elif ! php -m | grep -i -q "$extension"; then
exists=$(curl -sL https://pecl.php.net/json.php?package="$extension" -w "%{http_code}" -o /dev/null)
if [ "$exists" = "200" ]; then
(
eval "$install_command" && \
add_log "$tick" "$extension" "Installed and enabled"
) || add_log "$cross" "$extension" "Could not install $extension on PHP$version"
else
if ! php -m | grep -i -q "$extension"; then
add_log "$cross" "$extension" "Could not find $extension for PHP$version on PECL"
fi
fi
fi
}

View File

@ -1,56 +1,311 @@
tick="✓" # Handle dependency extensions
cross="✗" handle_dependency_extensions() {
local formula=$1
step_log() { local extension=$2
message=$1 formula_file="${tap_dir:?}/$ext_tap/Formula/$extension@${version:?}.rb"
printf "\n\033[90;1m==> \033[0m\033[37;1m%s\033[0m\n" "$message" [ -e "$formula_file" ] || formula_file="$tap_dir/$ext_tap/Formula/$formula@$version.rb"
} if [ -e "$formula_file" ]; then
IFS=" " read -r -a dependency_extensions <<< "$(grep -Eo "shivammathur.*@" "$formula_file" | xargs -I {} -n 1 basename '{}' | cut -d '@' -f 1 | tr '\n' ' ')"
add_log() { for dependency_extension in "${dependency_extensions[@]}"; do
mark=$1 sudo sed -Ei '' "/=(.*\/)?\"?$dependency_extension(.so)?$/d" "${ini_file:?}"
subject=$2 done
message=$3 fi
if [ "$mark" = "$tick" ]; then suffix="$(get_php_formula_suffix)"
printf "\033[32;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message" if [[ -n "$suffix" ]]; then
else brew_opts=(-sf)
printf "\033[31;1m%s \033[0m\033[34;1m%s \033[0m\033[90;1m%s\033[0m\n" "$mark" "$subject" "$message" patch_abstract_file >/dev/null 2>&1
for dependency_extension in "${dependency_extensions[@]}"; do
safe_brew install --skip-link "${brew_opts[@]}" "$ext_tap/$dependency_extension@$version" >/dev/null 2>&1 &&
brew link --overwrite --force "$dependency_extension@$version" >/dev/null 2>&1 &&
copy_brew_extensions "$dependency_extension"
done
fi fi
} }
step_log "Setup PHP and Composer" # Helper function to disable an extension.
version=$1 disable_extension_helper() {
export HOMEBREW_NO_INSTALL_CLEANUP=TRUE local extension=$1
brew tap shivammathur/homebrew-php >/dev/null 2>&1 local disable_dependents=${2:-false}
brew install shivammathur/php/php@"$1" composer >/dev/null 2>&1 get_extension_map
brew link --force --overwrite php@"$1" >/dev/null 2>&1 if [ "$disable_dependents" = "true" ]; then
ini_file=$(php -d "date.timezone=UTC" --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g") disable_extension_dependents "$extension"
echo "date.timezone=UTC" >> "$ini_file" fi
ext_dir=$(php -i | grep "extension_dir => /usr" | sed -e "s|.*=> s*||") sudo sed -Ei '' "/=(.*\/)?\"?$extension(.so)?$/d" "${ini_file:?}"
sudo chmod 777 "$ini_file" sudo rm -rf "$scan_dir"/*"$extension"* /tmp/php"$version"_extensions
mkdir -p "$(pecl config-get ext_dir)" mkdir -p /tmp/extdisabled/"$version"
composer global require hirak/prestissimo >/dev/null 2>&1 echo '' | sudo tee /tmp/extdisabled/"$version"/"$extension" >/dev/null 2>&1
add_log "$tick" "PHP" "Installed PHP $(php -v | head -n 1 | cut -c 5-10)" }
add_log "$tick" "Composer" "Installed"
add_extension() { # Function to get extension name from brew formula.
extension=$1 get_extension_from_formula() {
install_command=$2 local formula=$1
prefix=$3 local extension
if ! php -m | grep -i -q "$extension" && [ -e "$ext_dir/$extension.so" ]; then extension=$(grep -E "^$formula=" "$src"/configs/brew_extensions | cut -d '=' -f 2)
echo "$prefix=$extension" >>"$ini_file" && add_log $tick "$extension" "Enabled" [[ -z "$extension" ]] && extension="$(echo "$formula" | sed -E "s/pecl_|php|[0-9]//g")"
elif php -m | grep -i -q "$extension"; then echo "$extension"
add_log "$tick" "$extension" "Enabled" }
elif ! php -m | grep -i -q "$extension"; then
exists=$(curl -sL https://pecl.php.net/json.php?package="$extension" -w "%{http_code}" -o /dev/null) # Function to get renamed formula.
if [ "$exists" = "200" ]; then get_renamed_formula() {
( local formula=$1
eval "$install_command" && \ formula_renames_json="$tap_dir/$ext_tap/formula_renames.json"
add_log "$tick" "$extension" "Installed and enabled" if [ -e "$formula_renames_json" ] && grep -q "$formula@$version\":" "$formula_renames_json"; then
) || add_log "$cross" "$extension" "Could not install $extension on PHP$version" grep "$formula@$version\":" "$formula_renames_json" | cut -d ':' -f 2 | tr -d ' ",' | cut -d '@' -f 1
else else
if ! php -m | grep -i -q "$extension"; then echo "$formula"
add_log "$cross" "$extension" "Could not find $extension for PHP$version on PECL" fi
}
# Function to copy extension binaries to the extension directory.
copy_brew_extensions() {
local formula=$1
formula_file="$tap_dir/$ext_tap/Formula/$formula@$version.rb"
deps="$(grep -Eo 'depends_on "shivammathur[^"]+' "$formula_file" | cut -d '/' -f 3 | tr '\n' ' ')"
IFS=' ' read -r -a deps <<< "$formula@$version $deps"
for dependency in "${deps[@]}"; do
extension_file="${brew_prefix:?}/opt/$dependency/$(get_extension_from_formula "${dependency%@*}").so"
[ -e "$extension_file" ] && sudo cp "$extension_file" "$ext_dir"
done
if [ -d "$brew_prefix"/Cellar/"$formula"@"$version" ]; then
sudo find -- "$brew_prefix"/Cellar/"$formula"@"$version" -name "*.dylib" -exec cp {} "$ext_dir" \;
fi
}
# Function to install a php extension from shivammathur/extensions tap.
add_brew_extension() {
formula=$1
prefix=$2
extension="$(get_extension_from_formula "$formula")"
enable_extension "$extension" "$prefix"
if check_extension "$extension"; then
add_log "${tick:?}" "$extension" "Enabled"
else
add_brew_tap "$php_tap"
add_brew_tap "$ext_tap"
formula="$(get_renamed_formula "$formula")"
update_dependencies >/dev/null 2>&1
handle_dependency_extensions "$formula" "$extension" >/dev/null 2>&1
(
safe_brew install --skip-link "${brew_opts[@]}" "$ext_tap/$formula@$version" >/dev/null 2>&1 &&
brew link --overwrite --force "$formula@$version" >/dev/null 2>&1 &&
copy_brew_extensions "$formula"
) || pecl_install "$extension" >/dev/null 2>&1
add_extension_log "$extension" "Installed and enabled"
fi
}
# Function to patch the abstract file in the extensions tap.
patch_abstract_file() {
abstract_path="$tap_dir"/"$ext_tap"/Abstract/abstract-php-extension.rb
if [[ -e "$abstract_path" && ! -e /tmp/abstract_patch ]]; then
echo '' | sudo tee /tmp/abstract_patch >/dev/null 2>&1
sudo sed -i '' -e "s|php@#{\(.*\)}|php@#{\1}$suffix|g" -e "s|php_version /|\"#{php_version}$suffix\" /|g" "$abstract_path"
fi
}
# Helper function to add an extension.
add_extension_helper() {
local extension=$1
prefix=$2
if [[ "$version" =~ ${old_versions:?} ]] && [ "$extension" = "imagick" ]; then
run_script "php5-darwin" "${version/./}" "$extension" >/dev/null 2>&1
else
pecl_install "$extension" >/dev/null 2>&1 &&
if [[ "$version" =~ ${old_versions:?} ]]; then echo "$prefix=$ext_dir/$extension.so" >>"$ini_file"; fi
fi
add_extension_log "$extension" "Installed and enabled"
}
# Function to handle request to add phpize and php-config.
add_devtools() {
tool=$1
add_log "${tick:?}" "$tool" "Added $tool $semver"
}
# Function to handle request to add PECL.
add_pecl() {
enable_extension xml extension >/dev/null 2>&1
configure_pecl >/dev/null 2>&1
pear_version=$(get_tool_version "pecl" "version")
add_log "${tick:?}" "PECL" "Found PECL $pear_version"
}
# Link opcache extension to extensions directory.
link_opcache() {
opcache_ini="$brew_prefix"/etc/php/"$version"/conf.d/ext-opcache.ini
if [ -e "$opcache_ini" ]; then
opcache_ext=$(grep -Eo "zend_extension.*opcache.*\.so" "$opcache_ini" | cut -d '"' -f 2)
sudo ln -sf "$opcache_ext" "$ext_dir"
fi
}
# Patch brew to overwrite packages.
patch_brew() {
formula_installer="${brew_repo:?}"/Library/Homebrew/formula_installer.rb
code=" keg.link\(verbose: verbose\?"
sudo sed -Ei '' "s/$code.*/$code, overwrite: true\)/" "$formula_installer"
# shellcheck disable=SC2064
trap "sudo sed -Ei '' 's/$code.*/$code, overwrite: overwrite?\)/' $formula_installer" exit
}
# Function to update dependencies.
update_dependencies() {
patch_brew
if ! [ -e /tmp/update_dependencies ]; then
for repo in "$brew_repo" "${core_repo:?}"; do
if [ -e "$repo" ]; then
git_retry -C "$repo" fetch origin main && git -C "$repo" reset --hard origin/main
fi fi
done
echo '' | sudo tee /tmp/update_dependencies >/dev/null 2>&1
fi
}
# Function to get PHP version if it is already installed using Homebrew.
get_brewed_php() {
cellar="$brew_prefix"/Cellar
php_cellar="$cellar"/php
if [ -d "$cellar" ] && ! [[ "$(find "$cellar" -maxdepth 1 -name "php@$version*" | wc -l 2>/dev/null)" -eq 0 ]]; then
php_semver
elif [ -d "$php_cellar" ] && ! [[ "$(find "$php_cellar" -maxdepth 1 -name "$version*" | wc -l 2>/dev/null)" -eq 0 ]]; then
php_semver
else
echo 'false';
fi
}
# Function to setup PHP 5.6 and newer using Homebrew.
add_php() {
action=$1
existing_version=$2
suffix="$(get_php_formula_suffix)"
php_keg="php@$version$suffix"
php_formula="shivammathur/php/$php_keg"
if [[ "$existing_version" = "false" || -n "$suffix" || "$action" = "upgrade" ]]; then
update_dependencies
add_brew_tap "$php_tap"
fi
if [[ "$existing_version" != "false" && -z "$suffix" ]]; then
if [ "$action" = "upgrade" ]; then
safe_brew install --only-dependencies "$php_formula"
safe_brew upgrade -f --overwrite "$php_formula"
else
brew unlink "$php_keg"
fi
else
safe_brew install --only-dependencies "$php_formula"
safe_brew install --skip-link -f --overwrite "$php_formula" 2>/dev/null || safe_brew upgrade -f --overwrite "$php_formula"
fi
brew link --force --overwrite "$php_keg" || (sudo chown -R "$(id -un)":"$(id -gn)" "$brew_prefix" && brew link --force --overwrite "$php_keg")
}
# Function to get formula suffix
get_php_formula_suffix() {
local suffix
[ "${debug:?}" = "debug" ] && suffix="-debug"
[ "${ts:?}" = "zts" ] && suffix="$suffix-zts"
echo "$suffix"
}
# Function to get extra version.
php_extra_version() {
php_formula_file="$tap_dir"/"$php_tap"/Formula/php@"$version".rb
if [ -e "$php_formula_file" ] && ! grep -q "deprecate!" "$php_formula_file" && grep -Eq "archive/[0-9a-zA-Z]+" "$php_formula_file"; then
echo " ($(grep -Eo "archive/[0-9a-zA-Z]+" "$php_formula_file" | cut -d'/' -f 2))"
fi
}
# Function to set php.ini
add_php_config() {
if ! [ -e "$ini_dir"/php.ini-development ]; then
sudo cp "$ini_dir"/php.ini "$ini_dir"/php.ini-development
fi
if [[ "$ini" = "production" || "$ini" = "development" ]]; then
sudo cp "$ini_dir"/php.ini-"$ini" "$ini_dir"/php.ini
elif [ "$ini" = "none" ]; then
echo '' | sudo tee "${ini_file[@]}" >/dev/null 2>&1
fi
}
# Function to get scan directory.
get_scan_dir() {
if [[ "$version" =~ ${old_versions:?} ]]; then
php --ini | grep additional | sed -e "s|.*: s*||"
else
echo "$ini_dir"/conf.d
fi
}
# Function to handle self-hosted runner setup.
self_hosted_helper() {
sudo mkdir -p /opt/hostedtoolcache >/dev/null 2>&1 || true
}
# Function to Setup PHP.
setup_php() {
step_log "Setup PHP"
php_config="$(command -v php-config 2>/dev/null)"
update=true
check_pre_installed
existing_version=$(get_brewed_php)
status="Found"
if [[ "$version" =~ ${old_versions:?} ]]; then
run_script "php5-darwin" "${version/./}" >/dev/null 2>&1
status="Installed"
elif [ "${existing_version:0:3}" != "$version" ]; then
add_php "install" "$existing_version" >/dev/null 2>&1
status="Installed"
elif [[ "${existing_version:0:3}" = "$version" && "${update:?}" = "true" ]]; then
brew_php_version="$(brew info --json "php@$version" 2>/dev/null | jq -r '.[].versions.stable')"
if [ "$brew_php_version" != "$existing_version" ]; then
add_php "upgrade" "$existing_version" >/dev/null 2>&1
status="Upgraded"
fi fi
fi fi
} php_config="$(command -v php-config)"
ext_dir="$(sed -n "s/.*extension_dir=['\"]\(.*\)['\"].*/\1/p" "$php_config")"
ini_dir="$(php_ini_path)"
scan_dir="$(get_scan_dir)"
ini_file="$ini_dir"/php.ini
sudo mkdir -m 777 -p "$ext_dir" "$HOME/.composer"
sudo chmod 777 "$ini_file" "${tool_path_dir:?}"
semver="$(php_semver)"
extra_version="$(php_extra_version)"
configure_php
link_opcache
set_output "php-version" "$semver"
if [ "${semver%.*}" != "$version" ]; then
add_log "${cross:?}" "PHP" "Could not setup PHP $version"
exit 1
fi
sudo cp "$src"/configs/pm/*.json "$RUNNER_TOOL_CACHE/"
add_log "$tick" "PHP" "$status PHP $semver$extra_version"
}
# Variables
version=${1:-'8.5'}
ini=${2:-'production'}
src=${0%/*}/..
php_formula=shivammathur/php/php@"$version"
scripts="$src"/scripts
ext_tap=shivammathur/homebrew-extensions
php_tap=shivammathur/homebrew-php
export HOMEBREW_CHANGE_ARCH_TO_ARM=1
export HOMEBREW_NO_AUTO_UPDATE=1
export HOMEBREW_NO_ENV_HINTS=1
export HOMEBREW_NO_INSTALL_CLEANUP=1
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
export HOMEBREW_NO_INSTALL_FROM_API=1
# shellcheck source=.
. "${scripts:?}"/unix.sh
. "${scripts:?}"/tools/brew.sh
. "${scripts:?}"/tools/retry.sh
. "${scripts:?}"/tools/add_tools.sh
. "${scripts:?}"/extensions/source.sh
. "${scripts:?}"/extensions/add_extensions.sh
configure_brew
read_env
self_hosted_setup
setup_php

View File

@ -0,0 +1,264 @@
# Function to check if extension is enabled.
Function Test-Extension() {
Param (
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNull()]
[string]
$extension
)
$extension_info = Get-PhpExtension -Path $php_dir | Where-Object { $_.Name -eq $extension -or $_.Handle -eq $extension }
return $null -ne $extension_info
}
# Function to add extension log.
Function Add-ExtensionLog() {
Param (
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNull()]
$extension,
[Parameter(Position = 1, Mandatory = $true)]
[ValidateNotNull()]
$message
)
if (Test-Extension $extension) {
Add-Log $tick $extension $message
} else {
Add-Log $cross $extension "Could not install $extension on PHP $( $installed.FullVersion )"
}
}
# Function to link dependencies to PHP directory.
Function Set-ExtensionPrerequisites
{
Param (
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)]
[string]
$extension
)
$deps_dir = "$ext_dir\$extension-vc$($installed.VCVersion)-$arch"
$deps = Get-ChildItem -Recurse -Path $deps_dir
if ($deps.Count -ne 0) {
# Symlink dependencies instead of adding the directory to PATH ...
# as other actions change the PATH thus breaking extensions.
$deps | ForEach-Object {
New-Item -Itemtype SymbolicLink -Path $php_dir -Name $_.Name -Target $_.FullName -Force > $null 2>&1
}
} else {
Remove-Item $deps_dir -Recurse -Force
}
}
# Function to enable extension.
Function Enable-Extension() {
Param (
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)]
[string]
$extension
)
Enable-ExtensionDependencies $extension
Enable-PhpExtension -Extension $extension -Path $php_dir
Set-ExtensionPrerequisites $extension
Add-Log $tick $extension "Enabled"
}
# Function to add custom built PHP extension for nightly builds.
Function Add-ExtensionFromGithub {
Param (
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)]
[string]
$extension
)
if($ts) { $ts_part = 'ts' } else { $ts_part = 'nts' }
$repo = "$github/shivammathur/php-extensions-windows"
$url = "$repo/releases/download/builds/php$version`_$ts_part`_$arch`_$extension.dll"
Get-File -Url $url -OutFile "$ext_dir\php_$extension.dll"
if(Test-Path "$ext_dir\php_$extension.dll") {
Enable-Extension $extension > $null
} else {
throw "Failed to download the $extension"
}
}
# Function to add PHP extensions.
Function Add-Extension {
Param (
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)]
[string]
$extension,
[Parameter(Position = 1, Mandatory = $false)]
[ValidateNotNull()]
[ValidateSet('stable', 'beta', 'alpha', 'devel', 'snapshot')]
[string]
$stability = 'stable',
[Parameter(Position = 2, Mandatory = $false)]
[ValidateNotNull()]
[ValidatePattern('^\d+(\.\d+){0,3}$')]
[string]
$extension_version = ''
)
try {
$extension_info = Get-PhpExtension -Path $php_dir | Where-Object { $_.Name -eq $extension -or $_.Handle -eq $extension }
$deps_dir = "$ext_dir\$extension-vc$($installed.VCVersion)-$arch"
New-Item $deps_dir -Type Directory -Force > $null 2>&1
if ($null -ne $extension_info) {
switch ($extension_info.State) {
'Builtin' {
Add-Log $tick $extension "Enabled"
}
'Enabled' {
Add-Log $tick $extension "Enabled"
}
default {
Enable-Extension $extension_info.Handle
}
}
}
else {
if(($version -match $nightly_versions) -and (Select-String -Path $src\configs\windows_extensions -Pattern $extension -SimpleMatch -Quiet)) {
Add-ExtensionFromGithub $extension
} else {
# Patch till DLLs for PHP 8.1 and above are released as stable.
$minimumStability = $stability
if ($version -match '8.[1-4]' -and $stability -eq 'stable') {
$minimumStability = 'snapshot'
}
$params = @{ Extension = $extension; MinimumStability = $minimumStability; MaximumStability = $stability; Path = $php_dir; AdditionalFilesPath = $deps_dir; NoDependencies = $true }
if ($extension_version -ne '')
{
$params["Version"] = $extension_version
}
# If extension for a different version exists
if(Test-Path $ext_dir\php_$extension.dll) {
Move-Item $ext_dir\php_$extension.dll $ext_dir\php_$extension.bak.dll -Force
}
Install-PhpExtension @params
Set-ExtensionPrerequisites $extension
}
Add-Log $tick $extension "Installed and enabled"
}
} catch {
Add-Log $cross $extension "Could not install $extension on PHP $( $installed.FullVersion )"
}
}
# Function to get a map of extensions and their dependent shared extensions.
Function Get-ExtensionMap {
php -d'error_reporting=0' $src\scripts\extensions\extension_map.php $env:TEMP\map$version.orig
}
# Function to enable extension dependencies which are also extensions.
Function Enable-ExtensionDependencies {
Param (
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)]
[string]
$extension
)
if (-not(Test-Path $env:TEMP\extdisabled\$extension)) {
return
}
Get-ExtensionMap
$entry = findstr /r "$extension`:.*" $env:TEMP\map$version.orig
if($entry) {
$entry.split(':')[1].trim().split(' ') | ForEach-Object {
if (-not(php -m | findstr -i $_)) {
Enable-PhpExtension -Extension $_ -Path $php_dir
}
}
}
Remove-Item $env:TEMP\extdisabled\$extension -Force
}
# Function to disable dependent extensions.
Function Disable-DependentExtensions() {
Param (
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)]
[string]
$extension
)
Select-String -Pattern ".*:.*\s$extension(\s|$)" $env:TEMP\map$version.orig | ForEach-Object {
$dependent = $_.Matches[0].Value.split(':')[0];
Disable-ExtensionHelper -Extension $dependent -DisableDependents
Add-Log $tick ":$extension" "Disabled $dependent as it depends on $extension"
}
}
# Helper function to disable an extension.
Function Disable-ExtensionHelper() {
Param (
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)]
[string]
$extension,
[switch] $DisableDependents
)
Get-ExtensionMap
if($DisableDependents) {
Disable-DependentExtensions $extension
}
Disable-PhpExtension -Extension $extension -Path $php_dir
New-Item $env:TEMP\extdisabled -Type Directory -Force > $null 2>&1
New-Item $env:TEMP\extdisabled\$extension -Type File -Force > $null 2>&1
}
# Function to disable an extension.
Function Disable-Extension() {
Param (
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)]
[string]
$extension,
[Parameter(Position = 1, Mandatory = $false)]
[ValidateNotNull()]
[ValidateLength(1, [int]::MaxValue)]
[string]
$DisableDependents
)
if(php -m | findstr -i $extension) {
if(Test-Path $ext_dir\php_$extension.dll) {
try {
$params = @{ Extension = $extension; DisableDependents = ($DisableDependents -ne 'false') }
Disable-ExtensionHelper @params
Add-Log $tick ":$extension" "Disabled"
} catch {
Add-Log $cross ":$extension" "Could not disable $extension on PHP $($installed.FullVersion)"
}
} else {
Add-Log $cross ":$extension" "Could not disable $extension on PHP $($installed.FullVersion) as it not a shared extension"
}
} elseif(Test-Path $ext_dir\php_$extension.dll) {
Add-Log $tick ":$extension" "Disabled"
} else {
Add-Log $tick ":$extension" "Could not find $extension on PHP $($installed.FullVersion)"
}
}
# Function to disable shared extensions.
Function Disable-AllShared() {
Get-ExtensionMap
(Get-Content $php_dir\php.ini) | Where-Object {$_ -notmatch '^(zend_)?extension\s*='} | Set-Content $php_dir\php.ini
New-Item $env:TEMP\extdisabled\$version -Type Directory -Force > $null 2>&1
Get-Childitem $ext_dir\*.dll | ForEach-Object {
New-Item ("$env:TEMP\extdisabled\$version\" + ($_.Name.split('.')[0].split('_')[1])) -Type File -Force > $null 2>&1
}
Add-Log $tick "none" "Disabled all shared extensions"
}
# Function to handle request to add PECL.
Function Add-Pecl() {
Add-Log $tick "PECL" "Use extensions input to setup PECL extensions on windows"
}

View File

@ -0,0 +1,240 @@
# Function to log result of installing extension.
add_extension_log() {
if check_extension ${1%%-*}; then
add_log "${tick:?}" "$1" "$2"
else
add_log "${cross:?}" "$1" "${3:-Could not install $1 on PHP ${semver:?}}"
fi
}
# Function to test if extension is loaded.
check_extension() {
local extension=$1
local extension_list=/tmp/php${version:?}_extensions
if [ ! -e "$extension_list" ]; then
php -m > "$extension_list"
fi
if [ "$extension" != "mysql" ]; then
grep -i -q -w "$extension" "$extension_list" || php -m | grep -i -q -w "$extension"
else
grep -i -q "$extension" "$extension_list" || php -m | grep -i -q "$extension"
fi
}
# Function to check if extension is shared
shared_extension() {
[ -e "${ext_dir:?}/$1.so" ]
}
# Function to enable cached extension's dependencies.
enable_cache_extension_dependencies() {
if [ -d /tmp/extcache ] && shared_extension "$1"; then
cache_dir=$(find /tmp/extcache -maxdepth 1 -type d -regex ".*$1[0-9]*")
if [[ -n "$cache_dir" ]]; then
IFS=" " read -r -a deps <<<"$(find "$cache_dir" -maxdepth 1 -type f -name "*" -exec basename {} \; | tr '\n' ' ')"
IFS="#" read -r -a deps_enable <<<"$(printf -- "-d ${2}=%s.so#" "${deps[@]}")"
if [[ -n "${deps[*]}" ]] && php "${deps_enable[@]}" -d "${2}=$1.so" -m 2>/dev/null | grep -i -q "$1"; then
for ext in "${deps[@]}"; do
sudo rm -rf /tmp/extcache/"$ext"
enable_extension "$ext" "$2"
done
fi
fi
fi
}
# Function to enable existing extensions.
enable_extension() {
if ! check_extension "$1" && shared_extension "$1"; then
modules_dir="/var/lib/php/modules/${version:?}"
[ -d "$modules_dir" ] && sudo find "$modules_dir" -path "*disabled*$1" -delete
enable_extension_dependencies "$1" "$2"
enable_cache_extension_dependencies "$1" "$2"
if ! [[ "${version:?}" =~ ${old_versions:?} ]] && command -v phpenmod >/dev/null 2>&1; then
sudo sed -Ei "/=(.*\/)?\"?$extension(.so)?\"?$/d" "$pecl_file"
mod="${ini_dir:?}"/../mods-available/"$1".ini
if ! [ -e "$mod" ]; then
priority="${3:-20}";
mod_priority_line="$(grep -E "^$1=" "${src:?}/configs/mod_priority")";
[ -n "$mod_priority_line" ] && priority=$(echo "$mod_priority_line" | cut -d'=' -f 2)
(echo "; priority=$priority"; echo "$2=${ext_dir:?}/$1.so") | sudo tee "$mod" >/dev/null
fi
sudo phpenmod -v "$version" "$1" >/dev/null 2>&1
else
echo "$2=${ext_dir:?}/$1.so" | sudo tee -a "${pecl_file:-${ini_file[@]}}" >/dev/null
fi
fi
}
# Function to enable array of extensions
enable_extensions() {
local extensions=("$@")
to_wait=()
for ext in "${extensions[@]}"; do
enable_extension "$ext" extension >/dev/null 2>&1 &
to_wait+=($!)
done
wait "${to_wait[@]}"
}
# Function to get a map of extensions and their dependent shared extensions.
get_extension_map() {
php -d'error_reporting=0' "${src:?}"/scripts/extensions/extension_map.php /tmp/map"$version".orig >/dev/null 2>&1
}
# Function to enable extension dependencies which are also extensions.
enable_extension_dependencies() {
local extension=$1
local prefix=$2
[ -e /tmp/extdisabled/"$version"/"$extension" ] || return;
get_extension_map
for dependency in $(grep "$extension:" /tmp/map"$version".orig | cut -d ':' -f 2 | tr '\n' ' '); do
enable_extension "$dependency" "$prefix"
done
rm /tmp/extdisabled/"$version"/"$extension"
}
# Function to disable dependent extensions.
disable_extension_dependents() {
local extension=$1
for dependent in $(grep -E ".*:.*\s$extension(\s|$)" /tmp/map"$version".orig | cut -d ':' -f 1 | tr '\n' ' '); do
disable_extension_helper "$dependent" true
add_log "${tick:?}" ":$extension" "Disabled $dependent as it depends on $extension"
done
}
# Function to disable an extension.
disable_extension() {
local extension=$1
if check_extension "$extension"; then
if shared_extension "$extension"; then
disable_extension_helper "$extension" true
(! check_extension "$extension" && add_log "${tick:?}" ":$extension" "Disabled") ||
add_log "${cross:?}" ":$extension" "Could not disable $extension on PHP ${semver:?}"
else
add_log "${cross:?}" ":$extension" "Could not disable $extension on PHP $semver as it not a shared extension"
fi
elif shared_extension "$extension"; then
add_log "${tick:?}" ":$extension" "Disabled"
else
add_log "${tick:?}" ":$extension" "Could not find $extension on PHP $semver"
fi
}
# Function to disable shared extensions.
disable_all_shared() {
get_extension_map
sudo sed -i.orig -E -e "/^(zend_)?extension\s*=/d" "${ini_file[@]}" "$pecl_file" 2>/dev/null || true
sudo find "${ini_dir:-$scan_dir}"/.. -name "*.ini" -not -path "*php.ini" -not -path "*phar.ini" -not -path "*pecl.ini" -not -path "*mods-available*" -delete >/dev/null 2>&1 || true
mkdir -p /tmp/extdisabled/"$version"
sudo rm -f /tmp/php"$version"_extensions
sudo find "$ext_dir" -name '*.so' -print0 | xargs -0 -n 1 basename -s .so | xargs -I{} touch /tmp/extdisabled/"$version"/{}
add_log "${tick:?}" "none" "Disabled all shared extensions"
}
# Function to configure PECL.
configure_pecl() {
[ -z "${pecl_file:-${ini_file[@]}}" ] && return
if ! [ -e /tmp/pecl_config ]; then
for script in pear pecl; do
sudo "$script" channel-update "$script".php.net
done
echo '' | sudo tee /tmp/pecl_config >/dev/null 2>&1
fi
}
# Function to add an extension.
add_extension() {
local extension=$1
local prefix=$2
enable_extension "$extension" "$prefix"
if check_extension "$extension"; then
add_log "${tick:?}" "$extension" "Enabled"
else
add_extension_helper "$extension" "$prefix"
fi
}
# Function to get the PECL version of an extension.
get_pecl_version() {
local extension=$1
states=("stable" "rc" "preview" "beta" "alpha" "snapshot")
stability="$(echo "$2" | grep -m 1 -Eio "($(IFS='|' ; echo "${states[*]}"))")"
IFS=' ' read -r -a states <<< "$(echo "${states[@]}" | grep -Eo "$stability.*")"
major_version=${3:-'[0-9]+'}
pecl_rest='https://pecl.php.net/rest/r/'
response=$(get -s -n "" "$pecl_rest$extension"/allreleases.xml)
for state in "${states[@]}"; do
pecl_version=$(echo "$response" | grep -m 1 -Eio "($major_version\.[0-9]+\.[0-9]+${state}[0-9]+<)" | cut -d '<' -f 1)
[ -z "$pecl_version" ] && pecl_version=$(echo "$response" | grep -m 1 -Eio "v>(.*)<\/v>.*$state<" | grep -m 1 -Eo "($major_version\.[0-9]+\.[0-9]+.*)<" | cut -d '<' -f 1)
[ -n "$pecl_version" ] && break;
done
[ -z "$pecl_version" ] && pecl_version=$(echo "$response" | grep -m 1 -Eo "($major_version\.[0-9]+\.[0-9]+)<" | cut -d '<' -f 1)
echo "$pecl_version"
}
# Function to install PECL extensions and accept default options
pecl_install() {
local extension=$1
local prefix=${2:-extension}
add_pecl >/dev/null 2>&1
disable_extension_helper "${extension%-*}" >/dev/null 2>&1
# Compare version with 8.3 so it runs only on 8.4 and above
# Install using the source interface as it allows for patching.
if [[ $(printf "%s\n%s" "${version:?}" "8.3" | sort -V | head -n1) != "$version" ]]; then
extension_version=${extension##*-};
[ "$extension_version" = "${extension%-*}" ] && extension_version=$(get_pecl_version "$extension" "stable")
add_extension_from_source "${extension%-*}" https://pecl.php.net "${extension%-*}" "${extension%-*}" "$extension_version" "$prefix" pecl
check_extension "${extension%-*}" && return 0 || return 1;
else
cpu_count="$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo '1')"
prefix_opts="$(parse_args "$extension" CONFIGURE_PREFIX_OPTS) MAKEFLAGS='-j $cpu_count'"
suffix_opts="$(parse_args "$extension" CONFIGURE_OPTS) $(parse_args "$extension" CONFIGURE_SUFFIX_OPTS)"
IFS=' ' read -r -a libraries <<<"$(parse_args "$extension" LIBS) $(parse_args "$extension" "$(uname -s)"_LIBS)"
(( ${#libraries[@]} )) && add_libs "${libraries[@]}" >/dev/null 2>&1
if [ "$version" = "5.3" ]; then
yes '' 2>/dev/null | sudo "$prefix_opts" pecl install -f "$extension" >/dev/null 2>&1
else
yes '' 2>/dev/null | sudo "$prefix_opts" pecl install -f -D "$(parse_pecl_configure_options "$suffix_opts")" "$extension" >/dev/null 2>&1
fi
local exit_code=$?
sudo pecl info "$extension" | grep -iq 'zend extension' && prefix=zend_extension
enable_extension "${extension%-*}" "$prefix"
return "$exit_code"
fi
}
# Function to install a specific version of PECL extension.
add_pecl_extension() {
local extension=$1
local pecl_version=$2
local prefix=$3
enable_extension "$extension" "$prefix"
if [[ $pecl_version =~ .*(alpha|beta|rc|snapshot|preview).* ]]; then
pecl_version=$(get_pecl_version "$extension" "$pecl_version")
fi
ext_version=$(php -r "echo phpversion('$extension');")
if check_extension "$extension" && [[ -z "$pecl_version" || (-n "$pecl_version" && "${ext_version/-/}" == "$pecl_version") ]]; then
add_log "${tick:?}" "$extension" "Enabled"
else
[ -n "$pecl_version" ] && pecl_version="-$pecl_version"
pecl_install "$extension$pecl_version" || ( [ "${fail_fast:?}" = "false" ] && add_extension "$extension" "$(get_extension_prefix "$extension")" >/dev/null 2>&1)
extension_version="$(php -r "echo phpversion('$extension');")"
[ -n "$extension_version" ] && extension_version="-$extension_version"
add_extension_log "$extension$extension_version" "Installed and enabled"
fi
}
# Function to setup pre-release extensions using PECL.
add_unstable_extension() {
local extension=$1
local stability=$2
local prefix=$3
pecl_version=$(get_pecl_version "$extension" "$stability")
add_pecl_extension "$extension" "$pecl_version" "$prefix"
}
# Function to get extension prefix
get_extension_prefix() {
echo "$1" | grep -Eq "xdebug([2-3])?$|opcache|ioncube|eaccelerator" && echo zend_extension || echo extension
}

View File

@ -0,0 +1,34 @@
# Function to install blackfire extension.
Function Add-Blackfire() {
Param (
[Parameter(Position = 0, Mandatory = $true)]
[ValidateNotNull()]
[string]
$extension
)
try {
$no_dot_version = $version.replace('.', '')
$extension_version = $extension.split('-')[1]
if ($extension_version -notmatch "\S") {
if($version -lt '7.0') {
$extension_version = '1.50.0'
} else {
$extension_version = (Invoke-RestMethod https://blackfire.io/api/v1/releases).probe.php
}
}
if (Test-Path $ext_dir\blackfire.dll) {
Enable-PhpExtension -Extension blackfire -Path $php_dir
$status="Enabled"
} else {
$nts = if (!$installed.ThreadSafe) { "_nts" } else { "" }
Get-File -Url "https://packages.blackfire.io/binaries/blackfire-php/${extension_version}/blackfire-php-windows_${arch}-php-${no_dot_version}${nts}.dll" -OutFile $ext_dir\blackfire.dll > $null 2>&1
Disable-Extension xdebug > $null 2>&1
Disable-Extension pcov > $null 2>&1
Enable-PhpExtension -Extension blackfire -Path $php_dir
$status="Installed and enabled"
}
Add-Log $tick $extension $status
} catch {
Add-Log $cross $extension "Could not install $extension on PHP $($installed.FullVersion)"
}
}

View File

@ -0,0 +1,32 @@
# Function to install blackfire extension.
add_blackfire() {
local extension=$1
version=${version:?}
no_dot_version=${version/./}
platform=$(uname -s | tr '[:upper:]' '[:lower:]')
extension_version=$(echo "$extension" | cut -d '-' -f 2)
status='Enabled'
if ! shared_extension blackfire; then
status='Installed and enabled'
arch="$(uname -m)"
arch_name="amd64"
[[ "$arch" = "aarch64" || "$arch" = "arm64" ]] && arch_name="arm64"
[ "${ts:?}" = 'zts' ] && no_dot_version="${no_dot_version}-zts"
if [ "$extension_version" = "blackfire" ]; then
if [[ ${version:?} =~ 5.[3-6] ]]; then
extension_version='1.50.0'
else
extension_version=$(get -s -n "" https://blackfire.io/api/v1/releases | grep -Eo 'php":"([0-9]+.[0-9]+.[0-9]+)' | cut -d '"' -f 3)
fi
fi
get -q -n "${ext_dir:?}/blackfire.so" https://packages.blackfire.io/binaries/blackfire-php/"$extension_version"/blackfire-php-"$platform"_"$arch_name"-php-"$no_dot_version".so >/dev/null 2>&1
fi
if [ -e "${ext_dir:?}/blackfire.so" ]; then
disable_extension xdebug >/dev/null 2>&1
disable_extension pcov >/dev/null 2>&1
enable_extension blackfire extension
add_extension_log blackfire "$status"
else
add_extension_log blackfire "Could not install blackfire on PHP ${semver:?}"
fi
}

View File

@ -0,0 +1,87 @@
# Function to install libraries required by couchbase
add_couchbase_clibs() {
ext=$1
trunk="https://github.com/couchbase/libcouchbase/releases"
if [[ "$ext" =~ couchbase-2.+ ]]; then
release="2.10.9"
else
release=$(get -s -n "" "$trunk"/latest | grep -Eo -m 1 "[0-9]+\.[0-9]+\.[0-9]+" | head -n 1)
fi
[ "$VERSION_ID" = "24.04" ] && vid=22.04 || vid="$VERSION_ID"
[ "$VERSION_CODENAME" = "noble" ] && vcn=jammy || vcn="$VERSION_CODENAME"
deb_url="$trunk/download/$release/libcouchbase-${release}_ubuntu${vid/./}_${vcn}_amd64.tar"
get -q -n /tmp/libcouchbase.tar "$deb_url"
if ! [ -e /tmp/libcouchbase.tar ] || ! file /tmp/libcouchbase.tar | grep -q 'tar archive'; then
deb_url="$trunk/download/$release/libcouchbase-${release}_ubuntu2004_focal_amd64.tar"
get -q -n /tmp/libcouchbase.tar "$deb_url"
add_old_libssl
fi
sudo tar -xf /tmp/libcouchbase.tar -C /tmp
install_packages libev4 libevent-dev
sudo dpkg -i /tmp/libcouchbase-*/*.deb
}
add_old_libssl() {
if [[ "$VERSION_ID" = "24.04" ]]; then
get -q -n /tmp/libssl.deb http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
[ -e /tmp/libssl.deb ] && sudo dpkg -i /tmp/libssl.deb || add_extension_log "couchbase" "Could not install libssl1.1"
fi
}
add_couchbase_cxxlibs() {
if [ "${runner:?}" = "self-hosted" ]; then
add_list cmake https://apt.kitware.com/ubuntu/ https://apt.kitware.com/keys/kitware-archive-latest.asc "$VERSION_CODENAME" main
fi
install_packages cmake ccache
}
get_couchbase_version() {
if [[ "${version:?}" =~ ${old_versions:?} ]]; then
echo couchbase-2.2.3
elif [[ "${version:?}" =~ 5.6|7.[0-1] ]]; then
echo couchbase-2.6.2
elif [ "${version:?}" = '7.2' ]; then
echo couchbase-3.0.4
elif [ "${version:?}" = '7.3' ]; then
echo couchbase-3.2.2
elif [ "${version:?}" = '7.4' ]; then
echo couchbase-4.1.1
else
echo couchbase
fi
}
# Function to add couchbase.
add_couchbase() {
ext=$1
if [ "$(uname -s)" = "Linux" ]; then
if [ "$ext" = "couchbase" ]; then
ext=$(get_couchbase_version)
fi
if [[ "$ext" =~ couchbase-[2-3].+ ]]; then
add_couchbase_clibs "$ext" >/dev/null 2>&1
else
add_couchbase_cxxlibs >/dev/null 2>&1
fi
enable_extension "couchbase" "extension"
if check_extension "couchbase"; then
add_log "${tick:?}" "couchbase" "Enabled"
else
if [ "$ext" = "couchbase" ]; then
ext="couchbase-$(get_pecl_version "couchbase" "stable")"
n_proc="$(nproc)"
export COUCHBASE_SUFFIX_OPTS="CMAKE_BUILD_TYPE=Release"
export CMAKE_BUILD_PARALLEL_LEVEL="$n_proc"
add_extension_from_source couchbase https://pecl.php.net couchbase couchbase "${ext##*-}" extension pecl >/dev/null 2>&1
else
pecl_install "${ext}" >/dev/null 2>&1
fi
add_extension_log "couchbase" "Installed and enabled"
fi
else
if [ -e "${ext_dir:?}"/libcouchbase_php_core.dylib ]; then
sudo cp "${ext_dir:?}"/libcouchbase_php_core.dylib "${brew_prefix:?}"/lib
fi
add_brew_extension couchbase extension
fi
}

View File

@ -0,0 +1,51 @@
# Function to log license details.
add_license_log() {
printf "$GROUP\033[34;1m%s \033[0m\033[90;1m%s \033[0m\n" "$ext" "Click to read the $ext related license information"
printf "Cubrid CCI package is required for %s extension.\n" "$ext"
printf "The extension %s and Cubrid CCI are provided under the license linked below.\n" "$ext"
printf "Refer to: \033[35;1m%s \033[0m\n" "https://github.com/CUBRID/cubrid-cci/blob/develop/COPYING"
echo "$END_GROUP"
}
# Function to set cubrid repo for the extension.
set_cubrid_repo() {
case "${ext:?}" in
"cubrid") cubrid_repo="cubrid-php";;
"pdo_cubrid") cubrid_repo="cubrid-pdo";;
esac
}
# Function to set cubrid branch for a PHP version.
set_cubrid_branch() {
case "${version:?}" in
5.[3-6]) cubrid_branch="RB-9.3.0";;
*) cubrid_branch="develop";;
esac
}
add_cubrid_helper() {
ext=$1
enable_extension "$ext" extension
if ! check_extension "$ext"; then
status='Installed and enabled'
set_cubrid_repo
set_cubrid_branch
patch_phpize
read -r "${ext}_PREFIX_CONFIGURE_OPTS" <<< "CFLAGS=-Wno-implicit-function-declaration"
read -r "${ext}_CONFIGURE_OPTS" <<< "--with-php-config=$(command -v php-config)"
add_extension_from_source "$ext" https://github.com CUBRID "$cubrid_repo" "$cubrid_branch" extension
restore_phpize
fi
}
# Function to add cubrid and pdo_cubrid.
add_cubrid() {
ext=$1
status='Enabled'
add_cubrid_helper "$ext" >/dev/null 2>&1
add_extension_log "$ext" "$status"
check_extension "$ext" && add_license_log
}
# shellcheck source=.
. "${scripts:?}"/extensions/patches/phpize.sh

View File

@ -0,0 +1,50 @@
# Function to get event configure options
get_event_configure_opts() {
event_opts=(
--with-event-core
--with-event-extra
--with-event-openssl
--enable-event-sockets
)
if [ "$os" = 'Linux' ]; then
event_opts+=(
--with-openssl-dir=yes
--with-event-libevent-dir=/usr
)
else
event_opts+=(
--with-openssl-dir="$(brew --prefix openssl@3)"
--with-event-libevent-dir="$(brew --prefix libevent)"
)
fi
}
# Helper function to compile and install event
add_event_helper() {
local ext=$1
[[ "$ext" =~ ^event$ ]] && ext="event-$(get_pecl_version "event" "stable")"
event_opts=() && get_event_configure_opts
export EVENT_LINUX_LIBS='libevent-dev'
export EVENT_DARWIN_LIBS='libevent'
event_configure_opts="--with-php-config=$(command -v php-config) ${event_opts[*]}"
export EVENT_CONFIGURE_OPTS="$event_configure_opts"
add_extension_from_source event https://pecl.php.net event event "${ext##*-}" extension pecl
}
# Function to add event
add_event() {
local ext=$1
enable_extension "event" "extension"
if check_extension "event"; then
add_log "${tick:?}" "event" "Enabled"
else
if ! [[ "${version:?}" =~ ${old_versions:?} ]] && [ "$os" = "Darwin" ]; then
add_brew_extension event extension >/dev/null 2>&1
else
add_event_helper "$ext" >/dev/null 2>&1
fi
add_extension_log "event" "Installed and enabled"
fi
}
os="$(uname -s)"

Some files were not shown because too many files have changed in this diff Show More