Hello,
I encountered an issue after installing the “Order Notifier” extension, which required me to set up Laravel Websockets. During the setup process, I faced errors related to the Dingo API package. I tried making several changes to the configuration and the Dingo API service provider to fix the issues, but the latest error is still unresolved.
Here are the error messages I encountered:
First error:
In Handler.php line 67:
Dingo\Api\Exception\Handler::__construct(): Argument #2 ($format) must be of type array, null given, called in /home/campomarketvanel/public_html/extensions/igniter/api/vendor/dingo/api/src/Provider/DingoServiceProvider.php on line 123
Second error:
In Response.php line 269:
Dingo\Api\Http\Response::setFormatters(): Argument #1 ($formatters) must be of type array, null given, called in /home/campomarketvanel/public_html/extensions/igniter/api/vendor/dingo/api/src/Provider/DingoServiceProvider.php on line 34
Latest error:
In Factory.php line 45:
Dingo\Api\Transformer\Factory::__construct(): Argument #2 ($adapter) must be of type Dingo\Api\Contract\Transformer\Adapter, null given, called in /home/campomarketvanel/public_html/extensions/igniter/api/vendor/dingo/api/src/Provider/DingoServiceProvider.php on line 191
The latest error is related to the Dingo\Api\Transformer\Factory constructor, which expects an instance of Dingo\Api\Contract\Transformer\Adapter as the second argument but receives null. I made sure the transformer configuration is set correctly in config/api.php and added a check in the DingoServiceProvider.php file to set a default transformer if it’s not configured.
I would appreciate any guidance or assistance to resolve this issue. Thank you.