Skip to content

Commit

Permalink
Merge pull request #794 from davereid/patch-1
Browse files Browse the repository at this point in the history
Provide a "lowest" php-version parameter
  • Loading branch information
shivammathur authored Dec 7, 2023
2 parents 131ba03 + 93745da commit c085ca3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,4 @@ jobs:
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');}"
php -r "if(ini_get('date.timezone')!='Asia/Kolkata') {throw new Exception('date.timezone not added');}"
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1156,7 +1156,7 @@ async function getManifestURL() {
exports.getManifestURL = getManifestURL;
async function parseVersion(version) {
switch (true) {
case /^(latest|nightly|\d+\.x)$/.test(version):
case /^(latest|lowest|nightly|\d+\.x)$/.test(version):
return JSON.parse((await fetch.fetch(await getManifestURL()))['data'])[version];
default:
switch (true) {
Expand Down
3 changes: 2 additions & 1 deletion src/configs/php-versions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"lowest": "8.1",
"latest": "8.3",
"nightly": "8.4",
"5.x": "5.6",
"7.x": "7.4",
"8.x": "8.3"
}
}
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export async function getManifestURL(): Promise<string> {
*/
export async function parseVersion(version: string): Promise<string> {
switch (true) {
case /^(latest|nightly|\d+\.x)$/.test(version):
case /^(latest|lowest|nightly|\d+\.x)$/.test(version):
return JSON.parse((await fetch.fetch(await getManifestURL()))['data'])[
version
];
Expand Down

0 comments on commit c085ca3

Please sign in to comment.