From 87592ecfdacf2311ec02a5a150e68f5cec36137f Mon Sep 17 00:00:00 2001 From: Duncan McClean Date: Fri, 8 Nov 2024 11:22:23 +0000 Subject: [PATCH] Transformers should be registered inside `Statamic::booted()` callbacks. --- DOCUMENTATION.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DOCUMENTATION.md b/DOCUMENTATION.md index 05d77ef..a6507c2 100644 --- a/DOCUMENTATION.md +++ b/DOCUMENTATION.md @@ -137,12 +137,15 @@ The importer includes a few transformers out of the box for Core fieldtypes, but use App\ImportTransformers\YourTransformer; use Illuminate\Support\ServiceProvider; use Statamic\Importer\Importer; + use Statamic\Statamic; class AppServiceProvider extends ServiceProvider { public function boot(): void { - Importer::registerTransformer('fieldtype', YourTransformer::class); + Statamic::booted(function () { + Importer::registerTransformer('fieldtype', YourTransformer::class); + }); } } ```