From 333457953040b177ebe5a078b16cc53015d66375 Mon Sep 17 00:00:00 2001 From: Tony Messias Date: Sun, 26 Nov 2023 22:50:24 -0300 Subject: [PATCH] Document the upgrade --- docs/index.md | 2 ++ docs/upgrade.md | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 docs/upgrade.md diff --git a/docs/index.md b/docs/index.md index 3a18a3f..8ec4b7f 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,3 +1,5 @@ +* Prologue + * [Upgrade Guide](/docs/{{version}}/upgrade) * Getting Started * [Installation](/docs/{{version}}/installation) * [Overview](/docs/{{version}}/overview) diff --git a/docs/upgrade.md b/docs/upgrade.md new file mode 100644 index 0000000..fea166e --- /dev/null +++ b/docs/upgrade.md @@ -0,0 +1,19 @@ +# Upgrade Guide + +## Upgrading from 1.x to 2.x + +For version 2.x, we're migrating from `hotwired/turbo-laravel` to `hotwired-laravel/turbo-laravel`. That's just so folks don't get confused thinking this is an official Hotwired project, which it's not. Even if you're on `1.x`, it's recommended to migrate to `hotwired-laravel/turbo-laravel`. + +First, update the namespaces from the previous package. You can either do it from your IDE by searching for `Tonysm\TurboLaravel` and replacing it with `HotwiredLaravel\TurboLaravel` on your application (make sure you include all folders), or you can run the following command if you're on a macOS or Linux machine: + +```bash +find app config resources tests -type f -exec sed -i 's/Tonysm\\TurboLaravel/HotwiredLaravel\\TurboLaravel/g' {} + +``` + +Next, require the new package and remove the previous one: + +```bash +composer require hotwired-laravel/turbo-laravel:2.0.0-beta1 + +composer remove hotwired/turbo-laravel +```