|
|
@@ -1,4 +1,5 @@
|
|
|
<?php
|
|
|
+
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
namespace SixShop\Auth\Hook;
|
|
|
@@ -10,12 +11,10 @@ use Symfony\Component\HttpClient\Exception\ClientException;
|
|
|
use Symfony\Component\HttpClient\HttpClient;
|
|
|
use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface;
|
|
|
use Symfony\Contracts\HttpClient\HttpClientInterface;
|
|
|
-use think\Env;
|
|
|
use think\facade\Log;
|
|
|
|
|
|
class AppStatusHook
|
|
|
{
|
|
|
-
|
|
|
private const string BASE_URL = 'https://apix.jd29.com';
|
|
|
|
|
|
private const string PACKAGIST_DOMAIN = 'packagist.jd29.com';
|
|
|
@@ -23,8 +22,7 @@ class AppStatusHook
|
|
|
private HttpClientInterface $httpClient;
|
|
|
public function __construct(
|
|
|
private readonly Config $config,
|
|
|
- )
|
|
|
- {
|
|
|
+ ) {
|
|
|
try {
|
|
|
$authConfigSource = Factory::createConfig()->getAuthConfigSource();
|
|
|
$authFile = $authConfigSource->getName();
|
|
|
@@ -57,4 +55,4 @@ class AppStatusHook
|
|
|
Log::error(json_encode($e->getResponse()->toArray(false)));
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
+}
|