diff --git a/src/Responses/AssetResponse.php b/src/Responses/AssetResponse.php index 4bedaae..6f1a248 100644 --- a/src/Responses/AssetResponse.php +++ b/src/Responses/AssetResponse.php @@ -47,7 +47,14 @@ class AssetResponse extends FileResponse implements AssetResponseInterface public function __construct(string $assetPath, string $mediaType) { $this->assetPath = $assetPath; - parent::__construct($assetPath, basename($assetPath), $mediaType, false); + parent::__construct( + $assetPath, + basename($assetPath), + 200, + '', + $mediaType, + false + ); } diff --git a/src/Responses/MinifiedAssetResponse.php b/src/Responses/MinifiedAssetResponse.php index 62386d7..47db066 100644 --- a/src/Responses/MinifiedAssetResponse.php +++ b/src/Responses/MinifiedAssetResponse.php @@ -21,7 +21,6 @@ // declare(strict_types=1); namespace CodeInc\AssetsMiddleware\Responses; -use CodeInc\MediaTypes\MediaTypes; use CodeInc\Psr7Responses\FileResponse; use enshrined\svgSanitize\Sanitizer; use function GuzzleHttp\Psr7\stream_for; @@ -59,7 +58,14 @@ public function __construct(string $assetPath, string $mediaType) { $this->assetPath = $assetPath; $this->mediaType = $mediaType; - parent::__construct($this->buildStream($assetPath), basename($assetPath), $mediaType, false); + parent::__construct( + $this->buildStream($assetPath), + basename($assetPath), + 200, + '', + $mediaType, + false + ); } /** diff --git a/src/Responses/NotModifiedAssetResponse.php b/src/Responses/NotModifiedAssetResponse.php index 7f495c7..232a7c6 100644 --- a/src/Responses/NotModifiedAssetResponse.php +++ b/src/Responses/NotModifiedAssetResponse.php @@ -21,7 +21,7 @@ // declare(strict_types=1); namespace CodeInc\AssetsMiddleware\Responses; -use GuzzleHttp\Psr7\Response; +use CodeInc\Psr7Responses\EmptyResponse; /** @@ -30,7 +30,7 @@ * @package CodeInc\AssetsMiddleware\Responses * @author Joan Fabrégat */ -class NotModifiedAssetResponse extends Response implements AssetResponseInterface +class NotModifiedAssetResponse extends EmptyResponse implements AssetResponseInterface { /** * @var string