在 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//wshop//platform//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//wshop//platform//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//wshop//platform//vendor//nuwave//lighthouse//src//Execution//ReportingErrorHandler.php on line 39。

图1

{
"message": "Argument 1 passed to App//Exceptions//Handler::report() must be an instance of Exception, instance of TypeError given, called in E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//Execution//ReportingErrorHandler.php on line 39",
"exception": "Symfony//Component//Debug//Exception//FatalThrowableError",
"file": "E://wwwroot//wshop//platform//app//Exceptions//Handler.php",
"line": 40,
"trace": [
{
"file": "E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//Execution//ReportingErrorHandler.php",
"line": 39,
"function": "report",
"class": "App//Exceptions//Handler",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 153,
"function": "__invoke",
"class": "Nuwave//Lighthouse//Execution//ReportingErrorHandler",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//Execution//ExtensionErrorHandler.php",
"line": 37,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 153,
"function": "__invoke",
"class": "Nuwave//Lighthouse//Execution//ExtensionErrorHandler",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//Execution//ValidationErrorHandler.php",
"line": 34,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 153,
"function": "__invoke",
"class": "Nuwave//Lighthouse//Execution//ValidationErrorHandler",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//Execution//AuthorizationErrorHandler.php",
"line": 34,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 153,
"function": "__invoke",
"class": "Nuwave//Lighthouse//Execution//AuthorizationErrorHandler",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//Execution//AuthenticationErrorHandler.php",
"line": 34,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 153,
"function": "__invoke",
"class": "Nuwave//Lighthouse//Execution//AuthenticationErrorHandler",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 105,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//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//wshop//platform//vendor//laravel//framework//src//Illuminate//Support//Collection.php",
"line": 638,
"function": "array_map"
},
{
"file": "E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//GraphQL.php",
"line": 296,
"function": "map",
"class": "Illuminate//Support//Collection",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//webonyx//graphql-php//src//Executor//ExecutionResult.php",
"line": 147,
"function": "Nuwave//Lighthouse//{closure}",
"class": "Nuwave//Lighthouse//GraphQL",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//GraphQL.php",
"line": 264,
"function": "toArray",
"class": "GraphQL//Executor//ExecutionResult",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//GraphQL.php",
"line": 168,
"function": "serializable",
"class": "Nuwave//Lighthouse//GraphQL",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//GraphQL.php",
"line": 119,
"function": "executeOperation",
"class": "Nuwave//Lighthouse//GraphQL",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//Support//Utils.php",
"line": 99,
"function": "Nuwave//Lighthouse//{closure}",
"class": "Nuwave//Lighthouse//GraphQL",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//GraphQL.php",
"line": 118,
"function": "applyEach",
"class": "Nuwave//Lighthouse//Support//Utils",
"type": "::"
},
{
"file": "E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//Support//Http//Controllers//GraphQLController.php",
"line": 32,
"function": "executeOperationOrOperations",
"class": "Nuwave//Lighthouse//GraphQL",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Routing//ControllerDispatcher.php",
"line": 48,
"function": "__invoke",
"class": "Nuwave//Lighthouse//Support//Http//Controllers//GraphQLController",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Routing//Route.php",
"line": 219,
"function": "dispatch",
"class": "Illuminate//Routing//ControllerDispatcher",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Routing//Route.php",
"line": 176,
"function": "runController",
"class": "Illuminate//Routing//Route",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Routing//Router.php",
"line": 681,
"function": "run",
"class": "Illuminate//Routing//Route",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 130,
"function": "Illuminate//Routing//{closure}",
"class": "Illuminate//Routing//Router",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//Support//Http//Middleware//AttemptAuthentication.php",
"line": 34,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 171,
"function": "handle",
"class": "Nuwave//Lighthouse//Support//Http//Middleware//AttemptAuthentication",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//nuwave//lighthouse//src//Support//Http//Middleware//AcceptJson.php",
"line": 27,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 171,
"function": "handle",
"class": "Nuwave//Lighthouse//Support//Http//Middleware//AcceptJson",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 105,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Routing//Router.php",
"line": 683,
"function": "then",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Routing//Router.php",
"line": 658,
"function": "runRouteWithinStack",
"class": "Illuminate//Routing//Router",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Routing//Router.php",
"line": 624,
"function": "runRoute",
"class": "Illuminate//Routing//Router",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Routing//Router.php",
"line": 613,
"function": "dispatchToRoute",
"class": "Illuminate//Routing//Router",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Foundation//Http//Kernel.php",
"line": 170,
"function": "dispatch",
"class": "Illuminate//Routing//Router",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 130,
"function": "Illuminate//Foundation//Http//{closure}",
"class": "Illuminate//Foundation//Http//Kernel",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//barryvdh//laravel-debugbar//src//Middleware//InjectDebugbar.php",
"line": 67,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 171,
"function": "handle",
"class": "Barryvdh//Debugbar//Middleware//InjectDebugbar",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Foundation//Http//Middleware//TransformsRequest.php",
"line": 21,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 171,
"function": "handle",
"class": "Illuminate//Foundation//Http//Middleware//TransformsRequest",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Foundation//Http//Middleware//TransformsRequest.php",
"line": 21,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 171,
"function": "handle",
"class": "Illuminate//Foundation//Http//Middleware//TransformsRequest",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Foundation//Http//Middleware//ValidatePostSize.php",
"line": 27,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 171,
"function": "handle",
"class": "Illuminate//Foundation//Http//Middleware//ValidatePostSize",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Foundation//Http//Middleware//CheckForMaintenanceMode.php",
"line": 63,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 171,
"function": "handle",
"class": "Illuminate//Foundation//Http//Middleware//CheckForMaintenanceMode",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//fideloper//proxy//src//TrustProxies.php",
"line": 57,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 171,
"function": "handle",
"class": "Fideloper//Proxy//TrustProxies",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//dingo//api//src//Http//Middleware//Request.php",
"line": 111,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 171,
"function": "handle",
"class": "Dingo//Api//Http//Middleware//Request",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Pipeline//Pipeline.php",
"line": 105,
"function": "Illuminate//Pipeline//{closure}",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Foundation//Http//Kernel.php",
"line": 145,
"function": "then",
"class": "Illuminate//Pipeline//Pipeline",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Foundation//Http//Kernel.php",
"line": 110,
"function": "sendRequestThroughRouter",
"class": "Illuminate//Foundation//Http//Kernel",
"type": "->"
},
{
"file": "E://wwwroot//wshop//platform//public//index.php",
"line": 57,
"function": "handle",
"class": "Illuminate//Foundation//Http//Kernel",
"type": "->"
}
]
}

2、查看代码:/app/Exceptions/Handler.php:40 。如图2

查看代码:/app/Exceptions/Handler.php:40

图2

/**
* 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

查看代码:/vendor/nuwave/lighthouse/src/Execution/ReportingErrorHandler.php:39 。在 38 行有注释: @phpstan-ignore-next-line Laravel 7 之前的版本仅限于接受 /Exception

图3

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。

PS E:/wwwroot/wshop/platform> php artisan
Laravel Framework 6.20.40
Usage:
command [options] [arguments]
PS E:/wwwroot/wshop/platform> 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/wshop/platform/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

打开网址:https://github.com/nuwave/lighthouse/blob/v5.1.0/src/Execution/ReportingErrorHandler.php ,可以确定此问题从版本:v5.1.0 开始不再支持 Laravel 6 的。决定回退至此版本的上一版本:v5.0.2

图4

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

执行 composer remove nuwave/lighthouse 命令,卸载 nuwave/lighthouse

图5

PS E:/wwwroot/wshop/platform> 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/wshop/platform/tests/Feature/ApiCartPaymentTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Tests/Feature/LoginApiPostCartTest located in E:/wwwroot/wshop/platform/tests/Feature/ApiCartTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Tests/Feature/LoginGetPaymentTest located in E:/wwwroot/wshop/platform/tests/Feature/PaymentTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Sofa/Eloquence/Searchable/Searchable located in E:/wwwroot/wshop/platform/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/wshop/platform/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/wshop/platform/Modules/PixelConversion/Database/Seeders/PixelConversionDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping.
Class Modules/ThemeStore/Tests/FactoryTest located in E:/wwwroot/wshop/platform/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: newshop/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

执行 composer require nuwave/lighthouse:5.0.2 命令,安装 nuwave/lighthouse。指定包的确切版本

图6

PS E:/wwwroot/wshop/platform> 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/wshop/platform/tests/Feature/ApiCartPaymentTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Tests/Feature/LoginApiPostCartTest located in E:/wwwroot/wshop/platform/tests/Feature/ApiCartTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Tests/Feature/LoginGetPaymentTest located in E:/wwwroot/wshop/platform/tests/Feature/PaymentTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Sofa/Eloquence/Searchable/Searchable located in E:/wwwroot/wshop/platform/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/wshop/platform/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/wshop/platform/Modules/PixelConversion/Database/Seeders/PixelConversionDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping.
Class Modules/ThemeStore/Tests/FactoryTest located in E:/wwwroot/wshop/platform/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: newshop/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/wshop/platform> 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/wshop/platform/vendor/nuwave/lighthouse
names    : nuwave/lighthouse
support
issues : https://github.com/nuwave/lighthouse/issues
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/wshop/platform>

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//wshop//platform//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//wshop//platform//vendor//nuwave//lighthouse//src//Execution//ReportingErrorHandler.php on line 25 。

<?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

提示:Return value of Modules//ThemeSetting//Bridge//IgasterLaravelTheme//FileRawSectionSchemaLoader::load() must be of the type array, bool returned 。符合预期。至少在程序出现异常的时候,能够明确定位到具体的异常情况。

图7

{
"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//wshop//platform//Modules//ThemeSetting//Schema//Builder//ThemeBuilder.php",
"line": 86,
"call": "Modules//ThemeSetting//Bridge//IgasterLaravelTheme//FileRawSectionSchemaLoader::load('header')"
},
{
"file": "E://wwwroot//wshop//platform//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//wshop//platform//Modules//ThemeStore//Resolver//OnlineStoreThemeResolver.php",
"line": 39,
"call": "Modules//ThemeSetting//Bridge//IgasterLaravelTheme//FileThemeSchemaLoader::loadSchema()"
},
{
"file": "E://wwwroot//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//vendor//webonyx//graphql-php//src//Executor//Executor.php",
"line": 155,
"call": "GraphQL//Executor//ReferenceExecutor::doExecute()"
},
{
"file": "E://wwwroot//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//vendor//laravel//framework//src//Illuminate//Routing//ControllerDispatcher.php",
"line": 45,
"call": "Illuminate//Routing//Controller::callAction('query', array(1))"
},
{
"file": "E://wwwroot//wshop//platform//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//wshop//platform//vendor//laravel//framework//src//Illuminate//Routing//Route.php",
"line": 176,
"call": "Illuminate//Routing//Route::runController()"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Routing//Router.php",
"line": 681,
"call": "Illuminate//Routing//Route::run()"
},
{
"file": "E://wwwroot//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//vendor//laravel//framework//src//Illuminate//Routing//Router.php",
"line": 683,
"call": "Illuminate//Pipeline//Pipeline::then(instance of Closure)"
},
{
"file": "E://wwwroot//wshop//platform//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//wshop//platform//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//wshop//platform//vendor//laravel//framework//src//Illuminate//Routing//Router.php",
"line": 613,
"call": "Illuminate//Routing//Router::dispatchToRoute(instance of Illuminate//Http//Request)"
},
{
"file": "E://wwwroot//wshop//platform//vendor//laravel//framework//src//Illuminate//Foundation//Http//Kernel.php",
"line": 170,
"call": "Illuminate//Routing//Router::dispatch(instance of Illuminate//Http//Request)"
},
{
"file": "E://wwwroot//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//vendor//fideloper//proxy//src//TrustProxies.php",
"line": 57,
"call": "Illuminate//Pipeline//Pipeline::Illuminate//Pipeline//{closure}(instance of Illuminate//Http//Request)"
},
{
"file": "E://wwwroot//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//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//wshop//platform//vendor//laravel//framework//src//Illuminate//Foundation//Http//Kernel.php",
"line": 145,
"call": "Illuminate//Pipeline//Pipeline::then(instance of Closure)"
},
{
"file": "E://wwwroot//wshop//platform//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//wshop//platform//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

nuwave/lighthouse 的版本:4.10.2

图8

PS E:/wwwroot/wshop/platform> 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/wshop/platform/tests/Feature/ApiCartPaymentTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Tests/Feature/LoginApiPostCartTest located in E:/wwwroot/wshop/platform/tests/Feature/ApiCartTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Tests/Feature/LoginGetPaymentTest located in E:/wwwroot/wshop/platform/tests/Feature/PaymentTest.php does not comply with psr-4 autoloading standard. Skipping.
Class Sofa/Eloquence/Searchable/Searchable located in E:/wwwroot/wshop/platform/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/wshop/platform/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/wshop/platform/Modules/PixelConversion/Database/Seeders/PixelConversionDatabaseSeeder.php does not comply with psr-4 autoloading standard. Skipping.
Class Modules/ThemeStore/Tests/FactoryTest located in E:/wwwroot/wshop/platform/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: newshop/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/wshop/platform> 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
source   : [git] https://github.com/nuwave/lighthouse.git e9d6c29e38b2dfee1e4c3c9b1eabff4d19029d48
dist     : [zip] https://api.github.com/repos/nuwave/lighthouse/zipball/e9d6c29e38b2dfee1e4c3c9b1eabff4d19029d48 e9d6c29e38b2dfee1e4c3c9b1eabff4d19029d48
path     : E:/wwwroot/wshop/platform/vendor/nuwave/lighthouse
names    : nuwave/lighthouse
support
issues : https://github.com/nuwave/lighthouse/issues
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/wshop/platform>

12、在 GitHub 上搜索 Tag:1.10,存在 v4.10.1、4.10.2,后续 4.10 可能会继续增加 Tag,以修复 Bug。如图9

在 GitHub 上搜索 Tag:1.10,存在 v4.10.1、4.10.2,后续 4.10 可能会继续增加 Tag,以修复 Bug

图9

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/250705.html

(0)
上一篇 2022年5月1日
下一篇 2022年5月1日

相关推荐

发表回复

登录后才能评论