ExpDev07 / laravel-cashier-stripe-connect

💲 Adds Stripe Connect functionality to Laravel's main billing package, Cashier. Simply works as a drop-in on top of Cashier, with no extra configuration.
https://github.com/ExpDev07/laravel-cashier-stripe-connect
MIT License
61 stars 28 forks source link

PHP8 deprecating warning #10

Open theblindfrog opened 3 years ago

theblindfrog commented 3 years ago

Hi there,

I'm getting this warning when running on PHP8

Deprecated: Required parameter $amount follows optional parameter $refundFee in /Users/Code/project/vendor/expdev07/laravel-cashier-stripe-connect/src/Concerns/ManagesTransfer.php on line 53

As far as I can tell, this is due to PHP 8 requiring required arg first, before optional items per this article

public function reverseTransferFromStripeAccount(Transfer $transfer, $refundFee = false, ?int $amount, array $options = []): TransferReverse

could be altered to

public function reverseTransferFromStripeAccount(Transfer $transfer, ?int $amount, $refundFee = false, array $options = []): TransferReverse

but this is a breaking change, I'd imagine

ExpDev07 commented 3 years ago

Could u fix this in ur most resent PR? Thanks :)

theblindfrog commented 3 years ago

Can do! But this is a breaking change to any folks using v1.1.0 of the package

ExpDev07 commented 3 years ago

Yes, let's just keep this issue open then, and not do anything about it right now :).