## Summary - implement the provider capability registry and derived capability evaluation flow - update provider connections, onboarding, required-permissions diagnostics, and provider blocker translation to use capability-first summaries - add bounded unit, feature, and browser test coverage plus the prepared Spec 283 artifacts ## Notes - branch: `283-provider-capability-registry` - commit: `74e75c3e` - no additional validation commands were run in this git/PR flow step Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #342
34 lines
771 B
PHP
34 lines
771 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Support\Providers\Capabilities;
|
|
|
|
enum ProviderCapabilityStatus: string
|
|
{
|
|
case Supported = 'supported';
|
|
case Missing = 'missing';
|
|
case Blocked = 'blocked';
|
|
case Unknown = 'unknown';
|
|
case NotApplicable = 'not_applicable';
|
|
|
|
public function blocksExecution(): bool
|
|
{
|
|
return match ($this) {
|
|
self::Supported, self::NotApplicable => false,
|
|
self::Missing, self::Blocked, self::Unknown => true,
|
|
};
|
|
}
|
|
|
|
public function priority(): int
|
|
{
|
|
return match ($this) {
|
|
self::Blocked => 0,
|
|
self::Missing => 1,
|
|
self::Unknown => 2,
|
|
self::Supported => 3,
|
|
self::NotApplicable => 4,
|
|
};
|
|
}
|
|
}
|