Преглед на файлове

fix: 修复框架一处 bug. 由于 composer 新版本生成的 vendor/composer/composer.json 格式变更引发

joe преди 4 години
родител
ревизия
6faf79b211
променени са 2 файла, в които са добавени 5 реда и са изтрити 2 реда
  1. 4 1
      vendor/services.php
  2. 1 1
      vendor/topthink/framework/src/think/console/command/ServiceDiscover.php

+ 4 - 1
vendor/services.php

@@ -1,5 +1,8 @@
 <?php 
-// This file is automatically generated at:2021-05-05 18:33:49
+// This file is automatically generated at:2021-05-05 18:36:45
 declare (strict_types = 1);
 return array (
+  0 => 'think\\captcha\\CaptchaService',
+  1 => 'think\\app\\Service',
+  2 => 'think\\queue\\Service',
 );

+ 1 - 1
vendor/topthink/framework/src/think/console/command/ServiceDiscover.php

@@ -27,7 +27,7 @@ class ServiceDiscover extends Command
     public function execute(Input $input, Output $output)
     {
         if (is_file($path = $this->app->getRootPath() . 'vendor/composer/installed.json')) {
-            $packages = json_decode(@file_get_contents($path), true);
+            $packages = json_decode(@file_get_contents($path), true)['packages'];
 
             $services = [];
             foreach ($packages as $package) {