onesignal icon indicating copy to clipboard operation
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

Open afscf opened this issue 10 months ago • 4 comments

I just installed the package like all the time and now i have this issue.

afscf avatar Jan 21 '25 21:01 afscf

Encountering same issue after updating the packages

GalahadXVI avatar Jan 24 '25 12:01 GalahadXVI

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

GalahadXVI avatar Jan 24 '25 12:01 GalahadXVI

Is there any other solution here, apart from downgrading to v2.2 ?

dbeznos avatar Jan 27 '25 18:01 dbeznos

I'm having this same issue

joshmakar avatar Mar 06 '25 14:03 joshmakar