mirror of
https://codeberg.org/icewind/haze.git
synced 2026-06-04 01:24:09 +02:00
default to max supported php version
This commit is contained in:
parent
009264443f
commit
86a68339b4
5 changed files with 122 additions and 49 deletions
21
src/php.rs
21
src/php.rs
|
|
@ -106,6 +106,27 @@ impl PhpVersion {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn from_number(major: u8, minor: u8) -> Option<Self> {
|
||||
match (major, minor) {
|
||||
(7, 3) => Some(PhpVersion::Php73),
|
||||
(7, 4) => Some(PhpVersion::Php74),
|
||||
(8, 0) => Some(PhpVersion::Php80),
|
||||
(8, 1) => Some(PhpVersion::Php81),
|
||||
(8, 2) => Some(PhpVersion::Php82),
|
||||
(8, 3) => Some(PhpVersion::Php83),
|
||||
(8, 4) => Some(PhpVersion::Php84),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn max_minor(major: u8) -> u8 {
|
||||
match major {
|
||||
7 => 4,
|
||||
8 => 4,
|
||||
_ => 0,
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub async fn spawn(
|
||||
&self,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue