Skip to content

[Bug]: FatalError: Cannot redeclare class Illuminate\Database\Eloquent\Casts\ArrayObject since v0.13.4 #1096

@xDemonME

Description

@xDemonME

What happened?

Description

After updating to dedoc/scramble v0.13.4 or later, running scramble:export or accessing the documentation page results in a PHP Fatal Error. The issue seems to be related to the type inference engine trying to redeclare a core Laravel class.

Everything works perfectly on v0.13.3 or earlier.

Error Message

PHP Fatal error: Cannot redeclare class Illuminate\Database\Eloquent\Casts\ArrayObject (previously declared in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/ArrayObject.php:16) in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/ArrayObject.php on line 16

Analysis / Stack Trace

The issue occurs during the analysis of routes that return resources involving Eloquent casts or ArrayObject. Based on the stack trace, it happens in FileNameResolver when resolving FQN from PHPDoc:

  1. Dedoc\Scramble\Infer\Services\FileNameResolver->__invoke('\\ArrayObject')
  2. This triggers a class_exists check on an incorrectly resolved name like Illuminate\Database\Eloquent\Casts\\ArrayObject.
  3. Composer's autoloader then attempts to include the file again, leading to the "Cannot redeclare class" error.

Relevant part of the trace:

PHP 71. class_exists($class = 'Illuminate\\Database\\Eloquent\\Casts\\\\ArrayObject') /var/www/html/vendor/dedoc/scramble/src/Infer/Services/FileNameResolver.php:58
PHP 72. Composer\Autoload\ClassLoader->loadClass($class = 'Illuminate\\Database\\Eloquent\\Casts\\\\ArrayObject')
PHP 74. include() /var/www/html/vendor/composer/ClassLoader.php:576

How to reproduce the bug

  1. Install dedoc/scramble v0.13.4 or later
  2. Have a route that uses a JsonResource involving Illuminate\Database\Eloquent\Casts\ArrayObject (e.g. a model with an as_arrayobject cast).
  3. Run php artisan scramble:export or visit /docs/api.

Package Version

0.13.4

PHP Version

8.4.12

Laravel Version

12.51.0

Which operating systems does with happen with?

Linux

Notes

composer run-script generate-api
> vendor/bin/sail artisan scramble:export --api=dashboard
Xdebug: [Step Debug] Could not connect to debugging client. Tried: host.docker.internal:9003 (through xdebug.client_host/xdebug.client_port).
PHP Fatal error:  Cannot redeclare class Illuminate\Database\Eloquent\Casts\ArrayObject (previously declared in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/ArrayObject.php:16) in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/ArrayObject.php on line 16
PHP Stack trace:
...
PHP  30. Dedoc\Scramble\Support\Generator\TypeTransformer->handleResponseUsingExtensions($type = class Dedoc\Scramble\Support\Type\Generic { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = []; public string $name = 'App\\Support\\Http\\Resources\\PaginatedResourceCollection'; public array $templateTypes = [0 => class Dedoc\Scramble\Support\Type\ObjectType { ... }] }) /var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php:339
PHP  31. App\Scramble\Extensions\PaginatedResourceCollectionTypeToSchema->toResponse($type = class Dedoc\Scramble\Support\Type\Generic { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = []; public string $name = 'App\\Support\\Http\\Resources\\PaginatedResourceCollection'; public array $templateTypes = [0 => class Dedoc\Scramble\Support\Type\ObjectType { ... }] }) /var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php:392
PHP  32. Dedoc\Scramble\Support\Generator\TypeTransformer->transform($type = class Dedoc\Scramble\Support\Type\Generic { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = []; public string $name = 'App\\Support\\Http\\Resources\\PaginatedResourceCollection'; public array $templateTypes = [0 => class Dedoc\Scramble\Support\Type\ObjectType { ... }] }) /var/www/html/app/Scramble/Extensions/PaginatedResourceCollectionTypeToSchema.php:90
PHP  33. Dedoc\Scramble\Support\Generator\TypeTransformer->handleUsingExtensions($type = class Dedoc\Scramble\Support\Type\Generic { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = []; public string $name = 'App\\Support\\Http\\Resources\\PaginatedResourceCollection'; public array $templateTypes = [0 => class Dedoc\Scramble\Support\Type\ObjectType { ... }] }) /var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php:269
PHP  34. App\Scramble\Extensions\PaginatedResourceCollectionTypeToSchema->toSchema($type = class Dedoc\Scramble\Support\Type\Generic { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = []; public string $name = 'App\\Support\\Http\\Resources\\PaginatedResourceCollection'; public array $templateTypes = [0 => class Dedoc\Scramble\Support\Type\ObjectType { ... }] }) /var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php:314
PHP  35. Dedoc\Scramble\Support\Generator\TypeTransformer->transform($type = class Dedoc\Scramble\Support\Type\ObjectType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = []; public string $name = 'Modules\\DashboardApi\\Http\\Resources\\PaymentResource' }) /var/www/html/app/Scramble/Extensions/PaginatedResourceCollectionTypeToSchema.php:43
PHP  36. Dedoc\Scramble\Support\Generator\TypeTransformer->handleUsingExtensions($type = class Dedoc\Scramble\Support\Type\ObjectType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = []; public string $name = 'Modules\\DashboardApi\\Http\\Resources\\PaymentResource' }) /var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php:269
PHP  37. Dedoc\Scramble\Support\TypeToSchemaExtensions\JsonResourceTypeToSchema->toSchema($type = class Dedoc\Scramble\Support\Type\ObjectType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = []; public string $name = 'Modules\\DashboardApi\\Http\\Resources\\PaymentResource' }) /var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php:314
PHP  38. Dedoc\Scramble\Support\Generator\TypeTransformer->transform($type = class Dedoc\Scramble\Support\Type\KeyedArrayType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = ['file' => 'Modules\\DashboardApi\\Http\\Resources\\PaymentResource', 'line' => 27]; public bool $isList = FALSE; public array $items = [0 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { ... }, 1 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { ... }, 2 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { ... }, 3 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { ... }, 4 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { ... }, 5 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { ... }, 6 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { ... }, 7 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { ... }, 8 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { ... }, 9 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { ... }, 10 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { ... }, 11 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { ... }, 12 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { ... }] }) /var/www/html/vendor/dedoc/scramble/src/Support/TypeToSchemaExtensions/JsonResourceTypeToSchema.php:72
PHP  39. Illuminate\Support\Collection->mapWithKeys($callback = class Closure { public $name = '{closure:Dedoc\\Scramble\\Support\\Generator\\TypeTransformer::transform():108}'; public $file = '/var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php'; public $line = 108; public $static = ['requiredKeys' => [...]]; public $this = class Dedoc\Scramble\Support\Generator\TypeTransformer { private array $typeToSchemaExtensions = [...]; private array $exceptionToResponseExtensions = [...]; private Dedoc\Scramble\Infer $infer = class Dedoc\Scramble\Infer { ... }; public readonly Dedoc\Scramble\OpenApiContext $context = class Dedoc\Scramble\OpenApiContext { ... } }; public $parameter = ['$item' => '<required>'] }) /var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php:108
PHP  40. Illuminate\Support\Arr::mapWithKeys($array = [0 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public $key = 'id'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\StringType { ... }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { ... } }, 1 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public $key = 'status'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\ObjectType { ... }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { ... } }, 2 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public $key = 'amount'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\FloatType { ... }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { ... } }, 3 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public $key = 'formattedAmount'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\StringType { ... }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { ... } }, 4 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public $key = 'currency'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\ObjectType { ... }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { ... } }, 5 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public $key = 'description'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\Union { ... }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { ... } }, 6 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public $key = 'externalId'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\Union { ... }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { ... } }, 7 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public $key = 'customer'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\Union { ... }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { ... } }, 8 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public $key = 'products'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\Union { ... }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { ... } }, 9 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public $key = 'metadata'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\Union { ... }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { ... } }, 10 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public $key = 'isInitialPayment'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\BooleanType { ... }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { ... } }, 11 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public $key = 'paymentPageUrl'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\Union { ... }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { ... } }, 12 => class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public $key = 'settings'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\Union { ... }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { ... } }], $callback = class Closure { public $name = '{closure:Dedoc\\Scramble\\Support\\Generator\\TypeTransformer::transform():108}'; public $file = '/var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php'; public $line = 108; public $static = ['requiredKeys' => [...]]; public $this = class Dedoc\Scramble\Support\Generator\TypeTransformer { private array $typeToSchemaExtensions = [...]; private array $exceptionToResponseExtensions = [...]; private Dedoc\Scramble\Infer $infer = class Dedoc\Scramble\Infer { ... }; public readonly Dedoc\Scramble\OpenApiContext $context = class Dedoc\Scramble\OpenApiContext { ... } }; public $parameter = ['$item' => '<required>'] }) /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Collection.php:877
PHP  41. Dedoc\Scramble\Support\Generator\TypeTransformer->{closure:/var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php:108-116}($item = class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = []; public $key = 'metadata'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\Union { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public array $types = [...] }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public string $value = 'metadata' } }, 9) /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Arr.php:867
PHP  42. Dedoc\Scramble\Support\Generator\TypeTransformer->transform($type = class Dedoc\Scramble\Support\Type\ArrayItemType_ { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = []; public $key = 'metadata'; public Dedoc\Scramble\Support\Type\Type $value = class Dedoc\Scramble\Support\Type\Union { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public array $types = [...] }; public bool $isOptional = FALSE; public bool $shouldUnpack = FALSE; public ?Dedoc\Scramble\Support\Type\Type $keyType = class Dedoc\Scramble\Support\Type\Literal\LiteralStringType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public string $value = 'metadata' } }) /var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php:114
PHP  43. Dedoc\Scramble\Support\Generator\TypeTransformer->transform($type = class Dedoc\Scramble\Support\Type\Union { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = []; public array $types = [0 => class Dedoc\Scramble\Support\Type\NullType { ... }, 1 => class Dedoc\Scramble\Support\Type\ObjectType { ... }] }) /var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php:133
PHP  44. Dedoc\Scramble\Support\Generator\TypeTransformer->transform($type = class Dedoc\Scramble\Support\Type\ObjectType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = []; public string $name = 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject' }) /var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php:190
PHP  45. Dedoc\Scramble\Support\Generator\TypeTransformer->handleUsingExtensions($type = class Dedoc\Scramble\Support\Type\ObjectType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = []; public string $name = 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject' }) /var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php:269
PHP  46. Dedoc\Scramble\Support\TypeToSchemaExtensions\ArrayableToSchema->toSchema($type = class Dedoc\Scramble\Support\Type\ObjectType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = []; public string $name = 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject' }) /var/www/html/vendor/dedoc/scramble/src/Support/Generator/TypeTransformer.php:314
PHP  47. Dedoc\Scramble\Support\Type\ObjectType->getMethodReturnType($methodName = 'toArray', $arguments = *uninitialized*, $scope = *uninitialized*) /var/www/html/vendor/dedoc/scramble/src/Support/TypeToSchemaExtensions/ArrayableToSchema.php:46
PHP  48. Dedoc\Scramble\Support\Type\ObjectType->getMethodDefinition($methodName = 'toArray', $scope = *uninitialized*) /var/www/html/vendor/dedoc/scramble/src/Support/Type/ObjectType.php:78
PHP  49. Dedoc\Scramble\Infer\Definition\ClassDefinition->getMethodDefinition($name = 'toArray', $scope = class Dedoc\Scramble\Infer\Scope\GlobalScope { public array $variables = []; public array $calls = []; public Dedoc\Scramble\Infer\Scope\Index $index = class Dedoc\Scramble\Infer\Scope\Index { public array $classesDefinitions = [...]; public array $functionsDefinitions = [...] }; public Dedoc\Scramble\Infer\Scope\NodeTypesResolver $nodeTypesResolver = class Dedoc\Scramble\Infer\Scope\NodeTypesResolver { private $nodeTypes = [...] }; public Dedoc\Scramble\Infer\Scope\ScopeContext $context = class Dedoc\Scramble\Infer\Scope\ScopeContext { public ?Dedoc\Scramble\Infer\Definition\ClassDefinition $classDefinition = NULL; public ?Dedoc\Scramble\Infer\Definition\FunctionLikeDefinition $functionDefinition = NULL }; public Dedoc\Scramble\Infer\Services\FileNameResolver $nameResolver = class Dedoc\Scramble\Infer\Services\FileNameResolver { public readonly PhpParser\NameContext $nameContext = class PhpParser\NameContext { ... } }; public ?Dedoc\Scramble\Infer\Scope\Scope $parentScope = NULL }, $indexBuilders = *uninitialized*, $withSideEffects = *uninitialized*) /var/www/html/vendor/dedoc/scramble/src/Support/Type/ObjectType.php:57
PHP  50. Dedoc\Scramble\Infer\Definition\ClassDefinition->getFunctionLikeDefinitionBuiltFromAst($methodDefinition = class Dedoc\Scramble\Infer\Definition\FunctionLikeDefinition { public bool $isFullyAnalyzed = FALSE; public bool $referencesResolved = FALSE; private ?Dedoc\Scramble\Support\Type\Generic $selfOutType = *uninitialized*; public Dedoc\Scramble\Support\Type\FunctionType $type = class Dedoc\Scramble\Support\Type\FunctionType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public string $name = 'toArray'; public array $arguments = [...]; public Dedoc\Scramble\Support\Type\Type $returnType = class Dedoc\Scramble\Support\Type\UnknownType { ... }; public array $templates = [...]; public array $exceptions = [...] }; public array $argumentsDefaults = []; public ?string $definingClassName = 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject'; public bool $isStatic = FALSE; public ?Dedoc\Scramble\Infer\DefinitionBuilders\SelfOutTypeBuilder $selfOutTypeBuilder = NULL }, $name = 'toArray', $scope = class Dedoc\Scramble\Infer\Scope\GlobalScope { public array $variables = []; public array $calls = []; public Dedoc\Scramble\Infer\Scope\Index $index = class Dedoc\Scramble\Infer\Scope\Index { public array $classesDefinitions = [...]; public array $functionsDefinitions = [...] }; public Dedoc\Scramble\Infer\Scope\NodeTypesResolver $nodeTypesResolver = class Dedoc\Scramble\Infer\Scope\NodeTypesResolver { private $nodeTypes = [...] }; public Dedoc\Scramble\Infer\Scope\ScopeContext $context = class Dedoc\Scramble\Infer\Scope\ScopeContext { public ?Dedoc\Scramble\Infer\Definition\ClassDefinition $classDefinition = NULL; public ?Dedoc\Scramble\Infer\Definition\FunctionLikeDefinition $functionDefinition = NULL }; public Dedoc\Scramble\Infer\Services\FileNameResolver $nameResolver = class Dedoc\Scramble\Infer\Services\FileNameResolver { public readonly PhpParser\NameContext $nameContext = class PhpParser\NameContext { ... } }; public ?Dedoc\Scramble\Infer\Scope\Scope $parentScope = NULL }, $indexBuilders = [], $withSideEffects = FALSE) /var/www/html/vendor/dedoc/scramble/src/Infer/Definition/ClassDefinition.php:157
PHP  51. Dedoc\Scramble\Infer\DefinitionBuilders\FunctionLikeAstDefinitionBuilder::resolveFunctionReturnReferences($scope = class Dedoc\Scramble\Infer\Scope\Scope { public array $variables = []; public array $calls = []; public Dedoc\Scramble\Infer\Scope\Index $index = class Dedoc\Scramble\Infer\Scope\Index { public array $classesDefinitions = [...]; public array $functionsDefinitions = [...] }; public Dedoc\Scramble\Infer\Scope\NodeTypesResolver $nodeTypesResolver = class Dedoc\Scramble\Infer\Scope\NodeTypesResolver { private $nodeTypes = [...] }; public Dedoc\Scramble\Infer\Scope\ScopeContext $context = class Dedoc\Scramble\Infer\Scope\ScopeContext { public ?Dedoc\Scramble\Infer\Definition\ClassDefinition $classDefinition = class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }; public ?Dedoc\Scramble\Infer\Definition\FunctionLikeDefinition $functionDefinition = class Dedoc\Scramble\Infer\Definition\FunctionLikeDefinition { ... } }; public Dedoc\Scramble\Infer\Services\FileNameResolver $nameResolver = class Dedoc\Scramble\Infer\Services\FileNameResolver { public readonly PhpParser\NameContext $nameContext = class PhpParser\NameContext { ... } }; public ?Dedoc\Scramble\Infer\Scope\Scope $parentScope = NULL }, $functionLikeDefinition = class Dedoc\Scramble\Infer\Definition\FunctionLikeAstDefinition { public bool $isFullyAnalyzed = TRUE; public bool $referencesResolved = FALSE; private ?Dedoc\Scramble\Support\Type\Generic ${Dedoc\Scramble\Infer\Definition\FunctionLikeDefinition}selfOutType = *uninitialized*; public Dedoc\Scramble\Support\Type\FunctionType $type = class Dedoc\Scramble\Support\Type\FunctionType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public string $name = 'toArray'; public array $arguments = [...]; public Dedoc\Scramble\Support\Type\Type $returnType = class Dedoc\Scramble\Support\Type\Reference\MethodCallReferenceType { ... }; public array $templates = [...]; public array $exceptions = [...] }; public array $argumentsDefaults = []; public ?string $definingClassName = 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject'; public bool $isStatic = FALSE; public ?Dedoc\Scramble\Infer\DefinitionBuilders\SelfOutTypeBuilder $selfOutTypeBuilder = class Dedoc\Scramble\Infer\DefinitionBuilders\SelfOutTypeBuilder { private Dedoc\Scramble\Infer\Scope\Scope $scope = class Dedoc\Scramble\Infer\Scope\Scope { ... }; private PhpParser\Node\Stmt\ClassMethod $node = class PhpParser\Node\Stmt\ClassMethod { ... } }; private ?Dedoc\Scramble\Infer\Definition\FunctionLikeDefinition $declarationDefinition = class Dedoc\Scramble\Infer\Definition\FunctionLikeDefinition { public bool $isFullyAnalyzed = FALSE; public bool $referencesResolved = FALSE; private ?Dedoc\Scramble\Support\Type\Generic $selfOutType = *uninitialized*; public Dedoc\Scramble\Support\Type\FunctionType $type = class Dedoc\Scramble\Support\Type\FunctionType { ... }; public array $argumentsDefaults = [...]; public ?string $definingClassName = 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject'; public bool $isStatic = FALSE; public ?Dedoc\Scramble\Infer\DefinitionBuilders\SelfOutTypeBuilder $selfOutTypeBuilder = NULL }; private ?Dedoc\Scramble\Infer\Scope\Scope $scope = class Dedoc\Scramble\Infer\Scope\Scope { public array $variables = [...]; public array $calls = [...]; public Dedoc\Scramble\Infer\Scope\Index $index = class Dedoc\Scramble\Infer\Scope\Index { ... }; public Dedoc\Scramble\Infer\Scope\NodeTypesResolver $nodeTypesResolver = class Dedoc\Scramble\Infer\Scope\NodeTypesResolver { ... }; public Dedoc\Scramble\Infer\Scope\ScopeContext $context = class Dedoc\Scramble\Infer\Scope\ScopeContext { ... }; public Dedoc\Scramble\Infer\Services\FileNameResolver $nameResolver = class Dedoc\Scramble\Infer\Services\FileNameResolver { ... }; public ?Dedoc\Scramble\Infer\Scope\Scope $parentScope = class Dedoc\Scramble\Infer\Scope\Scope { ... } }; private ?PhpParser\Node\FunctionLike $astNode = class PhpParser\Node\Stmt\ClassMethod { protected array $attributes = [...]; public int $flags = 1; public bool $byRef = FALSE; public PhpParser\Node\Identifier $name = class PhpParser\Node\Identifier { ... }; public array $params = [...]; public ?PhpParser\Node $returnType = NULL; public ?array $stmts = [...]; public array $attrGroups = [...] }; private ?Dedoc\Scramble\Infer\Flow\Nodes $flowContainer = NULL }) /var/www/html/vendor/dedoc/scramble/src/Infer/Definition/ClassDefinition.php:298
PHP  52. Dedoc\Scramble\Infer\Services\ReferenceTypeResolver->resolve($scope = class Dedoc\Scramble\Infer\Scope\Scope { public array $variables = []; public array $calls = []; public Dedoc\Scramble\Infer\Scope\Index $index = class Dedoc\Scramble\Infer\Scope\Index { public array $classesDefinitions = [...]; public array $functionsDefinitions = [...] }; public Dedoc\Scramble\Infer\Scope\NodeTypesResolver $nodeTypesResolver = class Dedoc\Scramble\Infer\Scope\NodeTypesResolver { private $nodeTypes = [...] }; public Dedoc\Scramble\Infer\Scope\ScopeContext $context = class Dedoc\Scramble\Infer\Scope\ScopeContext { public ?Dedoc\Scramble\Infer\Definition\ClassDefinition $classDefinition = class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }; public ?Dedoc\Scramble\Infer\Definition\FunctionLikeDefinition $functionDefinition = class Dedoc\Scramble\Infer\Definition\FunctionLikeDefinition { ... } }; public Dedoc\Scramble\Infer\Services\FileNameResolver $nameResolver = class Dedoc\Scramble\Infer\Services\FileNameResolver { public readonly PhpParser\NameContext $nameContext = class PhpParser\NameContext { ... } }; public ?Dedoc\Scramble\Infer\Scope\Scope $parentScope = NULL }, $type = class Dedoc\Scramble\Support\Type\Reference\MethodCallReferenceType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = ['file' => 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject', 'line' => 35]; public Dedoc\Scramble\Support\Type\Type $callee = class Dedoc\Scramble\Support\Type\SelfType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public string $name = 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject' }; public string $methodName = 'getArrayCopy'; public array $arguments = [] }) /var/www/html/vendor/dedoc/scramble/src/Infer/DefinitionBuilders/FunctionLikeAstDefinitionBuilder.php:364
PHP  53. Dedoc\Scramble\Infer\Services\RecursionGuard::run($obj = class Dedoc\Scramble\Support\Type\Reference\MethodCallReferenceType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = ['file' => 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject', 'line' => 35]; public Dedoc\Scramble\Support\Type\Type $callee = class Dedoc\Scramble\Support\Type\SelfType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public string $name = 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject' }; public string $methodName = 'getArrayCopy'; public array $arguments = [] }, $callback = class Closure { public $name = '{closure:Dedoc\\Scramble\\Infer\\Services\\ReferenceTypeResolver::resolve():57}'; public $file = '/var/www/html/vendor/dedoc/scramble/src/Infer/Services/ReferenceTypeResolver.php'; public $line = 57; public $static = ['type' => class Dedoc\Scramble\Support\Type\Reference\MethodCallReferenceType { ... }, 'scope' => class Dedoc\Scramble\Infer\Scope\Scope { ... }]; public $this = class Dedoc\Scramble\Infer\Services\ReferenceTypeResolver { private Dedoc\Scramble\Infer\Scope\Index $index = class Dedoc\Scramble\Infer\Scope\Index { ... } } }, $onInfiniteRecursion = class Closure { public $name = '{closure:Dedoc\\Scramble\\Infer\\Services\\ReferenceTypeResolver::resolve():58}'; public $file = '/var/www/html/vendor/dedoc/scramble/src/Infer/Services/ReferenceTypeResolver.php'; public $line = 58; public $this = class Dedoc\Scramble\Infer\Services\ReferenceTypeResolver { private Dedoc\Scramble\Infer\Scope\Index $index = class Dedoc\Scramble\Infer\Scope\Index { ... } } }) /var/www/html/vendor/dedoc/scramble/src/Infer/Services/ReferenceTypeResolver.php:55
PHP  54. Dedoc\Scramble\Infer\Services\ReferenceTypeResolver->{closure:/var/www/html/vendor/dedoc/scramble/src/Infer/Services/ReferenceTypeResolver.php:57-57}() /var/www/html/vendor/dedoc/scramble/src/Infer/Services/RecursionGuard.php:35
PHP  55. Dedoc\Scramble\Support\Type\TypeWalker->map($subject = class Dedoc\Scramble\Support\Type\Reference\MethodCallReferenceType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = ['file' => 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject', 'line' => 35]; public Dedoc\Scramble\Support\Type\Type $callee = class Dedoc\Scramble\Support\Type\SelfType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public string $name = 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject' }; public string $methodName = 'getArrayCopy'; public array $arguments = [] }, $cb = class Closure { public $name = '{closure:{closure:Dedoc\\Scramble\\Infer\\Services\\ReferenceTypeResolver::resolve():57}:57}'; public $file = '/var/www/html/vendor/dedoc/scramble/src/Infer/Services/ReferenceTypeResolver.php'; public $line = 57; public $static = ['type' => class Dedoc\Scramble\Support\Type\Reference\MethodCallReferenceType { ... }, 'scope' => class Dedoc\Scramble\Infer\Scope\Scope { ... }]; public $this = class Dedoc\Scramble\Infer\Services\ReferenceTypeResolver { private Dedoc\Scramble\Infer\Scope\Index $index = class Dedoc\Scramble\Infer\Scope\Index { ... } }; public $parameter = ['$t' => '<required>'] }, $nodesNamesGetter = *uninitialized*, $preserveAttributes = *uninitialized*) /var/www/html/vendor/dedoc/scramble/src/Infer/Services/ReferenceTypeResolver.php:57
PHP  56. Dedoc\Scramble\Infer\Services\ReferenceTypeResolver->{closure:/var/www/html/vendor/dedoc/scramble/src/Infer/Services/ReferenceTypeResolver.php:57-57}($t = class Dedoc\Scramble\Support\Type\Reference\MethodCallReferenceType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = ['file' => 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject', 'line' => 35]; public Dedoc\Scramble\Support\Type\Type $callee = class Dedoc\Scramble\Support\Type\SelfType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public string $name = 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject' }; public string $methodName = 'getArrayCopy'; public array $arguments = [] }) /var/www/html/vendor/dedoc/scramble/src/Support/Type/TypeWalker.php:118
PHP  57. Dedoc\Scramble\Infer\Services\ReferenceTypeResolver->doResolve($t = class Dedoc\Scramble\Support\Type\Reference\MethodCallReferenceType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = ['file' => 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject', 'line' => 35]; public Dedoc\Scramble\Support\Type\Type $callee = class Dedoc\Scramble\Support\Type\SelfType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public string $name = 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject' }; public string $methodName = 'getArrayCopy'; public array $arguments = [] }, $type = class Dedoc\Scramble\Support\Type\Reference\MethodCallReferenceType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = ['file' => 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject', 'line' => 35]; public Dedoc\Scramble\Support\Type\Type $callee = class Dedoc\Scramble\Support\Type\SelfType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public string $name = 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject' }; public string $methodName = 'getArrayCopy'; public array $arguments = [] }, $scope = class Dedoc\Scramble\Infer\Scope\Scope { public array $variables = []; public array $calls = []; public Dedoc\Scramble\Infer\Scope\Index $index = class Dedoc\Scramble\Infer\Scope\Index { public array $classesDefinitions = [...]; public array $functionsDefinitions = [...] }; public Dedoc\Scramble\Infer\Scope\NodeTypesResolver $nodeTypesResolver = class Dedoc\Scramble\Infer\Scope\NodeTypesResolver { private $nodeTypes = [...] }; public Dedoc\Scramble\Infer\Scope\ScopeContext $context = class Dedoc\Scramble\Infer\Scope\ScopeContext { public ?Dedoc\Scramble\Infer\Definition\ClassDefinition $classDefinition = class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }; public ?Dedoc\Scramble\Infer\Definition\FunctionLikeDefinition $functionDefinition = class Dedoc\Scramble\Infer\Definition\FunctionLikeDefinition { ... } }; public Dedoc\Scramble\Infer\Services\FileNameResolver $nameResolver = class Dedoc\Scramble\Infer\Services\FileNameResolver { public readonly PhpParser\NameContext $nameContext = class PhpParser\NameContext { ... } }; public ?Dedoc\Scramble\Infer\Scope\Scope $parentScope = NULL }) /var/www/html/vendor/dedoc/scramble/src/Infer/Services/ReferenceTypeResolver.php:57
PHP  58. Dedoc\Scramble\Infer\Services\ReferenceTypeResolver->resolveMethodCallReferenceType($scope = class Dedoc\Scramble\Infer\Scope\Scope { public array $variables = []; public array $calls = []; public Dedoc\Scramble\Infer\Scope\Index $index = class Dedoc\Scramble\Infer\Scope\Index { public array $classesDefinitions = [...]; public array $functionsDefinitions = [...] }; public Dedoc\Scramble\Infer\Scope\NodeTypesResolver $nodeTypesResolver = class Dedoc\Scramble\Infer\Scope\NodeTypesResolver { private $nodeTypes = [...] }; public Dedoc\Scramble\Infer\Scope\ScopeContext $context = class Dedoc\Scramble\Infer\Scope\ScopeContext { public ?Dedoc\Scramble\Infer\Definition\ClassDefinition $classDefinition = class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }; public ?Dedoc\Scramble\Infer\Definition\FunctionLikeDefinition $functionDefinition = class Dedoc\Scramble\Infer\Definition\FunctionLikeDefinition { ... } }; public Dedoc\Scramble\Infer\Services\FileNameResolver $nameResolver = class Dedoc\Scramble\Infer\Services\FileNameResolver { public readonly PhpParser\NameContext $nameContext = class PhpParser\NameContext { ... } }; public ?Dedoc\Scramble\Infer\Scope\Scope $parentScope = NULL }, $type = class Dedoc\Scramble\Support\Type\Reference\MethodCallReferenceType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = ['file' => 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject', 'line' => 35]; public Dedoc\Scramble\Support\Type\Type $callee = class Dedoc\Scramble\Support\Type\SelfType { public ?Dedoc\Scramble\Support\Type\Type $original = NULL; private ${Dedoc\Scramble\Support\Type\AbstractType}attributes = [...]; public string $name = 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject' }; public string $methodName = 'getArrayCopy'; public array $arguments = [] }) /var/www/html/vendor/dedoc/scramble/src/Infer/Services/ReferenceTypeResolver.php:69
PHP  59. Dedoc\Scramble\Infer\Definition\ClassDefinition->getMethodDefiningClassName($name = 'getArrayCopy', $index = class Dedoc\Scramble\Infer\Scope\Index { public array $classesDefinitions = ['Exception' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'RuntimeException' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Symfony\\Component\\HttpKernel\\Exception\\HttpException' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Laravel\\Sanctum\\Http\\Controllers\\CsrfCookieController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Illuminate\\Routing\\Controller' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\RegisteredUserController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\Auth\\RegisterController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Illuminate\\Validation\\Rule' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\AuthenticatedSessionController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\Auth\\AuthController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Symfony\\Component\\HttpFoundation\\Request' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Illuminate\\Http\\Request' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Illuminate\\Foundation\\Http\\FormRequest' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Requests\\LoginRequest' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\PasswordResetLinkController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\Auth\\PasswordResetLinkController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Requests\\SendPasswordResetLinkRequest' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\NewPasswordController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\Auth\\NewPasswordController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\VerifyEmailController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\Auth\\VerifyEmailController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Requests\\VerifyEmailRequest' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\EmailVerificationNotificationController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\Auth\\EmailVerificationNotificationController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\ProfileInformationController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\User\\ProfileInformationController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\PasswordController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\User\\PasswordController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\ConfirmedPasswordStatusController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\User\\ConfirmedPasswordStatusController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\ConfirmablePasswordController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\User\\ConfirmablePasswordController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\TwoFactorAuthenticatedSessionController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\Auth\\TwoFactorAuthenticatedSessionController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\TwoFactorAuthenticationController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\User\\TwoFactorAuthenticationController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\ConfirmedTwoFactorAuthenticationController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\User\\ConfirmedTwoFactorAuthenticationController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\TwoFactorQrCodeController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\User\\TwoFactorQrCodeController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\TwoFactorSecretKeyController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\User\\TwoFactorSecretKeyController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Laravel\\Fortify\\Http\\Controllers\\RecoveryCodeController' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\User\\RecoveryCodeController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Illuminate\\Database\\Eloquent\\Model' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Illuminate\\Foundation\\Auth\\User' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'App\\Models\\User' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\AppController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Illuminate\\Contracts\\Routing\\ResponseFactory' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Illuminate\\Http\\Resources\\Json\\JsonResource' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Resources\\UserResource' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'App\\Contracts\\UserServiceInterface' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Resources\\Project\\ProjectResource' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\Projects\\Contracts\\ProjectServiceInterface' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Spatie\\LaravelData\\Data' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'App\\UserData' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Illuminate\\Http\\Resources\\Json\\ResourceCollection' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Illuminate\\Http\\Resources\\Json\\AnonymousResourceCollection' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\Projects\\Data\\ProjectData' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\CurrencyController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Resources\\CurrencyResource' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\Finance\\Contracts\\CurrencyServiceInterface' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\ProjectController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Resources\\Project\\ProjectDetailResource' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Requests\\Projects\\ProjectRequest' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Resources\\Project\\ProjectSettingsResource' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\Projects\\Data\\ProjectSettingsData' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\ApiKeyController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Resources\\ApiKey\\ApiKeyResource' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Spatie\\QueryBuilder\\QueryBuilder' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Illuminate\\Database\\Eloquent\\Builder' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Illuminate\\Database\\Concerns\\BuildsQueries' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Illuminate\\Database\\Query\\Builder' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Modules\\ApiAuth\\Contracts\\ApiKeyServiceInterface' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Requests\\ApiKeys\\ApiKeyCreateRequest' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Requests\\ApiKeys\\ApiKeyUpdateRequest' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\ProjectPaymentProviderController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Resources\\ProjectPaymentProvider\\ProjectPaymentProviderResource' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\PaymentIntegrations\\Core\\Contracts\\ProjectPaymentProviderServiceInterface' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Resources\\ProjectPaymentProvider\\ProjectPaymentProviderDetailResource' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Requests\\ProjectPaymentProvider\\ProjectPaymentProviderUpdateRequest' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Requests\\ProjectPaymentProvider\\ProjectPaymentProviderCreateRequest' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\WebhookEndpointController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Resources\\Webhook\\WebhookResource' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\Webhooks\\Contracts\\WebhookEndpointServiceInterface' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Resources\\Webhook\\WebhookDetailedResource' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Requests\\Webhooks\\WebhookCreateUpdateRequest' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\CustomerController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'App\\Support\\Http\\Resources\\PaginatedResourceCollection' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Resources\\CustomerResource' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\Customers\\Contracts\\CustomerServiceInterface' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Requests\\Customer\\CustomerCreateRequest' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Controllers\\PaymentController' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\DashboardApi\\Http\\Resources\\PaymentResource' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\Payments\\Data\\PaymentData' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\Finance\\Data\\CurrencyData' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Modules\\Payments\\Data\\PaymentCustomerData' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Spatie\\LaravelData\\DataCollection' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Spatie\\LaravelData\\Concerns\\BaseDataCollectable' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'Spatie\\LaravelData\\Concerns\\EnumerableMethods' => class Dedoc\Scramble\Infer\Definition\ShallowClassDefinition { ... }, 'ArrayObject' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }, 'Illuminate\\Database\\Eloquent\\Casts\\ArrayObject' => class Dedoc\Scramble\Infer\Definition\ClassDefinition { ... }]; public array $functionsDefinitions = ['tap' => class Dedoc\Scramble\Support\InferExtensions\ShallowFunctionDefinition { ... }] }) /var/www/html/vendor/dedoc/scramble/src/Infer/Services/ReferenceTypeResolver.php:165
PHP  60. Dedoc\Scramble\Infer\Definition\ClassDefinition->getMethodDefinitionWithoutAnalysis($name = 'getArrayCopy') /var/www/html/vendor/dedoc/scramble/src/Infer/Definition/ClassDefinition.php:132
PHP  61. Dedoc\Scramble\Infer\Definition\ClassDefinition->lazilyLoadMethodDefinition($name = 'getArrayCopy') /var/www/html/vendor/dedoc/scramble/src/Infer/Definition/ClassDefinition.php:85
PHP  62. Dedoc\Scramble\Infer\Definition\ClassDefinition->isMethodDefinedInNonAstAnalyzableTrait($name = 'getArrayCopy') /var/www/html/vendor/dedoc/scramble/src/Infer/Definition/ClassDefinition.php:106
PHP  63. Dedoc\Scramble\Infer\Definition\ClassDefinition->findReflectionMethod($name = 'getArrayCopy') /var/www/html/vendor/dedoc/scramble/src/Infer/Definition/ClassDefinition.php:162
PHP  64. Dedoc\Scramble\Infer\Definition\ClassDefinition->getClassContexts($ignoreClasses = *uninitialized*) /var/www/html/vendor/dedoc/scramble/src/Infer/Definition/ClassDefinition.php:231
PHP  65. Dedoc\Scramble\Support\PhpDoc::parse($docComment = '/**\n * @extends  \\ArrayObject<TKey, TItem>\n*/', $nameResolver = class Dedoc\Scramble\Infer\Services\FileNameResolver { public readonly PhpParser\NameContext $nameContext = class PhpParser\NameContext { protected ?PhpParser\Node\Name $namespace = class PhpParser\Node\Name { ... }; protected array $aliases = [...]; protected array $origAliases = [...]; protected PhpParser\ErrorHandler $errorHandler = class PhpParser\ErrorHandler\Throwing { ... } } }) /var/www/html/vendor/dedoc/scramble/src/Infer/Definition/ClassDefinition.php:344
PHP  66. Dedoc\Scramble\PhpDoc\PhpDocTypeWalker::traverse($type = class PHPStan\PhpDocParser\Ast\Type\GenericTypeNode { public PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode $type = class PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode { public string $name = '\\ArrayObject'; private array $attributes = [...] }; public array $genericTypes = [0 => class PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode { ... }, 1 => class PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode { ... }]; public array $variances = [0 => 'invariant', 1 => 'invariant']; private array $attributes = ['startLine' => 2, 'endLine' => 2, 'startIndex' => 4, 'endIndex' => 9] }, $visitors = [0 => class Dedoc\Scramble\PhpDoc\ResolveFqnPhpDocTypeVisitor { private Dedoc\Scramble\Infer\Services\FileNameResolver $nameResolver = class Dedoc\Scramble\Infer\Services\FileNameResolver { ... } }]) /var/www/html/vendor/dedoc/scramble/src/Support/PhpDoc.php:65
PHP  67. Dedoc\Scramble\PhpDoc\PhpDocTypeWalker::traverse($type = class PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode { public string $name = '\\ArrayObject'; private array $attributes = ['startLine' => 2, 'endLine' => 2, 'startIndex' => 4, 'endIndex' => 4] }, $visitors = [0 => class Dedoc\Scramble\PhpDoc\ResolveFqnPhpDocTypeVisitor { private Dedoc\Scramble\Infer\Services\FileNameResolver $nameResolver = class Dedoc\Scramble\Infer\Services\FileNameResolver { ... } }]) /var/www/html/vendor/dedoc/scramble/src/PhpDoc/PhpDocTypeWalker.php:35
PHP  68. Dedoc\Scramble\PhpDoc\PhpDocTypeWalker::{closure:/var/www/html/vendor/dedoc/scramble/src/PhpDoc/PhpDocTypeWalker.php:22-26}($node = class PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode { public string $name = '\\ArrayObject'; private array $attributes = ['startLine' => 2, 'endLine' => 2, 'startIndex' => 4, 'endIndex' => 4] }, $method = 'enter') /var/www/html/vendor/dedoc/scramble/src/PhpDoc/PhpDocTypeWalker.php:29
PHP  69. Dedoc\Scramble\PhpDoc\ResolveFqnPhpDocTypeVisitor->enter($type = class PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode { public string $name = '\\ArrayObject'; private array $attributes = ['startLine' => 2, 'endLine' => 2, 'startIndex' => 4, 'endIndex' => 4] }) /var/www/html/vendor/dedoc/scramble/src/PhpDoc/PhpDocTypeWalker.php:24
PHP  70. Dedoc\Scramble\Infer\Services\FileNameResolver->__invoke($shortName = '\\ArrayObject') /var/www/html/vendor/dedoc/scramble/src/PhpDoc/ResolveFqnPhpDocTypeVisitor.php:22
PHP  71. class_exists($class = 'Illuminate\\Database\\Eloquent\\Casts\\\\ArrayObject') /var/www/html/vendor/dedoc/scramble/src/Infer/Services/FileNameResolver.php:58
PHP  72. Composer\Autoload\ClassLoader->loadClass($class = 'Illuminate\\Database\\Eloquent\\Casts\\\\ArrayObject') /var/www/html/vendor/dedoc/scramble/src/Infer/Services/FileNameResolver.php:58
PHP  73. {closure:/var/www/html/vendor/composer/ClassLoader.php:575-577}($file = '/var/www/html/vendor/composer/../laravel/framework/src/Illuminate/Database/Eloquent/Casts//ArrayObject.php') /var/www/html/vendor/composer/ClassLoader.php:427
PHP  74. include() /var/www/html/vendor/composer/ClassLoader.php:576
{"timestamp":"2026-02-20T08:20:32.008847+00:00","level":"ERROR","message":"Cannot redeclare class Illuminate\\Database\\Eloquent\\Casts\\ArrayObject (previously declared in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/ArrayObject.php:16)","service":"inova-pay","environment":"local","version":"unknown","server":":f6fab47fe9e8","exception":{"class":"Symfony\\Component\\ErrorHandler\\Error\\FatalError","message":"Cannot redeclare class Illuminate\\Database\\Eloquent\\Casts\\ArrayObject (previously declared in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/ArrayObject.php:16)","code":0,"file":"/var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/ArrayObject.php:16"},"extra":{}}

   Symfony\Component\ErrorHandler\Error\FatalError 

  Cannot redeclare class Illuminate\Database\Eloquent\Casts\ArrayObject (previously declared in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/ArrayObject.php:16)

  at vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/ArrayObject.php:16
     12▕  * @template TItem
     13▕  *
     14▕  * @extends  \ArrayObject<TKey, TItem>
     15▕  */
  ➜  16▕ class ArrayObject extends BaseArrayObject implements Arrayable, JsonSerializable
     17▕ {
     18▕     /**
     19▕      * Get a collection containing the underlying array.
     20▕      *


   Whoops\Exception\ErrorException 

  Cannot redeclare class Illuminate\Database\Eloquent\Casts\ArrayObject (previously declared in /var/www/html/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/ArrayObject.php:16)

  at vendor/laravel/framework/src/Illuminate/Database/Eloquent/Casts/ArrayObject.php:16
     12▕  * @template TItem
     13▕  *
     14▕  * @extends  \ArrayObject<TKey, TItem>
     15▕  */
  ➜  16▕ class ArrayObject extends BaseArrayObject implements Arrayable, JsonSerializable
     17▕ {
     18▕     /**
     19▕      * Get a collection containing the underlying array.
     20▕      *

      +1 vendor frames 

  2   [internal]:0
      Whoops\Run::handleShutdown()

Script vendor/bin/sail artisan scramble:export --api=dashboard handling the generate-api event returned with error code 255

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions