Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.x] Use container to resolve StripeClient #1624

Merged
merged 1 commit into from
Dec 21, 2023
Merged

[14.x] Use container to resolve StripeClient #1624

merged 1 commit into from
Dec 21, 2023

Conversation

orkhanahmadov
Copy link
Contributor

@orkhanahmadov orkhanahmadov commented Dec 21, 2023

This PR uses the Laravel container to resolve StripeClient instead of initializing it in the Cashier class.

In complex test scenarios, this would allow us to mock the StripeClient instead of sending actual requests to Stripe and make those test cases focus only on actual business logic.

Copy link
Member

@driesvints driesvints left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea 👍

@taylorotwell taylorotwell merged commit 0627ac3 into laravel:14.x Dec 21, 2023
@orkhanahmadov orkhanahmadov deleted the patch-1 branch December 21, 2023 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants