From 7633838892e214a25413b29ba17315aaecf3a13d Mon Sep 17 00:00:00 2001 From: Sean Fraser Date: Mon, 8 Apr 2024 21:41:06 -0400 Subject: [PATCH] adding documentation about upgrading intervention/image to v3 --- CHANGELOG.md | 4 ++++ UPGRADING.md | 1 + composer.json | 3 +++ docs/source/variants.rst | 25 ++++++++++++++++++++++++- 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7f1b23..1eae72b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 6.0.2 +- Added `intervention/image-laravel` package to the composer suggests list +- Updated documentation with configuration instructions for intervention/image + ## 6.0.1 - Fix readthedocs documentation build configuration diff --git a/UPGRADING.md b/UPGRADING.md index 9ee2982..667aa75 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -4,6 +4,7 @@ * Minimum PHP version moved to 8.1 * Minimum Laravel version moved to 10 +* (optional) If upgrading the `intervention/image` package to 3.X, be sure to review the [upgrading instructions](https://image.intervention.io/v3/introduction/upgrade) for that package. Notably, the Laravel service providers for configuring the package have been moved to a separate repository [intervention/image-laravel](https://github.com/Intervention/image-laravel) * New database migration file is included with the package. Run `php artisan migrate` to apply the changes. * Add the `MediableInterface` to all models using the `Mediable` trait. * To add support for data URLs to the MediaUploader, the following entry should be added to the `source_adapters.pattern` field in `config/mediable.php` diff --git a/composer.json b/composer.json index 737450a..dceba2c 100644 --- a/composer.json +++ b/composer.json @@ -55,6 +55,9 @@ "migrations/" ] }, + "suggest": { + "intervention/image-laravel": "Laravel bindings for the intervention/image package used for image manipulation" + }, "minimum-stability": "stable", "prefer-stable": true, "extra": { diff --git a/docs/source/variants.rst b/docs/source/variants.rst index c3d8725..25c8edb 100644 --- a/docs/source/variants.rst +++ b/docs/source/variants.rst @@ -10,7 +10,30 @@ Laravel-Mediable integrates the `intervention/image `_ library driver. If you intend to use the additional features of the `ImageMagick `_ driver, you should make sure that the PHP extension is installed and the correct configuration is bound to the Laravel service container. +Before you can use the ImageManipulation features of this package, you will need to make sure that the intervention/image package is properly configured. Intervention/image is capable of using either the `GD `_ or `ImageMagick `_ libraries as the underlying driver. + +Intervention/image >=3.0 +^^^^^^^^^^^^^^^^^^^^^^^ + +RECOMMENDED: install the `intervention/image-laravel `_ package to configure the container bindings automatically. + +Alternatively, you can add the necessary bindings to the service container by adding the following to one of the service providers of your application. + +:: + + bind(Intervention\Image\Interfaces\DriverInterface::class, \Intervention\Image\Drivers\Gd\Driver::class); + + // if using Imagick + $app->bind(Intervention\Image\Interfaces\DriverInterface::class, \Intervention\Image\Drivers\Imagick\Driver::class); + +Intervention/image <3.0 +^^^^^^^^^^^^^^^^^^^^^^^ + +RECOMMENDED: `follow the steps `_ to enable the intervention/image Laravel service provider. + +Otherwise, by default, intervention/image will use the `GD `_ library driver. If you intend to use the additional features of the `ImageMagick `_ driver, you should make sure that the PHP extension is installed and the correct configuration is bound to the Laravel service container. ::