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

[10.0] Implement config file #690

Merged
merged 1 commit into from
Jun 27, 2019
Merged

[10.0] Implement config file #690

merged 1 commit into from
Jun 27, 2019

Conversation

driesvints
Copy link
Member

@driesvints driesvints commented Jun 27, 2019

Cashier is at the moment one of the only Laravel packages which doesn't uses a config file. I think it would be better if it was more in line of the other packages by making use of one. This is what people are used to as well. These changes add a config file and cleans up the way configuration is handled within cashier.

An additional benefit is that the config for the stripe keys and web hooks is now included in Cashier itself and not outside of it anymore in the default services.php config file which ships with the Laravel skeleton. This keeps everything in exactly the place where you expect it to be and makes more sense.

Some configuration was kept in the Cashier class like the custom money formatting (closure which can't be in a config file) and the disabling of migrations (aligned with Passport and something you'd explicitly want to do in a service provider).

Another small change is the rename of STRIPE_MODEL to CASHIER_MODEL since that env variable is Cashier specfic and not Stripe specific.

This also allows us to easily add new config options in later pull requests (like the email reminder option in the payment intents PR).

Closes #531

Cashier is at the moment one of the only Laravel packages which doesn't uses a config file. I think it would be better if it was more in line of the other packages by making use of one. This is what people are used to as well. These changes add a config file and cleans up the way configuration is handled within cashier.

Another small change is the rename of STRIPE_MODEL to CASHIER_MODEL since that env variable is Cashier specfic and not Stripe specific.

This also allows us to easily add new config options in later pull requests (like the email reminder option in the payment intents PR).

Closes #531
@taylorotwell taylorotwell merged commit b040725 into master Jun 27, 2019
@driesvints driesvints deleted the config branch June 28, 2019 09:34
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.

2 participants