diff --git a/composer.json b/composer.json index 4f962de..c25b483 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,8 @@ "require": { "php": "^8.1", "illuminate/support": "^8|^9|^10|^11|^12", + "illuminate/http": "^8|^9|^10|^11|^12", + "illuminate/routing": "^8|^9|^10|^11|^12", "intervention/image": "^3.11" }, "require-dev": { diff --git a/src/ImageResponseFactory.php b/src/ImageResponseFactory.php index a04fe10..2cbac03 100644 --- a/src/ImageResponseFactory.php +++ b/src/ImageResponseFactory.php @@ -5,7 +5,6 @@ namespace Intervention\Image\Laravel; use Illuminate\Http\Response; -use Illuminate\Support\Facades\Response as ResponseFactory; use Intervention\Image\Exceptions\DriverException; use Intervention\Image\Exceptions\NotSupportedException; use Intervention\Image\Exceptions\RuntimeException; @@ -68,7 +67,7 @@ public static function make( */ public function response(): Response { - return ResponseFactory::make( + return new Response( content: $this->content(), headers: $this->headers() ); diff --git a/tests/ImageResponseFactoryTest.php b/tests/ImageResponseFactoryTest.php index 61b5980..53fe98b 100644 --- a/tests/ImageResponseFactoryTest.php +++ b/tests/ImageResponseFactoryTest.php @@ -12,13 +12,10 @@ use Intervention\Image\ImageManager; use Intervention\Image\Laravel\ImageResponseFactory; use Intervention\Image\MediaType; -use Orchestra\Testbench\Concerns\WithWorkbench; -use Orchestra\Testbench\TestCase as TestBenchTestCase; +use PHPUnit\Framework\TestCase; -class ImageResponseFactoryTest extends TestBenchTestCase +class ImageResponseFactoryTest extends TestCase { - use WithWorkbench; - protected Image $image; protected function setUp(): void