-
-
Notifications
You must be signed in to change notification settings - Fork 54
Upgrading from SolidusPaypalBraintree To SolidusBraintree
We decided to rename SolidusPaypalBraintree to SolidusBraintree to reflect the extensions content.
If you are using SolidusPaypalBraintree, there is a clear upgrade path to migrate to the new extension. Here are the steps:
- Upgrade
solidus_paypal_braintree
to 1.2. Be sure everything is working correctly at this point. - Change
gem 'solidus_paypal_braintree', ~> 1.2
togem 'solidus_braintree', '~> 2.0.0', require: 'solidus_paypal_braintree'
in your Gemfile. Therequire: 'solidus_paypal_braintree'
part will allow the code to run, even if you still have references to theSolidusPaypalBraintree
constant in your codebase. - Run
bin/rails g solidus_braintree:install
, which will change all the references ofSolidusPaypalBraintree
intoSolidusBraintree
in your application. We will leave the database tables as they are. In fact, we are keeping thesolidus_paypal_braintree
prefix for database tables. Renaming tables can be a potentially risky operation, and we wanted to reduce the friction in updating to v2.0.0. For details, please see https://github.com/solidusio/solidus_braintree/issues/101. - Be sure you don't have any
solidus_paypal_braintree
reference in the codebase (e.g. I18n translation keys). - Be sure you don't have any
SolidusPaypalBraintree
reference in your codebase. - Now that you don't have references to
SolidusPaypalBraintree
orsolidus_paypal_braintree
in your codebase, you can changegem 'solidus_braintree', '~> 2.0.0', require: 'solidus_paypal_braintree'
togem 'solidus_paypal_braintree', ~> 2.0
in your Gemfile.
The original name of this extension, SolidusPaypalBraintree, was unfortunate. It's true that Braintree is a PayPal product, and you can pay with PayPal via Braintree with this extension, but this name is confusing because it's not clear what you are installing exactly.
On top of that, we already had a SolidusBraintree extension, which has been deprecated. The name also differentiates it from the official Solidus PayPal extension, SolidusPaypalCommercePlatform.
To reconcile this mess, we decided to deprecate SolidusPaypalBraintree and move it into SolidusBraintree.