onesignal
onesignal copied to clipboard
Too few arguments to function Berkayk\OneSignal\OneSignalClient::__construct(), 3 passed in S:\laravel\mygroceries\vendor\laravel-notification-channels\onesignal\src\OneSignalServiceProvider.php on line 25 and at least 4 expected
I just installed the package like all the time and now i have this issue.
Encountering same issue after updating the packages
The issue is caused by this change: https://github.com/berkayk/laravel-onesignal/compare/v2.2...v2.3
which added an extra argument to the __construct( ) method.
This package will need updating so that it passes a $restApiUrl to the OneSignalClient.
As a temporary solution, just downgrade berkayk/laravel-onesignal to any version below v2.3
composer require berkayk/onesignal-laravel:2.2. This might break after March 1, 2025.
Related PR: https://github.com/laravel-notification-channels/onesignal/pull/156
Is there any other solution here, apart from downgrading to v2.2 ?
I'm having this same issue