Skip to content

Commit 43e870b

Browse files
committed
Add highest alias as an alternative to latest
1 parent dc1a77b commit 43e870b

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,9 +390,9 @@ Disable coverage for these reasons:
390390
#### `php-version` (optional)
391391

392392
- Specify the PHP version you want to set up.
393-
- Accepts a `string`. For example `'8.0'`.
394-
- Accepts `latest` to set up the latest stable PHP version.
393+
- Accepts a `string`. For example `'8.3'`.
395394
- Accepts `lowest` to set up the lowest supported PHP version.
395+
- Accepts `highest` or `latest` to set up the latest stable PHP version.
396396
- Accepts `nightly` to set up a nightly build from the master branch of PHP.
397397
- Accepts the format `d.x`, where `d` is the major version. For example `5.x`, `7.x` and `8.x`.
398398
- See [PHP support](#tada-php-support) for the supported PHP versions.

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ async function getManifestURL() {
11561156
exports.getManifestURL = getManifestURL;
11571157
async function parseVersion(version) {
11581158
switch (true) {
1159-
case /^(latest|lowest|nightly|\d+\.x)$/.test(version):
1159+
case /^(latest|lowest|highest|nightly|\d+\.x)$/.test(version):
11601160
return JSON.parse((await fetch.fetch(await getManifestURL()))['data'])[version];
11611161
default:
11621162
switch (true) {

src/configs/php-versions.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"lowest": "8.1",
3+
"highest": "8.3",
34
"latest": "8.3",
45
"nightly": "8.4",
56
"5.x": "5.6",

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export async function getManifestURL(): Promise<string> {
5959
*/
6060
export async function parseVersion(version: string): Promise<string> {
6161
switch (true) {
62-
case /^(latest|lowest|nightly|\d+\.x)$/.test(version):
62+
case /^(latest|lowest|highest|nightly|\d+\.x)$/.test(version):
6363
return JSON.parse((await fetch.fetch(await getManifestURL()))['data'])[
6464
version
6565
];

0 commit comments

Comments
 (0)