在 Laravel Framework 6.20.40、nuwave/lighthouse v5.33.1 中,报错:Argument 1 passed to App\\Exceptions\\Handler::report() must be an instance of Exception, instance of TypeError given, called in E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Execution\\ReportingErrorHandler.php on line 39
1、执行请求:”query”: “query{ onlineStoreTheme(themeId: “vogue”){ id editable createdAt publishAt } }”, 时,响应 Argument 1 passed to App\\Exceptions\\Handler::report() must be an instance of Exception, instance of TypeError given, called in E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Execution\\ReportingErrorHandler.php on line 39。如图1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 | { "message": "Argument 1 passed to App\\Exceptions\\Handler::report() must be an instance of Exception, instance of TypeError given, called in E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Execution\\ReportingErrorHandler.php on line 39", "exception": "Symfony\\Component\\Debug\\Exception\\FatalThrowableError", "file": "E:\\wwwroot\\object\\app\\Exceptions\\Handler.php", "line": 40, "trace": [ { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Execution\\ReportingErrorHandler.php", "line": 39, "function": "report", "class": "App\\Exceptions\\Handler", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 153, "function": "__invoke", "class": "Nuwave\\Lighthouse\\Execution\\ReportingErrorHandler", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Execution\\ExtensionErrorHandler.php", "line": 37, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 153, "function": "__invoke", "class": "Nuwave\\Lighthouse\\Execution\\ExtensionErrorHandler", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Execution\\ValidationErrorHandler.php", "line": 34, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 153, "function": "__invoke", "class": "Nuwave\\Lighthouse\\Execution\\ValidationErrorHandler", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Execution\\AuthorizationErrorHandler.php", "line": 34, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 153, "function": "__invoke", "class": "Nuwave\\Lighthouse\\Execution\\AuthorizationErrorHandler", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Execution\\AuthenticationErrorHandler.php", "line": 34, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 153, "function": "__invoke", "class": "Nuwave\\Lighthouse\\Execution\\AuthenticationErrorHandler", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 105, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\GraphQL.php", "line": 295, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "function": "Nuwave\\Lighthouse\\{closure}", "class": "Nuwave\\Lighthouse\\GraphQL", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Support\\Collection.php", "line": 638, "function": "array_map" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\GraphQL.php", "line": 296, "function": "map", "class": "Illuminate\\Support\\Collection", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\Executor\\ExecutionResult.php", "line": 147, "function": "Nuwave\\Lighthouse\\{closure}", "class": "Nuwave\\Lighthouse\\GraphQL", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\GraphQL.php", "line": 264, "function": "toArray", "class": "GraphQL\\Executor\\ExecutionResult", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\GraphQL.php", "line": 168, "function": "serializable", "class": "Nuwave\\Lighthouse\\GraphQL", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\GraphQL.php", "line": 119, "function": "executeOperation", "class": "Nuwave\\Lighthouse\\GraphQL", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Support\\Utils.php", "line": 99, "function": "Nuwave\\Lighthouse\\{closure}", "class": "Nuwave\\Lighthouse\\GraphQL", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\GraphQL.php", "line": 118, "function": "applyEach", "class": "Nuwave\\Lighthouse\\Support\\Utils", "type": "::" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Support\\Http\\Controllers\\GraphQLController.php", "line": 32, "function": "executeOperationOrOperations", "class": "Nuwave\\Lighthouse\\GraphQL", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\ControllerDispatcher.php", "line": 48, "function": "__invoke", "class": "Nuwave\\Lighthouse\\Support\\Http\\Controllers\\GraphQLController", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php", "line": 219, "function": "dispatch", "class": "Illuminate\\Routing\\ControllerDispatcher", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php", "line": 176, "function": "runController", "class": "Illuminate\\Routing\\Route", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 681, "function": "run", "class": "Illuminate\\Routing\\Route", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 130, "function": "Illuminate\\Routing\\{closure}", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Support\\Http\\Middleware\\AttemptAuthentication.php", "line": 34, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "function": "handle", "class": "Nuwave\\Lighthouse\\Support\\Http\\Middleware\\AttemptAuthentication", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Support\\Http\\Middleware\\AcceptJson.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "function": "handle", "class": "Nuwave\\Lighthouse\\Support\\Http\\Middleware\\AcceptJson", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 105, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 683, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 658, "function": "runRouteWithinStack", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 624, "function": "runRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 613, "function": "dispatchToRoute", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 170, "function": "dispatch", "class": "Illuminate\\Routing\\Router", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 130, "function": "Illuminate\\Foundation\\Http\\{closure}", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 67, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "function": "handle", "class": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode.php", "line": 63, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\fideloper\\proxy\\src\\TrustProxies.php", "line": 57, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "function": "handle", "class": "Fideloper\\Proxy\\TrustProxies", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\dingo\\api\\src\\Http\\Middleware\\Request.php", "line": 111, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "function": "handle", "class": "Dingo\\Api\\Http\\Middleware\\Request", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 105, "function": "Illuminate\\Pipeline\\{closure}", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 145, "function": "then", "class": "Illuminate\\Pipeline\\Pipeline", "type": "->" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 110, "function": "sendRequestThroughRouter", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" }, { "file": "E:\\wwwroot\\object\\public\\index.php", "line": 57, "function": "handle", "class": "Illuminate\\Foundation\\Http\\Kernel", "type": "->" } ] } |
2、查看代码:\app\Exceptions\Handler.php:40 。如图2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | /** * Report or log an exception. * * @param \Exception $exception * @return void * @throws Exception */ public function report(Exception $exception ) { // 1/10的概率上报到sentry,防止sentry增长过快 if (app()->environment() === "production" && app()->bound( 'sentry' ) && $this ->shouldReport( $exception ) && mt_rand(0, 100) < 10 ) { \Sentry\withScope( function (\Sentry\State\Scope $scope ) use ( $exception ): void { $scope ->setTag( 'app.name' , config( 'app.name' )); \Sentry\captureException( $exception ); }); } if (( $exception instanceof BusinessException)) { BusinessException::notify( $exception ); } parent::report( $exception ); } |
3、查看代码:/vendor/nuwave/lighthouse/src/Execution/ReportingErrorHandler.php:39 。在 38 行有注释: @phpstan-ignore-next-line Laravel 7 之前的版本仅限于接受 \Exception。如图3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | public function __invoke(?Error $error , Closure $next ): ? array { if (null === $error ) { return $next (null); } // Client-safe errors are assumed to be something that a client can handle // or is expected to happen, e.g. wrong syntax, authentication or validation if ( $error ->isClientSafe()) { return $next ( $error ); } $previous = $error ->getPrevious(); if (null !== $previous ) { // @phpstan-ignore-next-line Laravel versions prior to 7 are limited to accepting \Exception $this ->exceptionHandler->report( $previous ); } return $next ( $error ); } |
4、当前程序的 Laravel 框架的版本:Laravel Framework 6.20.40。 nuwave/lighthouse 的版本:v5.33.1。
1 2 3 4 5 | PS E:\wwwroot\object> php artisan Laravel Framework 6.20.40 Usage: command [options] [arguments] |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | PS E:\wwwroot\object> composer show nuwave/lighthouse -i easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages. name : nuwave/lighthouse descrip. : A framework for serving GraphQL from Laravel keywords : graphql, laravel, laravel-graphql versions : * v5.33.1 type : library license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText homepage : https://lighthouse-php.com source : [git] https://github.com/nuwave/lighthouse.git 4ff54df1a6e87fd4e753f4633cc9949f4664ae7d dist : [zip] https://api.github.com/repos/nuwave/lighthouse/zipball/4ff54df1a6e87fd4e753f4633cc9949f4664ae7d 4ff54df1a6e87fd4e753f4633cc9949f4664ae7d path : E:\wwwroot\object\vendor\nuwave\lighthouse names : nuwave/lighthouse |
5、打开网址:https://github.com/nuwave/lighthouse/blob/v5.1.0/src/Execution/ReportingErrorHandler.php ,可以确定此问题从版本:v5.1.0 开始不再支持 Laravel 6 的。决定回退至此版本的上一版本:v5.0.2。如图4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | public function __invoke(?Error $error , Closure $next ): ? array { if ( $error === null) { return $next (null); } // Client-safe errors are assumed to be something that a client can handle // or is expected to happen, e.g. wrong syntax, authentication or validation if ( $error ->isClientSafe()) { return $next ( $error ); } $this ->exceptionHandler->report( // @phpstan-ignore-next-line TODO remove when supporting Laravel 7 and upwards $error ->getPrevious() ); return $next ( $error ); } |
6、执行 composer remove nuwave/lighthouse 命令,卸载 nuwave/lighthouse。如图5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | PS E:\wwwroot\object> composer remove nuwave/lighthouse easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d ./composer.json has been updated easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d Running composer update nuwave/lighthouse Loading composer repositories with package information Updating dependencies Lock file operations: 0 installs, 0 updates, 6 removals - Removing haydenpierce/class-finder (0.4.3) - Removing laragraph/utils (v1.1.1) - Removing mll-lab/laravel-graphql-playground (v2.5.0) - Removing nuwave/lighthouse (v5.33.1) - Removing thecodingmachine/safe (v1.3.3) - Removing webonyx/graphql-php (v14.11.3) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 0 installs, 0 updates, 6 removals - Removing webonyx/graphql-php (v14.11.3) - Removing thecodingmachine/safe (v1.3.3) - Removing nuwave/lighthouse (v5.33.1) - Removing mll-lab/laravel-graphql-playground (v2.5.0) - Removing laragraph/utils (v1.1.1) - Removing haydenpierce/class-finder (0.4.3) Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested. Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead. Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested. Generating optimized autoload files > Google\Task\Composer::cleanup Class Tests\Feature\LoginApiPostCartPaymentTest located in E:/wwwroot/object/tests\Feature\ApiCartPaymentTest.php does not comply with psr-4 autoloading standard. Skipping. Class Tests\Feature\LoginApiPostCartTest located in E:/wwwroot/object/tests\Feature\ApiCartTest.php does not comply with psr-4 autoloading standard. Skipping. Class Tests\Feature\LoginGetPaymentTest located in E:/wwwroot/object/tests\Feature\PaymentTest.php does not comply with psr-4 autoloading standard. Skipping. Class Sofa\Eloquence\Searchable\Searchable located in E:/wwwroot/object/vendor/sofa/eloquence-base/src\Contracts\Searchable\Searchable.php does not comply with psr-4 autoloading standard. Skipping. Class Modules\RecommendedProduct\Database\Seeders\LastSaleDatabaseSeeder located in E:/wwwroot/object/Modules\LastSale\Database\Seeders\LastSaleDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping. Class Modules\CheckoutPageImage\Database\Seeders\PixelConversionDatabaseSeeder located in E:/wwwroot/object/Modules\PixelConversion\Database\Seeders\PixelConversionDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping. Class Modules\ThemeStore\Tests\FactoryTest located in E:/wwwroot/object/Modules\ThemeStore\Tests\Unit\FactoryTest.php does not comply with psr-4 autoloading standard. Skipping. > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi Discovered Package: arubacao/asset-cdn Discovered Package: axlon/laravel-postal-code-validation Discovered Package: barryvdh/laravel-debugbar Discovered Package: beyondcode/laravel-dump-server Discovered Package: beyondcode/laravel-er-diagram-generator Discovered Package: boaideas/laravel-cli-create-user Discovered Package: cviebrock/eloquent-sluggable Discovered Package: dingo/api Discovered Package: fideloper/proxy Discovered Package: genealabs/laravel-model-caching Discovered Package: igaster/laravel-theme Discovered Package: ignited/laravel-omnipay Discovered Package: intervention/image Discovered Package: jenssegers/agent Discovered Package: jgrossi/corcel Discovered Package: laravel/passport Discovered Package: laravel/scout Discovered Package: laravel/socialite Discovered Package: laravel/tinker Discovered Package: laravel/ui Discovered Package: maatwebsite/excel Discovered Package: mpociot/laravel-apidoc-generator Discovered Package: nesbot/carbon Discovered Package: neobject/facebook-conversions-api Discovered Package: nunomaduro/collision Discovered Package: nwidart/laravel-modules Discovered Package: orangehill/iseed Discovered Package: overtrue/laravel-pinyin Discovered Package: overtrue/laravel-wechat Discovered Package: s-ichikawa/laravel-sendgrid-driver Discovered Package: sentry/sentry-laravel Discovered Package: socialiteproviders/manager Discovered Package: sofa/eloquence-base Discovered Package: sofa/eloquence-mutable Discovered Package: spatie/laravel-activitylog Discovered Package: spatie/laravel-permission Discovered Package: spatie/laravel-query-builder Discovered Package: spatie/laravel-sitemap Discovered Package: tamayo/laravel-scout-elastic Discovered Package: torann/geoip Package manifest generated successfully. 114 packages you are using are looking for funding. Use the `composer fund` command to find out more! |
7、执行 composer require nuwave/lighthouse:5.0.2 命令,安装 nuwave/lighthouse。指定包的确切版本。如图6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | PS E:\wwwroot\object> composer require nuwave/lighthouse:5.0.2 easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d ./composer.json has been updated easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d Running composer update nuwave/lighthouse Loading composer repositories with package information Updating dependencies Lock file operations: 5 installs, 0 updates, 0 removals - Locking haydenpierce/class-finder (0.4.3) - Locking laragraph/utils (v1.3.0) - Locking nuwave/lighthouse (v5.0.2) - Locking thecodingmachine/safe (v1.3.3) - Locking webonyx/graphql-php (v14.11.3) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 5 installs, 0 updates, 0 removals - Downloading laragraph/utils (v1.3.0) - Downloading nuwave/lighthouse (v5.0.2) - Installing webonyx/graphql-php (v14.11.3): Extracting archive - Installing thecodingmachine/safe (v1.3.3): Extracting archive - Installing laragraph/utils (v1.3.0): Extracting archive - Installing haydenpierce/class-finder (0.4.3): Extracting archive - Installing nuwave/lighthouse (v5.0.2): Extracting archive 3 package suggestions were added by new dependencies, use `composer suggest` to see details. Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested. Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead. Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested. Generating optimized autoload files > Google\Task\Composer::cleanup Class Tests\Feature\LoginApiPostCartPaymentTest located in E:/wwwroot/object/tests\Feature\ApiCartPaymentTest.php does not comply with psr-4 autoloading standard. Skipping. Class Tests\Feature\LoginApiPostCartTest located in E:/wwwroot/object/tests\Feature\ApiCartTest.php does not comply with psr-4 autoloading standard. Skipping. Class Tests\Feature\LoginGetPaymentTest located in E:/wwwroot/object/tests\Feature\PaymentTest.php does not comply with psr-4 autoloading standard. Skipping. Class Sofa\Eloquence\Searchable\Searchable located in E:/wwwroot/object/vendor/sofa/eloquence-base/src\Contracts\Searchable\Searchable.php does not comply with psr-4 autoloading standard. Skipping. Class Modules\RecommendedProduct\Database\Seeders\LastSaleDatabaseSeeder located in E:/wwwroot/object/Modules\LastSale\Database\Seeders\LastSaleDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping. Class Modules\CheckoutPageImage\Database\Seeders\PixelConversionDatabaseSeeder located in E:/wwwroot/object/Modules\PixelConversion\Database\Seeders\PixelConversionDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping. Class Modules\ThemeStore\Tests\FactoryTest located in E:/wwwroot/object/Modules\ThemeStore\Tests\Unit\FactoryTest.php does not comply with psr-4 autoloading standard. Skipping. > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi Discovered Package: arubacao/asset-cdn Discovered Package: axlon/laravel-postal-code-validation Discovered Package: barryvdh/laravel-debugbar Discovered Package: beyondcode/laravel-dump-server Discovered Package: beyondcode/laravel-er-diagram-generator Discovered Package: boaideas/laravel-cli-create-user Discovered Package: cviebrock/eloquent-sluggable Discovered Package: dingo/api Discovered Package: fideloper/proxy Discovered Package: genealabs/laravel-model-caching Discovered Package: igaster/laravel-theme Discovered Package: ignited/laravel-omnipay Discovered Package: intervention/image Discovered Package: jenssegers/agent Discovered Package: jgrossi/corcel Discovered Package: laravel/passport Discovered Package: laravel/scout Discovered Package: laravel/socialite Discovered Package: laravel/tinker Discovered Package: laravel/ui Discovered Package: maatwebsite/excel Discovered Package: mpociot/laravel-apidoc-generator Discovered Package: nesbot/carbon Discovered Package: neobject/facebook-conversions-api Discovered Package: nunomaduro/collision Discovered Package: nuwave/lighthouse Discovered Package: nwidart/laravel-modules Discovered Package: orangehill/iseed Discovered Package: overtrue/laravel-pinyin Discovered Package: overtrue/laravel-wechat Discovered Package: s-ichikawa/laravel-sendgrid-driver Discovered Package: sentry/sentry-laravel Discovered Package: socialiteproviders/manager Discovered Package: sofa/eloquence-base Discovered Package: sofa/eloquence-mutable Discovered Package: spatie/laravel-activitylog Discovered Package: spatie/laravel-permission Discovered Package: spatie/laravel-query-builder Discovered Package: spatie/laravel-sitemap Discovered Package: tamayo/laravel-scout-elastic Discovered Package: torann/geoip Package manifest generated successfully. 116 packages you are using are looking for funding. Use the `composer fund` command to find out more! PS E:\wwwroot\object> composer show nuwave/lighthouse -i easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d You are using the deprecated option "installed". Only installed packages are shown by default now. The --all option can be used to show all packages. name : nuwave/lighthouse descrip. : A framework for serving GraphQL from Laravel keywords : graphql, laravel, laravel-graphql versions : * v5.0.2 type : library license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText homepage : https://lighthouse-php.com source : [git] https://github.com/nuwave/lighthouse.git d3921f093ccf608b52a92879dd24915317cefa65 dist : [zip] https://api.github.com/repos/nuwave/lighthouse/zipball/d3921f093ccf608b52a92879dd24915317cefa65 d3921f093ccf608b52a92879dd24915317cefa65 path : E:\wwwroot\object\vendor\nuwave\lighthouse names : nuwave/lighthouse support source : https://github.com/nuwave/lighthouse autoload psr-4 Nuwave\Lighthouse\ => src/ requires ext-json * haydenpierce/class-finder ^0.4 illuminate/auth 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8 illuminate/bus 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8 illuminate/contracts 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8 illuminate/http 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8 illuminate/pagination 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8 illuminate/queue 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8 illuminate/routing 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8 illuminate/support 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8 illuminate/validation 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8 laragraph/utils ^1 php >= 7.2 thecodingmachine/safe ^1 webonyx/graphql-php ^14.2 requires (dev) bensampo/laravel-enum ^1.28.3 || ^2 || ^3 ergebnis/composer-normalize ^2.2.2 laravel/framework 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8 laravel/legacy-factories ^1.0 laravel/lumen-framework 5.6.* || 5.7.* || 5.8.* || ^6 || ^7 || ^8 laravel/scout ^7 || ^8 mll-lab/graphql-php-scalars ^4 mockery/mockery ^1.0 nunomaduro/larastan ^0.6 orchestra/testbench 3.6.* || 3.7.* || 3.8.* || 3.9.* || ^4 || ^5 || ^6 phpbench/phpbench ^0.17 phpstan/phpstan-mockery ^0.12.5 phpunit/phpunit ^7.5 || ^8.4 predis/predis ^1.1 pusher/pusher-php-server ^3.2 rector/rector ^0.7.64 thecodingmachine/phpstan-safe-rule ^1.0 suggests bensampo/laravel-enum Convenient enum definitions that can easily be registered in your Schema laravel/scout Required for the @search directive mll-lab/graphql-php-scalars Useful scalar types, required for @whereConditions mll-lab/laravel-graphql-playground GraphQL IDE for better development workflow - integrated with Laravel PS E:\wwwroot\object> |
8、执行请求:”query”: “query{ onlineStoreTheme(themeId: “vogue”){ id editable createdAt publishAt } }”, 时,响应 Argument 1 passed to App\\Exceptions\\Handler::report() must be an instance of Exception, instance of TypeError given, called in E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Execution\\ReportingErrorHandler.php on line 38。
9、执行 composer remove nuwave/lighthouse 命令,卸载 nuwave/lighthouse。执行 composer require nuwave/lighthouse:4.18.0 命令,安装 nuwave/lighthouse。指定包的确切版本。仍然报错:Argument 1 passed to App\\Exceptions\\Handler::report() must be an instance of Exception, instance of TypeError given, called in E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Execution\\ReportingErrorHandler.php on line 25 。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | <?php namespace Nuwave\Lighthouse\Execution; use Closure; use GraphQL\Error\Error; use Illuminate\Contracts\Debug\ExceptionHandler; /** * Report errors through the default exception handler configured in Laravel. */ class ReportingErrorHandler implements ErrorHandler { public static function handle(Error $error , Closure $next ): array { // Client-safe errors are assumed to be something that a client can handle // or is expected to happen, e.g. wrong syntax, authentication or validation if ( $error ->isClientSafe()) { return $next ( $error ); } // TODO inject through constructor once handle is non-static /** @var \Illuminate\Contracts\Debug\ExceptionHandler $reporter */ $reporter = app(ExceptionHandler:: class ); $reporter ->report( $error ->getPrevious()); // @phpstan-ignore-line TODO remove when supporting Laravel 7 and upwards return $next ( $error ); } } |
10、执行 composer remove nuwave/lighthouse 命令,卸载 nuwave/lighthouse。执行 composer require nuwave/lighthouse:~4.10.1 命令,安装 nuwave/lighthouse。波浪号运算符 ~4.10.1 相当于 >=4.10.1,<4.11。4.10.1 版本已经不存在文件:\vendor\nuwave\lighthouse\src\Execution\ReportingErrorHandler.php 。再次请求,响应 200。提示:Return value of Modules\\ThemeSetting\\Bridge\\IgasterLaravelTheme\\FileRawSectionSchemaLoader::load() must be of the type array, bool returned 。符合预期。至少在程序出现异常的时候,能够明确定位到具体的异常情况。如图7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | { "errors": [ { "debugMessage": "Return value of Modules\\ThemeSetting\\Bridge\\IgasterLaravelTheme\\FileRawSectionSchemaLoader::load() must be of the type array, bool returned", "message": "Internal server error", "extensions": { "category": "internal" }, "locations": [ { "line": 2, "column": 3 } ], "path": [ "onlineStoreTheme" ], "trace": [ { "file": "E:\\wwwroot\\object\\Modules\\ThemeSetting\\Schema\\Builder\\ThemeBuilder.php", "line": 86, "call": "Modules\\ThemeSetting\\Bridge\\IgasterLaravelTheme\\FileRawSectionSchemaLoader::load('header')" }, { "file": "E:\\wwwroot\\object\\Modules\\ThemeSetting\\Bridge\\IgasterLaravelTheme\\FileThemeSchemaLoader.php", "line": 43, "call": "Modules\\ThemeSetting\\Schema\\Builder\\ThemeBuilder::build(array(1), instance of Modules\\ThemeSetting\\Schema\\Dto\\Theme)" }, { "file": "E:\\wwwroot\\object\\Modules\\ThemeStore\\Resolver\\OnlineStoreThemeResolver.php", "line": 39, "call": "Modules\\ThemeSetting\\Bridge\\IgasterLaravelTheme\\FileThemeSchemaLoader::loadSchema()" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Schema\\Directives\\FieldDirective.php", "line": 58, "call": "Modules\\ThemeStore\\Resolver\\OnlineStoreThemeResolver::__invoke(null, array(2), instance of Nuwave\\Lighthouse\\Schema\\Context, instance of GraphQL\\Type\\Definition\\ResolveInfo)" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Schema\\Factories\\FieldFactory.php", "line": 174, "call": "Nuwave\\Lighthouse\\Schema\\Directives\\FieldDirective::Nuwave\\Lighthouse\\Schema\\Directives\\{closure}(null, array(1), instance of Nuwave\\Lighthouse\\Schema\\Context, instance of GraphQL\\Type\\Definition\\ResolveInfo)" }, { "file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\Executor\\ReferenceExecutor.php", "line": 632, "call": "Nuwave\\Lighthouse\\Schema\\Factories\\FieldFactory::Nuwave\\Lighthouse\\Schema\\Factories\\{closure}(null, array(1), instance of Nuwave\\Lighthouse\\Schema\\Context, instance of GraphQL\\Type\\Definition\\ResolveInfo)" }, { "file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\Executor\\ReferenceExecutor.php", "line": 555, "call": "GraphQL\\Executor\\ReferenceExecutor::resolveOrError(instance of GraphQL\\Type\\Definition\\FieldDefinition, instance of GraphQL\\Language\\AST\\FieldNode, instance of Closure, null, instance of Nuwave\\Lighthouse\\Schema\\Context, instance of GraphQL\\Type\\Definition\\ResolveInfo)" }, { "file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\Executor\\ReferenceExecutor.php", "line": 1247, "call": "GraphQL\\Executor\\ReferenceExecutor::resolveField(GraphQLType: Query, null, instance of ArrayObject(1), array(1))" }, { "file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\Executor\\ReferenceExecutor.php", "line": 257, "call": "GraphQL\\Executor\\ReferenceExecutor::executeFields(GraphQLType: Query, null, array(0), instance of ArrayObject(1))" }, { "file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\Executor\\ReferenceExecutor.php", "line": 208, "call": "GraphQL\\Executor\\ReferenceExecutor::executeOperation(instance of GraphQL\\Language\\AST\\OperationDefinitionNode, null)" }, { "file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\Executor\\Executor.php", "line": 155, "call": "GraphQL\\Executor\\ReferenceExecutor::doExecute()" }, { "file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\GraphQL.php", "line": 158, "call": "GraphQL\\Executor\\Executor::promiseToExecute(instance of GraphQL\\Executor\\Promise\\Adapter\\SyncPromiseAdapter, instance of GraphQL\\Type\\Schema, instance of GraphQL\\Language\\AST\\DocumentNode, null, instance of Nuwave\\Lighthouse\\Schema\\Context, array(0), null, null)" }, { "file": "E:\\wwwroot\\object\\vendor\\webonyx\\graphql-php\\src\\GraphQL.php", "line": 90, "call": "GraphQL\\GraphQL::promiseToExecute(instance of GraphQL\\Executor\\Promise\\Adapter\\SyncPromiseAdapter, instance of GraphQL\\Type\\Schema, 'query{\n onlineStoreTheme(themeId: \"vogue\"){\n id\n editable\n createdAt\n publishAt\n }\n}', null, instance of Nuwave\\Lighthouse\\Schema\\Context, array(0), null, null, array(29))" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\GraphQL.php", "line": 171, "call": "GraphQL\\GraphQL::executeQuery(instance of GraphQL\\Type\\Schema, 'query{\n onlineStoreTheme(themeId: \"vogue\"){\n id\n editable\n createdAt\n publishAt\n }\n}', null, instance of Nuwave\\Lighthouse\\Schema\\Context, array(0), null, null, array(29))" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\GraphQL.php", "line": 110, "call": "Nuwave\\Lighthouse\\GraphQL::executeQuery('query{\n onlineStoreTheme(themeId: \"vogue\"){\n id\n editable\n createdAt\n publishAt\n }\n}', instance of Nuwave\\Lighthouse\\Schema\\Context, array(0), null, null)" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Support\\Http\\Controllers\\GraphQLController.php", "line": 70, "call": "Nuwave\\Lighthouse\\GraphQL::executeRequest(instance of Nuwave\\Lighthouse\\Execution\\LighthouseRequest)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Controller.php", "line": 54, "call": "Nuwave\\Lighthouse\\Support\\Http\\Controllers\\GraphQLController::query(instance of Nuwave\\Lighthouse\\Execution\\LighthouseRequest)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\ControllerDispatcher.php", "line": 45, "call": "Illuminate\\Routing\\Controller::callAction('query', array(1))" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php", "line": 219, "call": "Illuminate\\Routing\\ControllerDispatcher::dispatch(instance of Illuminate\\Routing\\Route, instance of Nuwave\\Lighthouse\\Support\\Http\\Controllers\\GraphQLController, 'query')" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Route.php", "line": 176, "call": "Illuminate\\Routing\\Route::runController()" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 681, "call": "Illuminate\\Routing\\Route::run()" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 130, "call": "Illuminate\\Routing\\Router::Illuminate\\Routing\\{closure}(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\nuwave\\lighthouse\\src\\Support\\Http\\Middleware\\AcceptJson.php", "line": 30, "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "call": "Nuwave\\Lighthouse\\Support\\Http\\Middleware\\AcceptJson::handle(instance of Illuminate\\Http\\Request, instance of Closure)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 105, "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 683, "call": "Illuminate\\Pipeline\\Pipeline::then(instance of Closure)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 658, "call": "Illuminate\\Routing\\Router::runRouteWithinStack(instance of Illuminate\\Routing\\Route, instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 624, "call": "Illuminate\\Routing\\Router::runRoute(instance of Illuminate\\Http\\Request, instance of Illuminate\\Routing\\Route)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Routing\\Router.php", "line": 613, "call": "Illuminate\\Routing\\Router::dispatchToRoute(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 170, "call": "Illuminate\\Routing\\Router::dispatch(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 130, "call": "Illuminate\\Foundation\\Http\\Kernel::Illuminate\\Foundation\\Http\\{closure}(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\barryvdh\\laravel-debugbar\\src\\Middleware\\InjectDebugbar.php", "line": 67, "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "call": "Barryvdh\\Debugbar\\Middleware\\InjectDebugbar::handle(instance of Illuminate\\Http\\Request, instance of Closure)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "call": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest::handle(instance of Illuminate\\Http\\Request, instance of Closure)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest.php", "line": 21, "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "call": "Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest::handle(instance of Illuminate\\Http\\Request, instance of Closure)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize.php", "line": 27, "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "call": "Illuminate\\Foundation\\Http\\Middleware\\ValidatePostSize::handle(instance of Illuminate\\Http\\Request, instance of Closure)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode.php", "line": 63, "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "call": "Illuminate\\Foundation\\Http\\Middleware\\CheckForMaintenanceMode::handle(instance of Illuminate\\Http\\Request, instance of Closure)" }, { "file": "E:\\wwwroot\\object\\vendor\\fideloper\\proxy\\src\\TrustProxies.php", "line": 57, "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "call": "Fideloper\\Proxy\\TrustProxies::handle(instance of Illuminate\\Http\\Request, instance of Closure)" }, { "file": "E:\\wwwroot\\object\\vendor\\dingo\\api\\src\\Http\\Middleware\\Request.php", "line": 111, "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 171, "call": "Dingo\\Api\\Http\\Middleware\\Request::handle(instance of Illuminate\\Http\\Request, instance of Closure)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Pipeline\\Pipeline.php", "line": 105, "call": "Illuminate\\Pipeline\\Pipeline::Illuminate\\Pipeline\\{closure}(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 145, "call": "Illuminate\\Pipeline\\Pipeline::then(instance of Closure)" }, { "file": "E:\\wwwroot\\object\\vendor\\laravel\\framework\\src\\Illuminate\\Foundation\\Http\\Kernel.php", "line": 110, "call": "Illuminate\\Foundation\\Http\\Kernel::sendRequestThroughRouter(instance of Illuminate\\Http\\Request)" }, { "file": "E:\\wwwroot\\object\\public\\index.php", "line": 57, "call": "Illuminate\\Foundation\\Http\\Kernel::handle(instance of Illuminate\\Http\\Request)" } ] } ], "data": { "onlineStoreTheme": null } } |
11、nuwave/lighthouse 的版本:4.10.2。如图8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | PS E:\wwwroot\object> composer require nuwave/lighthouse:~4.10.1 easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d ./composer.json has been updated easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d Running composer update nuwave/lighthouse Loading composer repositories with package information Updating dependencies Lock file operations: 2 installs, 0 updates, 0 removals - Locking nuwave/lighthouse (4.10.2) - Locking webonyx/graphql-php (v0.13.9) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 2 installs, 0 updates, 0 removals - Downloading nuwave/lighthouse (4.10.2) - Installing webonyx/graphql-php (v0.13.9): Extracting archive - Installing nuwave/lighthouse (4.10.2): Extracting archive 4 package suggestions were added by new dependencies, use `composer suggest` to see details. Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested. Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead. Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested. Generating optimized autoload files > Google\Task\Composer::cleanup Class Tests\Feature\LoginApiPostCartPaymentTest located in E:/wwwroot/object/tests\Feature\ApiCartPaymentTest.php does not comply with psr-4 autoloading standard. Skipping. Class Tests\Feature\LoginApiPostCartTest located in E:/wwwroot/object/tests\Feature\ApiCartTest.php does not comply with psr-4 autoloading standard. Skipping. Class Tests\Feature\LoginGetPaymentTest located in E:/wwwroot/object/tests\Feature\PaymentTest.php does not comply with psr-4 autoloading standard. Skipping. Class Sofa\Eloquence\Searchable\Searchable located in E:/wwwroot/object/vendor/sofa/eloquence-base/src\Contracts\Searchable\Searchable.php does not comply with psr-4 autoloading standard. Skipping. Class Modules\RecommendedProduct\Database\Seeders\LastSaleDatabaseSeeder located in E:/wwwroot/object/Modules\LastSale\Database\Seeders\LastSaleDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping. Class Modules\CheckoutPageImage\Database\Seeders\PixelConversionDatabaseSeeder located in E:/wwwroot/object/Modules\PixelConversion\Database\Seeders\PixelConversionDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping. Class Modules\ThemeStore\Tests\FactoryTest located in E:/wwwroot/object/Modules\ThemeStore\Tests\Unit\FactoryTest.php does not comply with psr-4 autoloading standard. Skipping. > Illuminate\Foundation\ComposerScripts::postAutoloadDump > @php artisan package:discover --ansi Discovered Package: arubacao/asset-cdn Discovered Package: axlon/laravel-postal-code-validation Discovered Package: barryvdh/laravel-debugbar Discovered Package: beyondcode/laravel-dump-server Discovered Package: beyondcode/laravel-er-diagram-generator Discovered Package: boaideas/laravel-cli-create-user Discovered Package: cviebrock/eloquent-sluggable Discovered Package: dingo/api Discovered Package: fideloper/proxy Discovered Package: genealabs/laravel-model-caching Discovered Package: igaster/laravel-theme Discovered Package: ignited/laravel-omnipay Discovered Package: intervention/image Discovered Package: jenssegers/agent Discovered Package: jgrossi/corcel Discovered Package: laravel/passport Discovered Package: laravel/scout Discovered Package: laravel/socialite Discovered Package: laravel/tinker Discovered Package: maatwebsite/excel Discovered Package: mpociot/laravel-apidoc-generator Discovered Package: nesbot/carbon Discovered Package: neobject/facebook-conversions-api Discovered Package: nunomaduro/collision Discovered Package: nuwave/lighthouse Discovered Package: nwidart/laravel-modules Discovered Package: orangehill/iseed Discovered Package: overtrue/laravel-pinyin Discovered Package: overtrue/laravel-wechat Discovered Package: s-ichikawa/laravel-sendgrid-driver Discovered Package: sentry/sentry-laravel Discovered Package: socialiteproviders/manager Discovered Package: sofa/eloquence-base Discovered Package: sofa/eloquence-mutable Discovered Package: spatie/laravel-activitylog Discovered Package: spatie/laravel-permission Discovered Package: spatie/laravel-query-builder Discovered Package: spatie/laravel-sitemap Discovered Package: tamayo/laravel-scout-elastic Discovered Package: torann/geoip Package manifest generated successfully. 116 packages you are using are looking for funding. Use the `composer fund` command to find out more! PS E:\wwwroot\object> composer show nuwave/lighthouse -i easywechat-composer/easywechat-composer contains a Composer plugin which is currently not in your allow-plugins config. See https://getcomposer.org/allow-plugins Do you trust "easywechat-composer/easywechat-composer" to execute code and wish to enable it now? (writes "allow-plugins" to composer.json) [y,n,d,?] d You are using the deprecated option "installed" . Only installed packages are shown by default now. The --all option can be used to show all packages. name : nuwave/lighthouse descrip. : Lighthouse is a schema first GraphQL package for Laravel applications. keywords : api, graphql, laravel, laravel-graphql versions : * 4.10.2 type : library license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html #licenseText homepage : https://lighthouse-php.com dist : [zip] https://api.github.com/repos/nuwave/lighthouse/zipball/e9d6c29e38b2dfee1e4c3c9b1eabff4d19029d48 e9d6c29e38b2dfee1e4c3c9b1eabff4d19029d48 path : E:\wwwroot\object\vendor\nuwave\lighthouse names : nuwave/lighthouse support source : https://github.com/nuwave/lighthouse autoload psr-4 Nuwave\Lighthouse\ => src/ requires ext-json * illuminate/contracts 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 illuminate/http 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 illuminate/pagination 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 illuminate/routing 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 illuminate/support 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 illuminate/validation 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 php >= 7.1 webonyx/graphql-php ^0.13.2 requires (dev) bensampo/laravel-enum ^1.28.3 composer/composer 1.10.0-RC as 1.9.3 ergebnis/composer-normalize ^2.2.2 haydenpierce/class-finder ^0.4.0 laravel/framework 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || ^7.0 laravel/lumen-framework 5.5.* || 5.6.* || 5.7.* || 5.8.* || ^6.0 || dev-master laravel/scout ^4.0 || ^5.0 || ^6.0 || ^7.0 mll-lab/graphql-php-scalars ^2.1 mockery/mockery ^1.0 nunomaduro/larastan ^0.4.3 || ^0.5.2 orchestra/database 3.5.* || 3.6.* || 3.7.* || 3.8.* || 3.9.* || ^4.0 || 5.x-dev orchestra/testbench 3.5.* || 3.6.* || 3.7.* || 3.8.* || 3.9.* || ^4.0 || 5.x-dev phpbench/phpbench @dev phpunit/phpunit ^6.5 || ^7.5 || ^8.4 pusher/pusher-php-server ^3.2 suggests bensampo/laravel-enum Convenient enum definitions that can easily be registered in your Schema haydenpierce/class-finder Required for the artisan command lighthouse:validate-schema laravel/scout Required for the @search directive mll-lab/graphql-php-scalars Useful scalar types, required for @whereConditions mll-lab/laravel-graphql-playground GraphQL IDE for better development workflow - integrated with Laravel PS E:\wwwroot\object> |
12、在 GitHub 上搜索 Tag:1.10,存在 v4.10.1、4.10.2,后续 4.10 可能会继续增加 Tag,以修复 Bug。如图9
近期评论