laravel / cashier-stripe

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.
https://laravel.com/docs/billing
MIT License
2.37k stars 667 forks source link

[15.x] Add stripe invoice mixin to invoice #1685

Closed olivernybroe closed 1 month ago

olivernybroe commented 1 month ago

When using the Invoice class, phpstan and IDE's won't be able to access any of the Stripe props, as the class is missing a mixin annotation.

driesvints commented 1 month ago

Thanks @olivernybroe. There's a couple more of these sorts of wrapper classes. Could you update all of them as well?

driesvints commented 1 month ago

Just to check: the mixin annotation won't also suggest method calls? Because that's not being forwarded, only properties.

olivernybroe commented 1 month ago

@driesvints Ah, I totally missed that we were not forwarding methods also.

Yeah then this approach won't work as it will also forward the method calls. Only way to do it then is to add all props as @property tags, but I don't think maintaining that list of props is a good approach.

I'll might create a ticket with larastan and laravel idea instead 🤔