feat(compat): declare core independence with core:"none" (INDEPENDENT status, block inheritance, no warning)
This commit is contained in:
@@ -12,6 +12,7 @@ final class Compatibility
|
||||
public const UNTESTED = 'untested';
|
||||
public const INSUFFICIENT = 'insufficient';
|
||||
public const UNKNOWN = 'unknown';
|
||||
public const INDEPENDENT = 'independent';
|
||||
|
||||
/**
|
||||
* @return array{status:string, message:string}
|
||||
@@ -19,8 +20,13 @@ final class Compatibility
|
||||
public static function evaluateCore(
|
||||
?string $coreVersion,
|
||||
?string $requires,
|
||||
?string $tested
|
||||
?string $tested,
|
||||
bool $independent = false
|
||||
): array {
|
||||
if ($independent) {
|
||||
return ['status' => self::INDEPENDENT, 'message' => 'independiente del core'];
|
||||
}
|
||||
|
||||
if ($coreVersion === null) {
|
||||
return ['status' => self::UNKNOWN, 'message' => 'versión del core desconocida (sin tags)'];
|
||||
}
|
||||
@@ -68,10 +74,11 @@ final class Compatibility
|
||||
public static function label(string $status): string
|
||||
{
|
||||
return match ($status) {
|
||||
self::OK => 'OK',
|
||||
self::UNTESTED => 'NO PROBADO',
|
||||
self::INSUFFICIENT => 'INSUFICIENTE',
|
||||
default => 'SIN DATOS',
|
||||
self::OK => 'OK',
|
||||
self::UNTESTED => 'NO PROBADO',
|
||||
self::INSUFFICIENT => 'INSUFICIENTE',
|
||||
self::INDEPENDENT => 'INDEPENDIENTE',
|
||||
default => 'SIN DATOS',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user