diff --git a/composer.json b/composer.json index d59132d..c4cffe6 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ "autoload-dev": { }, "require": { - "php": ">=8.0", + "php": ">=8.1", "ext-json": "*", "guanguans/soar-php": "^3.0", "hyperf/config": "^3.0", diff --git a/src/Aspect/ResponseAspect.php b/src/Aspect/ResponseAspect.php index af78379..852f275 100644 --- a/src/Aspect/ResponseAspect.php +++ b/src/Aspect/ResponseAspect.php @@ -21,18 +21,20 @@ use Hyperf\Di\Annotation\Inject; use Hyperf\Di\Aop\AbstractAspect; use Hyperf\Di\Aop\ProceedingJoinPoint; +use Hyperf\Di\Exception\Exception; use Hyperf\Engine\Channel; use Hyperf\HttpMessage\Stream\SwooleStream; -use Hyperf\Utils\Exception\ParallelExecutionException; -use Hyperf\Utils\Parallel; -use Hyperf\Utils\Str; +use Hyperf\Coroutine\Exception\ParallelExecutionException; +use Hyperf\Coroutine\Parallel; +use Hyperf\Stringable\Str; +use JsonException; use Throwable; use Wilbur\HyperfSoar\Listener\QueryExecListener; use Wilbur\HyperfSoar\SoarService; use Psr\Container\ContainerInterface; use function array_merge; -use function co; +use function Hyperf\Coroutine\co; use function explode; use function json_decode; use function json_encode; @@ -61,8 +63,8 @@ public function __construct(ContainerInterface $container) } /** - * @throws \Hyperf\Di\Exception\Exception - * @throws \JsonException + * @throws Exception + * @throws JsonException */ public function process(ProceedingJoinPoint $proceedingJoinPoint) { @@ -157,7 +159,7 @@ protected function getScore(?string $severity = null): ?int } /** - * @throws \JsonException + * @throws JsonException */ protected function formatting(string $json): array { diff --git a/src/Exec.php b/src/Exec.php index ab198cb..fb220af 100644 --- a/src/Exec.php +++ b/src/Exec.php @@ -24,7 +24,7 @@ trait Exec /** * @param string $command * - * @throws \Guanguans\SoarPHP\Exceptions\RuntimeException + * @throws RuntimeException * * @return mixed */ diff --git a/src/Listener/QueryExecListener.php b/src/Listener/QueryExecListener.php index 62fb2d4..32c1245 100644 --- a/src/Listener/QueryExecListener.php +++ b/src/Listener/QueryExecListener.php @@ -20,8 +20,8 @@ use Hyperf\Database\Events\QueryExecuted; use Hyperf\Event\Annotation\Listener; use Hyperf\Event\Contract\ListenerInterface; -use Hyperf\Utils\Arr; -use Hyperf\Utils\Str; +use Hyperf\Collection\Arr; +use Hyperf\Stringable\Str; #[Listener] diff --git a/src/SoarService.php b/src/SoarService.php index caad4d4..0184a1b 100644 --- a/src/SoarService.php +++ b/src/SoarService.php @@ -17,13 +17,10 @@ use Guanguans\SoarPHP\Soar; -use Guanguans\SoarPHP\Support\OS; - -use function config; +use function Hyperf\Config\config; class SoarService extends Soar { -// use Exec; public function __construct(array $config = null) {