From d4b3ff66080f3369789d05cea2598727fe5c706f Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Sun, 11 Dec 2022 19:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Console/Commands/BanUser.php | 2 +- app/Console/Commands/CalcModule.php | 2 +- app/Console/Commands/Count.php | 2 +- app/Console/Commands/GetUser.php | 2 +- app/Console/Commands/Mqtt.php | 2 +- app/Console/Commands/ReduceBalance.php | 2 +- app/Console/Commands/Status.php | 2 +- app/Console/Commands/SuspendUserAllHosts.php | 2 +- app/Console/Commands/UnbanUser.php | 2 +- app/Console/Commands/UserAddBalance.php | 2 +- app/Exceptions/Handler.php | 16 +- app/Helpers/ApiResponse.php | 6 +- .../Controllers/Admin/AdminController.php | 4 +- app/Http/Controllers/Admin/UserController.php | 1 - app/Http/Controllers/Api/ReplyController.php | 7 +- .../Controllers/Modules/HostController.php | 2 +- .../Controllers/Modules/ReplyController.php | 2 - app/Http/Middleware/Authenticate.php | 4 +- app/Jobs/AutoCloseWorkOrder.php | 2 +- app/Jobs/CheckAndChargeBalance.php | 6 +- app/Jobs/ClearTasks.php | 2 +- app/Notifications/ModuleEarnings.php | 2 +- app/Notifications/UserBalanceNotification.php | 5 +- app/Observers/BalanceObserve.php | 4 +- app/Observers/WorkOrder/ReplyObserver.php | 2 +- app/Observers/WorkOrder/WorkOrderObserver.php | 4 +- app/View/Components/BasicCard.php | 2 +- app/View/Components/HostStatus.php | 2 +- app/View/Components/ModuleEarning.php | 2 +- app/View/Components/ModuleScript.php | 2 +- app/View/Components/Payment.php | 2 +- app/View/Components/WorkOrderStatus.php | 2 +- composer.lock | 178 +++++++++--------- config/app.php | 4 +- ...8_30_081930_add_balance_to_users_table.php | 2 +- ...022_09_01_033240_create_balances_table.php | 2 +- ...05842_add_remaining_amount_to_balances.php | 2 +- 37 files changed, 146 insertions(+), 143 deletions(-) diff --git a/app/Console/Commands/BanUser.php b/app/Console/Commands/BanUser.php index 315fb1c..e9207f0 100644 --- a/app/Console/Commands/BanUser.php +++ b/app/Console/Commands/BanUser.php @@ -34,7 +34,7 @@ public function __construct() /** * Execute the console command. * - * @return mixed + * @return int */ public function handle() { diff --git a/app/Console/Commands/CalcModule.php b/app/Console/Commands/CalcModule.php index 8ac861a..d17cf6f 100644 --- a/app/Console/Commands/CalcModule.php +++ b/app/Console/Commands/CalcModule.php @@ -34,7 +34,7 @@ public function __construct() /** * Execute the console command. * - * @return mixed + * @return int */ public function handle() { diff --git a/app/Console/Commands/Count.php b/app/Console/Commands/Count.php index 4bf0f5e..136ea51 100644 --- a/app/Console/Commands/Count.php +++ b/app/Console/Commands/Count.php @@ -39,7 +39,7 @@ public function __construct() /** * Execute the console command. * - * @return mixed + * @return int */ public function handle() { diff --git a/app/Console/Commands/GetUser.php b/app/Console/Commands/GetUser.php index 23015ee..84f1ce7 100644 --- a/app/Console/Commands/GetUser.php +++ b/app/Console/Commands/GetUser.php @@ -37,7 +37,7 @@ public function __construct() /** * Execute the console command. * - * @return mixed + * @return int */ public function handle() { diff --git a/app/Console/Commands/Mqtt.php b/app/Console/Commands/Mqtt.php index 372d35b..d30de0b 100644 --- a/app/Console/Commands/Mqtt.php +++ b/app/Console/Commands/Mqtt.php @@ -56,7 +56,7 @@ public function handle() $mqtt->subscribe('some/topic', function (string $topic, string $message) { echo sprintf('Received QoS level 1 message on topic [%s]: %s', $topic, $message) . PHP_EOL; }, 1); - $mqtt->loop(true); + $mqtt->loop(); return true; }, diff --git a/app/Console/Commands/ReduceBalance.php b/app/Console/Commands/ReduceBalance.php index 60d0409..292486a 100644 --- a/app/Console/Commands/ReduceBalance.php +++ b/app/Console/Commands/ReduceBalance.php @@ -35,7 +35,7 @@ public function __construct() /** * Execute the console command. * - * @return mixed + * @return void */ public function handle() { diff --git a/app/Console/Commands/Status.php b/app/Console/Commands/Status.php index f2f2be5..52c315f 100644 --- a/app/Console/Commands/Status.php +++ b/app/Console/Commands/Status.php @@ -35,7 +35,7 @@ public function __construct() /** * Execute the console command. * - * @return mixed + * @return int */ public function handle() { diff --git a/app/Console/Commands/SuspendUserAllHosts.php b/app/Console/Commands/SuspendUserAllHosts.php index 2afcef5..dcc46c8 100644 --- a/app/Console/Commands/SuspendUserAllHosts.php +++ b/app/Console/Commands/SuspendUserAllHosts.php @@ -34,7 +34,7 @@ public function __construct() /** * Execute the console command. * - * @return mixed + * @return void */ public function handle() { diff --git a/app/Console/Commands/UnbanUser.php b/app/Console/Commands/UnbanUser.php index dcc40f6..3a2bb6d 100644 --- a/app/Console/Commands/UnbanUser.php +++ b/app/Console/Commands/UnbanUser.php @@ -34,7 +34,7 @@ public function __construct() /** * Execute the console command. * - * @return mixed + * @return void */ public function handle() { diff --git a/app/Console/Commands/UserAddBalance.php b/app/Console/Commands/UserAddBalance.php index ae42727..ea45e54 100644 --- a/app/Console/Commands/UserAddBalance.php +++ b/app/Console/Commands/UserAddBalance.php @@ -36,7 +36,7 @@ public function __construct() /** * Execute the console command. * - * @return mixed + * @return int */ public function handle() { diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 39cfe09..7699d3d 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -4,6 +4,9 @@ use Illuminate\Auth\AuthenticationException; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; +use Illuminate\Http\JsonResponse; +use Illuminate\Http\RedirectResponse; +use Illuminate\Http\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Throwable; @@ -41,9 +44,8 @@ class Handler extends ExceptionHandler /** * Register the exception handling callbacks for the application. * - * @return void */ - public function register() + public function register(): void { $this->reportable(function (Throwable $e) { // custom json 404 response @@ -57,17 +59,19 @@ public function register() ], 404); } }); + + return; } /** * Convert an authentication exception into an unauthenticated response. * - * @param \Illuminate\Http\Request $request - * @param \Illuminate\Auth\AuthenticationException $exception + * @param Request $request + * @param AuthenticationException $exception * - * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse|\Illuminate\Http\Response + * @return JsonResponse|RedirectResponse */ - protected function unauthenticated($request, AuthenticationException $exception) + protected function unauthenticated($request, AuthenticationException $exception): JsonResponse|RedirectResponse { // if json request if ($request->expectsJson()) { diff --git a/app/Helpers/ApiResponse.php b/app/Helpers/ApiResponse.php index 885d181..3db119f 100644 --- a/app/Helpers/ApiResponse.php +++ b/app/Helpers/ApiResponse.php @@ -82,7 +82,7 @@ public function unauthorized($message = 'Unauthorized'): JsonResponse public function badRequest($message = 'Bad request'): JsonResponse { - return $this->error($message, 400); + return $this->error($message); } // bad request @@ -94,9 +94,9 @@ public function created($message = 'Created'): JsonResponse // created - public function success($data = []): JsonResponse + public function success($data = [], $status = 200): JsonResponse { - return $this->apiResponse($data, 200); + return $this->apiResponse($data, $status); } // accepted diff --git a/app/Http/Controllers/Admin/AdminController.php b/app/Http/Controllers/Admin/AdminController.php index 0105b46..6850136 100644 --- a/app/Http/Controllers/Admin/AdminController.php +++ b/app/Http/Controllers/Admin/AdminController.php @@ -49,7 +49,7 @@ public function store(Request $request): RedirectResponse ]); // 随机密码 - $password = Str::random(16); + $password = Str::random(); $admin = Admin::create([ 'email' => $request->email, @@ -89,7 +89,7 @@ public function update(Request $request, Admin $admin): RedirectResponse if ($request->filled('reset_password')) { // 随机密码 - $password = Str::random(16); + $password = Str::random(); $msg .= ',新的密码为:' . $password; diff --git a/app/Http/Controllers/Admin/UserController.php b/app/Http/Controllers/Admin/UserController.php index 91691b0..d97744b 100644 --- a/app/Http/Controllers/Admin/UserController.php +++ b/app/Http/Controllers/Admin/UserController.php @@ -21,7 +21,6 @@ class UserController extends Controller /** * Display a listing of the resource. * - * @return View */ public function index(Request $request): View { diff --git a/app/Http/Controllers/Api/ReplyController.php b/app/Http/Controllers/Api/ReplyController.php index 9971362..07bf4c8 100644 --- a/app/Http/Controllers/Api/ReplyController.php +++ b/app/Http/Controllers/Api/ReplyController.php @@ -5,7 +5,9 @@ use App\Http\Controllers\Controller; use App\Models\WorkOrder\Reply; use App\Models\WorkOrder\WorkOrder; +use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; +use Illuminate\Http\Response; use function auth; class ReplyController extends Controller @@ -29,9 +31,10 @@ public function index(WorkOrder $workOrder) /** * Store a newly created resource in storage. * - * @param \Illuminate\Http\Request $request + * @param Request $request + * @param WorkOrder $workOrder * - * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\Response + * @return JsonResponse|Response */ public function store(Request $request, WorkOrder $workOrder) { diff --git a/app/Http/Controllers/Modules/HostController.php b/app/Http/Controllers/Modules/HostController.php index 95cbac5..ab349c9 100644 --- a/app/Http/Controllers/Modules/HostController.php +++ b/app/Http/Controllers/Modules/HostController.php @@ -17,7 +17,7 @@ class HostController extends Controller /** * Display a listing of the resource. * - * @return Paginator + * */ public function index(Request $request): Paginator { diff --git a/app/Http/Controllers/Modules/ReplyController.php b/app/Http/Controllers/Modules/ReplyController.php index d6c05b0..3a8dbbf 100644 --- a/app/Http/Controllers/Modules/ReplyController.php +++ b/app/Http/Controllers/Modules/ReplyController.php @@ -28,9 +28,7 @@ public function index(Request $request): JsonResponse /** * Store a newly created resource in storage. * - * @param Request $request * - * @return JsonResponse */ public function store(Request $request, WorkOrder $work_order): JsonResponse { diff --git a/app/Http/Middleware/Authenticate.php b/app/Http/Middleware/Authenticate.php index 0cf26d2..54222f1 100644 --- a/app/Http/Middleware/Authenticate.php +++ b/app/Http/Middleware/Authenticate.php @@ -13,10 +13,12 @@ class Authenticate extends Middleware * * @return string|null */ - protected function redirectTo($request) + protected function redirectTo($request): ?string { if (!$request->expectsJson()) { return route('index'); } + + return null; } } diff --git a/app/Jobs/AutoCloseWorkOrder.php b/app/Jobs/AutoCloseWorkOrder.php index 679173e..6036df3 100644 --- a/app/Jobs/AutoCloseWorkOrder.php +++ b/app/Jobs/AutoCloseWorkOrder.php @@ -24,6 +24,6 @@ public function __construct() public function handle() { // closed replied after 1 days - WorkOrder::where('status', 'replied')->where('updated_at', '<=', now()->subDays(1))->update(['status' => 'closed']); + WorkOrder::where('status', 'replied')->where('updated_at', '<=', now()->subDays())->update(['status' => 'closed']); } } diff --git a/app/Jobs/CheckAndChargeBalance.php b/app/Jobs/CheckAndChargeBalance.php index 311f18e..819c4c9 100644 --- a/app/Jobs/CheckAndChargeBalance.php +++ b/app/Jobs/CheckAndChargeBalance.php @@ -62,13 +62,9 @@ public function checkAndCharge(Balance $balance, $check = false): bool $balance->update([ 'paid_at' => now() ]); - } catch (InvalidResponseException $e) { + } catch (InvalidResponseException|ChargeException $e) { Log::error($e->getMessage()); return false; - } catch (ChargeException $e) { - Log::error($e->getMessage()); - return false; - } return true; diff --git a/app/Jobs/ClearTasks.php b/app/Jobs/ClearTasks.php index 3e074b8..54b5303 100644 --- a/app/Jobs/ClearTasks.php +++ b/app/Jobs/ClearTasks.php @@ -32,6 +32,6 @@ public function __construct() public function handle() { // 删除所有大于 1 天的任务 - Task::where('created_at', '<', now()->subDays(1))->delete(); + Task::where('created_at', '<', now()->subDay())->delete(); } } diff --git a/app/Notifications/ModuleEarnings.php b/app/Notifications/ModuleEarnings.php index 4533e0f..0ec6eb1 100644 --- a/app/Notifications/ModuleEarnings.php +++ b/app/Notifications/ModuleEarnings.php @@ -30,7 +30,7 @@ public function __construct(Module $module) * * @param mixed $notifiable * - * @return MailMessage + * @return void */ public function toGroup($notifiable) { diff --git a/app/Notifications/UserBalanceNotification.php b/app/Notifications/UserBalanceNotification.php index 795a117..bfe62fc 100644 --- a/app/Notifications/UserBalanceNotification.php +++ b/app/Notifications/UserBalanceNotification.php @@ -2,7 +2,6 @@ namespace App\Notifications; -use App\Broadcasting\WeComRobotChannel; use App\Models\Balance; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; @@ -29,14 +28,14 @@ public function __construct() * * @param mixed $notifiable * - * @return array + * @return void */ // public function via($notifiable) // { // // return [WeComRobotChannel::class]; // } - public function toGroup($notifiable) + public function toGroup(mixed $notifiable): void { if ($notifiable instanceof Balance) { diff --git a/app/Observers/BalanceObserve.php b/app/Observers/BalanceObserve.php index 448c4ed..7c9f379 100644 --- a/app/Observers/BalanceObserve.php +++ b/app/Observers/BalanceObserve.php @@ -12,7 +12,7 @@ class BalanceObserve * * @param \App\Models\Balance $balance * - * @return void + * @return array */ public function created(Balance $balance) { @@ -26,7 +26,7 @@ public function created(Balance $balance) * * @param \App\Models\Balance $balance * - * @return void + * @return array */ public function updated(Balance $balance) { diff --git a/app/Observers/WorkOrder/ReplyObserver.php b/app/Observers/WorkOrder/ReplyObserver.php index bc0473e..9f4a1b5 100644 --- a/app/Observers/WorkOrder/ReplyObserver.php +++ b/app/Observers/WorkOrder/ReplyObserver.php @@ -12,7 +12,7 @@ class ReplyObserver * * @param \App\Models\WorkOrder\Reply $reply * - * @return void + * @return void|null */ public function created(Reply $reply) { diff --git a/app/Observers/WorkOrder/WorkOrderObserver.php b/app/Observers/WorkOrder/WorkOrderObserver.php index 8df357b..40c0f10 100644 --- a/app/Observers/WorkOrder/WorkOrderObserver.php +++ b/app/Observers/WorkOrder/WorkOrderObserver.php @@ -13,7 +13,7 @@ class WorkOrderObserver * * @param \App\Models\WorkOrder\WorkOrder $workOrder * - * @return void + * @return void|null */ public function created(WorkOrder $workOrder) { @@ -27,7 +27,7 @@ public function created(WorkOrder $workOrder) * * @param \App\Models\WorkOrder\WorkOrder $workOrder * - * @return void + * @return void|null */ public function updated(WorkOrder $workOrder) { diff --git a/app/View/Components/BasicCard.php b/app/View/Components/BasicCard.php index 1a1e267..8c4bbda 100644 --- a/app/View/Components/BasicCard.php +++ b/app/View/Components/BasicCard.php @@ -23,7 +23,7 @@ public function __construct($title) /** * Get the view / contents that represent the component. * - * @return \Illuminate\Contracts\View\View|\Closure|string + * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View */ public function render() { diff --git a/app/View/Components/HostStatus.php b/app/View/Components/HostStatus.php index 4dc06e4..4ba9acf 100644 --- a/app/View/Components/HostStatus.php +++ b/app/View/Components/HostStatus.php @@ -23,7 +23,7 @@ public function __construct($status) /** * Get the view / contents that represent the component. * - * @return \Illuminate\Contracts\View\View|\Closure|string + * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View */ public function render() { diff --git a/app/View/Components/ModuleEarning.php b/app/View/Components/ModuleEarning.php index 75d0421..9bbe7c6 100644 --- a/app/View/Components/ModuleEarning.php +++ b/app/View/Components/ModuleEarning.php @@ -24,7 +24,7 @@ public function __construct(Module $module) /** * Get the view / contents that represent the component. * - * @return \Illuminate\Contracts\View\View|\Closure|string + * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View */ public function render() { diff --git a/app/View/Components/ModuleScript.php b/app/View/Components/ModuleScript.php index 045a7e6..f33ba0a 100644 --- a/app/View/Components/ModuleScript.php +++ b/app/View/Components/ModuleScript.php @@ -20,7 +20,7 @@ public function __construct() /** * Get the view / contents that represent the component. * - * @return \Illuminate\Contracts\View\View|\Closure|string + * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View */ public function render() { diff --git a/app/View/Components/Payment.php b/app/View/Components/Payment.php index ff511cb..83b4789 100644 --- a/app/View/Components/Payment.php +++ b/app/View/Components/Payment.php @@ -22,7 +22,7 @@ public function __construct($payment) /** * Get the view / contents that represent the component. * - * @return \Illuminate\Contracts\View\View|\Closure|string + * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View */ public function render() { diff --git a/app/View/Components/WorkOrderStatus.php b/app/View/Components/WorkOrderStatus.php index 8cd4b08..651e61a 100644 --- a/app/View/Components/WorkOrderStatus.php +++ b/app/View/Components/WorkOrderStatus.php @@ -23,7 +23,7 @@ public function __construct($status) /** * Get the view / contents that represent the component. * - * @return \Illuminate\Contracts\View\View|\Closure|string + * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View */ public function render() { diff --git a/composer.lock b/composer.lock index 32aebb2..b98cec0 100644 --- a/composer.lock +++ b/composer.lock @@ -3556,16 +3556,16 @@ }, { "name": "php-mqtt/client", - "version": "v1.6.0", + "version": "v1.7.0", "source": { "type": "git", "url": "https://github.com/php-mqtt/client.git", - "reference": "22a207edef01d5f0ed3a6a79565cc425b678d786" + "reference": "846f0de5c5713d947892998f868e6b28607fc0a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-mqtt/client/zipball/22a207edef01d5f0ed3a6a79565cc425b678d786", - "reference": "22a207edef01d5f0ed3a6a79565cc425b678d786", + "url": "https://api.github.com/repos/php-mqtt/client/zipball/846f0de5c5713d947892998f868e6b28607fc0a0", + "reference": "846f0de5c5713d947892998f868e6b28607fc0a0", "shasum": "", "mirrors": [ { @@ -3613,9 +3613,9 @@ ], "support": { "issues": "https://github.com/php-mqtt/client/issues", - "source": "https://github.com/php-mqtt/client/tree/v1.6.0" + "source": "https://github.com/php-mqtt/client/tree/v1.7.0" }, - "time": "2022-11-01T20:00:19+00:00" + "time": "2022-12-09T17:02:12+00:00" }, { "name": "php-mqtt/laravel-client", @@ -4610,16 +4610,16 @@ }, { "name": "spiral/core", - "version": "3.3.0", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/spiral/core.git", - "reference": "dbf4e3fd37a815f924b9102441b8cdaf57e2f060" + "reference": "4e721be8d121da24a0fd76912b99556c3b05edb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/core/zipball/dbf4e3fd37a815f924b9102441b8cdaf57e2f060", - "reference": "dbf4e3fd37a815f924b9102441b8cdaf57e2f060", + "url": "https://api.github.com/repos/spiral/core/zipball/4e721be8d121da24a0fd76912b99556c3b05edb6", + "reference": "4e721be8d121da24a0fd76912b99556c3b05edb6", "shasum": "", "mirrors": [ { @@ -4640,7 +4640,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3.x-dev" + "dev-master": "3.4.x-dev" } }, "autoload": { @@ -4676,7 +4676,7 @@ "issues": "https://github.com/spiral/framework/issues", "source": "https://github.com/spiral/core" }, - "time": "2022-10-21T09:40:00+00:00" + "time": "2022-12-08T07:54:31+00:00" }, { "name": "spiral/goridge", @@ -4748,16 +4748,16 @@ }, { "name": "spiral/logger", - "version": "3.3.0", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/spiral/logger.git", - "reference": "88849efc338d049cd0d66024f610b4a6f86c925a" + "reference": "a8bd62d4b7144d1683185792a3c689118c16868e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/logger/zipball/88849efc338d049cd0d66024f610b4a6f86c925a", - "reference": "88849efc338d049cd0d66024f610b4a6f86c925a", + "url": "https://api.github.com/repos/spiral/logger/zipball/a8bd62d4b7144d1683185792a3c689118c16868e", + "reference": "a8bd62d4b7144d1683185792a3c689118c16868e", "shasum": "", "mirrors": [ { @@ -4769,7 +4769,7 @@ "require": { "php": ">=8.1", "psr/log": "1 - 3", - "spiral/core": "^3.3" + "spiral/core": "^3.4" }, "require-dev": { "mockery/mockery": "^1.5", @@ -4779,7 +4779,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3.x-dev" + "dev-master": "3.4.x-dev" } }, "autoload": { @@ -4815,7 +4815,7 @@ "issues": "https://github.com/spiral/framework/issues", "source": "https://github.com/spiral/logger" }, - "time": "2022-10-21T09:43:40+00:00" + "time": "2022-11-18T08:00:04+00:00" }, { "name": "spiral/roadrunner", @@ -5076,16 +5076,16 @@ }, { "name": "spiral/tokenizer", - "version": "3.3.0", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/spiral/tokenizer.git", - "reference": "5659b0ae6154f366633b6cd432742b5a4976a80b" + "reference": "cbfd4b6f63f19d51f6a9d4284c2f8343041e3e58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spiral/tokenizer/zipball/5659b0ae6154f366633b6cd432742b5a4976a80b", - "reference": "5659b0ae6154f366633b6cd432742b5a4976a80b", + "url": "https://api.github.com/repos/spiral/tokenizer/zipball/cbfd4b6f63f19d51f6a9d4284c2f8343041e3e58", + "reference": "cbfd4b6f63f19d51f6a9d4284c2f8343041e3e58", "shasum": "", "mirrors": [ { @@ -5097,19 +5097,19 @@ "require": { "ext-tokenizer": "*", "php": ">=8.1", - "spiral/core": "^3.3", - "spiral/logger": "^3.3", + "spiral/core": "^3.4", + "spiral/logger": "^3.4", "symfony/finder": "^5.3.7|^6.0" }, "require-dev": { "phpunit/phpunit": "^9.5.20", - "spiral/boot": "^3.3", + "spiral/boot": "^3.4", "vimeo/psalm": "^4.27" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3.x-dev" + "dev-master": "3.4.x-dev" } }, "autoload": { @@ -5145,7 +5145,7 @@ "issues": "https://github.com/spiral/framework/issues", "source": "https://github.com/spiral/tokenizer" }, - "time": "2022-10-26T10:24:55+00:00" + "time": "2022-11-18T08:03:04+00:00" }, { "name": "symfony/console", @@ -5322,16 +5322,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.1.1", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918" + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", - "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", "shasum": "", "mirrors": [ { @@ -5346,7 +5346,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.1-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -5375,7 +5375,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.1.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" }, "funding": [ { @@ -5391,20 +5391,20 @@ "type": "tidelift" } ], - "time": "2022-02-25T11:15:52+00:00" + "time": "2022-11-25T10:21:52+00:00" }, { "name": "symfony/error-handler", - "version": "v6.1.7", + "version": "v6.2.0", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "699a26ce5ec656c198bf6e26398b0f0818c7e504" + "reference": "d9894724a9d20afd3329e36b36e45835b5c2ab3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/699a26ce5ec656c198bf6e26398b0f0818c7e504", - "reference": "699a26ce5ec656c198bf6e26398b0f0818c7e504", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/d9894724a9d20afd3329e36b36e45835b5c2ab3e", + "reference": "d9894724a9d20afd3329e36b36e45835b5c2ab3e", "shasum": "", "mirrors": [ { @@ -5452,7 +5452,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.1.7" + "source": "https://github.com/symfony/error-handler/tree/v6.2.0" }, "funding": [ { @@ -5468,7 +5468,7 @@ "type": "tidelift" } ], - "time": "2022-10-28T16:23:08+00:00" + "time": "2022-11-02T09:08:04+00:00" }, { "name": "symfony/event-dispatcher", @@ -5561,7 +5561,7 @@ }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.1.0", + "version": "v3.1.1", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", @@ -5626,7 +5626,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.1.1" }, "funding": [ { @@ -5894,16 +5894,16 @@ }, { "name": "symfony/http-foundation", - "version": "v6.2.0", + "version": "v6.2.1", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "edc56ed49a2955383d59e9b7043fd3bbc26f1854" + "reference": "d0bbd5a7e81b38f32504399b9199f265505b7bac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/edc56ed49a2955383d59e9b7043fd3bbc26f1854", - "reference": "edc56ed49a2955383d59e9b7043fd3bbc26f1854", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d0bbd5a7e81b38f32504399b9199f265505b7bac", + "reference": "d0bbd5a7e81b38f32504399b9199f265505b7bac", "shasum": "", "mirrors": [ { @@ -5958,7 +5958,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.2.0" + "source": "https://github.com/symfony/http-foundation/tree/v6.2.1" }, "funding": [ { @@ -5974,20 +5974,20 @@ "type": "tidelift" } ], - "time": "2022-11-21T16:03:04+00:00" + "time": "2022-12-04T18:26:13+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.1.8", + "version": "v6.2.1", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "6073eaed148f4c0b8d4ae33e7332b34327ef728e" + "reference": "bcbd2ea12fee651a4c8bff4f6f00cce2ac1f8404" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/6073eaed148f4c0b8d4ae33e7332b34327ef728e", - "reference": "6073eaed148f4c0b8d4ae33e7332b34327ef728e", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/bcbd2ea12fee651a4c8bff4f6f00cce2ac1f8404", + "reference": "bcbd2ea12fee651a4c8bff4f6f00cce2ac1f8404", "shasum": "", "mirrors": [ { @@ -5999,6 +5999,7 @@ "require": { "php": ">=8.1", "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.1|^3", "symfony/error-handler": "^6.1", "symfony/event-dispatcher": "^5.4|^6.0", "symfony/http-foundation": "^5.4|^6.0", @@ -6009,7 +6010,7 @@ "symfony/cache": "<5.4", "symfony/config": "<6.1", "symfony/console": "<5.4", - "symfony/dependency-injection": "<6.1", + "symfony/dependency-injection": "<6.2", "symfony/doctrine-bridge": "<5.4", "symfony/form": "<5.4", "symfony/http-client": "<5.4", @@ -6029,7 +6030,7 @@ "symfony/config": "^6.1", "symfony/console": "^5.4|^6.0", "symfony/css-selector": "^5.4|^6.0", - "symfony/dependency-injection": "^6.1", + "symfony/dependency-injection": "^6.2", "symfony/dom-crawler": "^5.4|^6.0", "symfony/expression-language": "^5.4|^6.0", "symfony/finder": "^5.4|^6.0", @@ -6074,7 +6075,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.1.8" + "source": "https://github.com/symfony/http-kernel/tree/v6.2.1" }, "funding": [ { @@ -6090,20 +6091,20 @@ "type": "tidelift" } ], - "time": "2022-11-28T18:20:59+00:00" + "time": "2022-12-06T17:28:26+00:00" }, { "name": "symfony/mailer", - "version": "v6.2.0", + "version": "v6.2.1", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "7b355fca167fa5302c77bccdfa0af4d7abc6bd8c" + "reference": "a18c3dd41cfcf011e3866802e39b9ae9e541deaf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/7b355fca167fa5302c77bccdfa0af4d7abc6bd8c", - "reference": "7b355fca167fa5302c77bccdfa0af4d7abc6bd8c", + "url": "https://api.github.com/repos/symfony/mailer/zipball/a18c3dd41cfcf011e3866802e39b9ae9e541deaf", + "reference": "a18c3dd41cfcf011e3866802e39b9ae9e541deaf", "shasum": "", "mirrors": [ { @@ -6124,7 +6125,8 @@ "conflict": { "symfony/http-kernel": "<5.4", "symfony/messenger": "<6.2", - "symfony/mime": "<6.2" + "symfony/mime": "<6.2", + "symfony/twig-bridge": "<6.2.1" }, "require-dev": { "symfony/console": "^5.4|^6.0", @@ -6158,7 +6160,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.2.0" + "source": "https://github.com/symfony/mailer/tree/v6.2.1" }, "funding": [ { @@ -6174,7 +6176,7 @@ "type": "tidelift" } ], - "time": "2022-11-28T17:18:31+00:00" + "time": "2022-12-06T16:54:23+00:00" }, { "name": "symfony/mime", @@ -7599,16 +7601,16 @@ }, { "name": "symfony/translation-contracts", - "version": "v3.1.1", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "606be0f48e05116baef052f7f3abdb345c8e02cc" + "reference": "68cce71402305a015f8c1589bfada1280dc64fe7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/606be0f48e05116baef052f7f3abdb345c8e02cc", - "reference": "606be0f48e05116baef052f7f3abdb345c8e02cc", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/68cce71402305a015f8c1589bfada1280dc64fe7", + "reference": "68cce71402305a015f8c1589bfada1280dc64fe7", "shasum": "", "mirrors": [ { @@ -7626,7 +7628,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.1-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -7666,7 +7668,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.1.1" + "source": "https://github.com/symfony/translation-contracts/tree/v3.2.0" }, "funding": [ { @@ -7682,7 +7684,7 @@ "type": "tidelift" } ], - "time": "2022-06-27T17:24:16+00:00" + "time": "2022-11-25T10:21:52+00:00" }, { "name": "symfony/uid", @@ -7766,16 +7768,16 @@ }, { "name": "symfony/var-dumper", - "version": "v6.2.0", + "version": "v6.2.1", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "6228b11059d7b279be699682f164a107ba9a268d" + "reference": "1e7544c8698627b908657e5276854d52ab70087a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/6228b11059d7b279be699682f164a107ba9a268d", - "reference": "6228b11059d7b279be699682f164a107ba9a268d", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1e7544c8698627b908657e5276854d52ab70087a", + "reference": "1e7544c8698627b908657e5276854d52ab70087a", "shasum": "", "mirrors": [ { @@ -7840,7 +7842,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.2.0" + "source": "https://github.com/symfony/var-dumper/tree/v6.2.1" }, "funding": [ { @@ -7856,7 +7858,7 @@ "type": "tidelift" } ], - "time": "2022-11-28T13:41:56+00:00" + "time": "2022-12-03T22:32:58+00:00" }, { "name": "symfony/yaml", @@ -8299,16 +8301,16 @@ }, { "name": "yansongda/pay", - "version": "v3.2.9", + "version": "v3.2.10", "source": { "type": "git", "url": "https://github.com/yansongda/pay.git", - "reference": "20c3ef48d71ff276a87bc6b38399d6585d1b82ce" + "reference": "c084d672732032b8b189aaa5c370b52bc06d3c95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yansongda/pay/zipball/20c3ef48d71ff276a87bc6b38399d6585d1b82ce", - "reference": "20c3ef48d71ff276a87bc6b38399d6585d1b82ce", + "url": "https://api.github.com/repos/yansongda/pay/zipball/c084d672732032b8b189aaa5c370b52bc06d3c95", + "reference": "c084d672732032b8b189aaa5c370b52bc06d3c95", "shasum": "", "mirrors": [ { @@ -8378,7 +8380,7 @@ "issues": "https://github.com/yansongda/pay/issues", "source": "https://github.com/yansongda/pay" }, - "time": "2022-10-30T06:14:58+00:00" + "time": "2022-11-25T11:41:16+00:00" }, { "name": "yansongda/supports", @@ -9833,16 +9835,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.25", + "version": "9.5.26", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d" + "reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", - "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/851867efcbb6a1b992ec515c71cdcf20d895e9d2", + "reference": "851867efcbb6a1b992ec515c71cdcf20d895e9d2", "shasum": "", "mirrors": [ { @@ -9921,7 +9923,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.25" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.26" }, "funding": [ { @@ -9937,7 +9939,7 @@ "type": "tidelift" } ], - "time": "2022-09-25T03:44:45+00:00" + "time": "2022-10-28T06:00:21+00:00" }, { "name": "sebastian/cli-parser", diff --git a/config/app.php b/config/app.php index 07b5838..a221249 100644 --- a/config/app.php +++ b/config/app.php @@ -214,10 +214,10 @@ // 'ExampleClass' => App\Example\ExampleClass::class, ])->toArray(), - 'instance_id' => env('INSTANCE_ID', null), + 'instance_id' => env('INSTANCE_ID'), 'instance_type' => env('INSTANCE_TYPE', 'primary'), - 'instance_address' => env('INSTANCE_address', null), + 'instance_address' => env('INSTANCE_address'), ]; diff --git a/database/migrations/2022_08_30_081930_add_balance_to_users_table.php b/database/migrations/2022_08_30_081930_add_balance_to_users_table.php index 1506a80..8fe1a4f 100644 --- a/database/migrations/2022_08_30_081930_add_balance_to_users_table.php +++ b/database/migrations/2022_08_30_081930_add_balance_to_users_table.php @@ -14,7 +14,7 @@ public function up() { Schema::table('users', function (Blueprint $table) { // - $table->decimal('balances', 10, 2)->default(0)->after('password'); + $table->decimal('balances', 10)->default(0)->after('password'); // drop column if exists if (Schema::hasColumn('users', 'drops')) { diff --git a/database/migrations/2022_09_01_033240_create_balances_table.php b/database/migrations/2022_09_01_033240_create_balances_table.php index 0e547b8..50b1b3f 100644 --- a/database/migrations/2022_09_01_033240_create_balances_table.php +++ b/database/migrations/2022_09_01_033240_create_balances_table.php @@ -25,7 +25,7 @@ public function up() $table->string('payment')->nullable()->index(); // amount - $table->decimal('amount', 10, 2)->default(0); + $table->decimal('amount', 10)->default(0); // paid_at $table->timestamp('paid_at')->nullable(); diff --git a/database/migrations/2022_11_06_205842_add_remaining_amount_to_balances.php b/database/migrations/2022_11_06_205842_add_remaining_amount_to_balances.php index ce19d9f..ff09116 100644 --- a/database/migrations/2022_11_06_205842_add_remaining_amount_to_balances.php +++ b/database/migrations/2022_11_06_205842_add_remaining_amount_to_balances.php @@ -14,7 +14,7 @@ public function up() { Schema::table('balances', function (Blueprint $table) { // - $table->decimal('remaining_amount', 10, 2)->default(0)->after('amount'); + $table->decimal('remaining_amount', 10)->default(0)->after('amount'); }); }