bpuig / laravel-subby

Laravel Plan and Subscriptions manager.
https://bpuig.github.io/laravel-subby
MIT License
104 stars 42 forks source link

Call to a member function getKey() on array error #139

Open kilicabdulkadir opened 2 years ago

kilicabdulkadir commented 2 years ago

Currently, I only receive regular payments in my project, I do not have scheduled payments. I get the following error when I run the SubscriptionPaymentQueuerJob.

image

It gives me the error while doing the merge operation on the 64th line of the PendingPaymentCollector. image

How can I overcome this?

bpuig commented 2 years ago

I'm unable to reproduce, I added more tests but I can't get the error. When you say you are not using schedules you mean you don't have the tables?

LikoSoftDev commented 1 year ago

http://joxi.ru/J2bZgPqcqjPaD2 This method return collection which is Eloquent collection. But eloquent collection have different "merge" method with getKey() function. We should cast this collection to Illuminate\Support\Collection

LikoSoftDev commented 1 year ago

http://joxi.ru/823wdlohzoP0l2 This decide a problem

bpuig commented 1 year ago

Try branch https://github.com/bpuig/laravel-subby/tree/139-call-to-a-member-function-getkey-on-array-error with @LikoSoftDev solution to see if it works... let me know

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.