laravel-cashier-stripe-connect icon indicating copy to clipboard operation
laravel-cashier-stripe-connect copied to clipboard

PHP8 deprecating warning

Open theblindfrog opened this issue 3 years ago • 3 comments

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

theblindfrog avatar Aug 22 '21 11:08 theblindfrog

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

ExpDev07 avatar Aug 23 '21 08:08 ExpDev07

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

theblindfrog avatar Aug 23 '21 09:08 theblindfrog

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

ExpDev07 avatar Aug 23 '21 09:08 ExpDev07