mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-22 11:51:07 +07:00
Fix unsupported PHP versions warning on v1
This commit is contained in:
parent
1229133602
commit
3aa870b0fe
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -445,8 +445,8 @@ async function run() {
|
|||||||
}
|
}
|
||||||
core.warning('setup-php v1 is deprecated.\nPlease upgrade to v2 - https://setup-php.com/w/Switch-to-v2');
|
core.warning('setup-php v1 is deprecated.\nPlease upgrade to v2 - https://setup-php.com/w/Switch-to-v2');
|
||||||
const version = await utils.parseVersion(await utils.getInput('php-version', true));
|
const version = await utils.parseVersion(await utils.getInput('php-version', true));
|
||||||
if (version == '8.1') {
|
if (parseFloat(version) < 5.6 || parseFloat(version) > 8.0) {
|
||||||
core.setFailed('PHP 8.1 is not supported on setup-php v1.\nPlease upgrade to v2 - https://setup-php.com/w/Switch-to-v2');
|
core.setFailed(`setup-php v1 supports only PHP 5.6 to 8.0.\nPlease upgrade to v2 - https://setup-php.com/w/Switch-to-v2`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (version) {
|
if (version) {
|
||||||
|
@ -67,9 +67,9 @@ export async function run(): Promise<void> {
|
|||||||
const version: string = await utils.parseVersion(
|
const version: string = await utils.parseVersion(
|
||||||
await utils.getInput('php-version', true)
|
await utils.getInput('php-version', true)
|
||||||
);
|
);
|
||||||
if (version == '8.1') {
|
if (parseFloat(version) < 5.6 || parseFloat(version) > 8.0) {
|
||||||
core.setFailed(
|
core.setFailed(
|
||||||
'PHP 8.1 is not supported on setup-php v1.\nPlease upgrade to v2 - https://setup-php.com/w/Switch-to-v2'
|
`setup-php v1 supports only PHP 5.6 to 8.0.\nPlease upgrade to v2 - https://setup-php.com/w/Switch-to-v2`
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user