Argument count error when enable_formdata is true
tuandp opened this issue · 0 comments
tuandp commented
- Add a route with reflection method
$router->get('showWithReflectionMethod', [ExampleController::class, 'showWithReflectionMethod'])->name('show-with-reflection-method');
- Method in controller
public function showWithReflectionMethod(ExampleService $service): array
{
return $service->getRequestData();
}
ExampleService
constructor
public function __construct(Request $request)
{
$this->request = $request;
}
- Set
api-postman.enable_formdata => true
Error
ArgumentCountError: Too few arguments to function AndreasElia\PostmanGenerator\Tests\Fixtures\ExampleService::__construct()