From 94e031ad5f2c272feb1eeb3286126d2e40afebef Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Tue, 12 Aug 2025 09:43:17 +0100 Subject: [PATCH] clean up --- docs/01-introduction/02-installation.md | 28 --- docs/14-upgrade-guide.md | 54 +++-- .../UpgradeDirectoryStructureToV4Command.php | 220 +++++++++--------- 3 files changed, 151 insertions(+), 151 deletions(-) diff --git a/docs/01-introduction/02-installation.md b/docs/01-introduction/02-installation.md index 77f11b059b..4caddec855 100644 --- a/docs/01-introduction/02-installation.md +++ b/docs/01-introduction/02-installation.md @@ -38,20 +38,6 @@ Installation comes in two flavors, depending on whether you want to build an app ## Installing the panel builder -Since Filament v4 is in beta, you will need to set the `minimum-stability` in your `composer.json` file to be `beta` before installing any packages. Either adjust it manually or via CLI: - -```bash -composer config minimum-stability beta -``` - -Your `composer.json` should look like this: - -```json -{ - "minimum-stability": "beta" -} -``` - Install the Filament Panel Builder by running the following commands in your Laravel project directory: ```bash @@ -94,20 +80,6 @@ Open `/admin` in your web browser, sign in, and [start building your app](../get ## Installing the individual components -Since Filament v4 is in beta, you will need to set the `minimum-stability` in your `composer.json` file to be `beta` before installing any packages. Either adjust it manually or via CLI: - -```bash -composer config minimum-stability beta -``` - -Your `composer.json` should look like this: - -```json -{ - "minimum-stability": "beta" -} -``` - Install the Filament components you want to use with Composer: ```bash diff --git a/docs/14-upgrade-guide.md b/docs/14-upgrade-guide.md index fd9c34bbcb..4b56088fdc 100644 --- a/docs/14-upgrade-guide.md +++ b/docs/14-upgrade-guide.md @@ -23,26 +23,20 @@ import Disclosure from "@components/Disclosure.astro" The upgrade script is not a replacement for the upgrade guide. It handles many small changes that are not mentioned in the upgrade guide, but it does not handle all breaking changes. You should still read the [manual upgrade steps](#breaking-changes-that-must-be-handled-manually) to see what changes you need to make to your code. -The first step to upgrade your Filament app is to run the automated upgrade script. Since Filament v4 is in beta, you will need to set the `minimum-stability` in your `composer.json` file to be `beta` before installing any packages. Either adjust it manually or via CLI: + -```bash -composer config minimum-stability beta -``` - -Your `composer.json` should look like this: - -```json -{ - "minimum-stability": "beta" -} -``` - -This script will automatically upgrade your application to the latest version of Filament and make changes to your code, which handles most breaking changes: +The first step to upgrade your Filament app is to run the automated upgrade script. This script will automatically upgrade your application to the latest version of Filament and make changes to your code, which handles most breaking changes: ```bash composer require filament/upgrade:"^4.0" -W --dev vendor/bin/filament-v4 + +# Run the commands output by the upgrade script, they are unique to your app +composer require filament/filament:"^4.0" -W --no-update +composer update ``` @@ -61,12 +59,18 @@ vendor/bin/filament-v4 Make sure to carefully follow the instructions, and review the changes made by the script. You may need to make some manual changes to your code afterwards, but the script should handle most of the repetitive work for you. -You can now `composer remove filament/upgrade` as you don't need it anymore. +Filament v4 introduces a new default directory structure for your Filament resources and clusters. If you are using Filament panels with resources and clusters, you can choose to keep the old directory structure, or migrate to the new one. If you want to migrate to the new directory structure, you can run the following command: -