From 37e7b6f8c8c6932d0fb809d4f91153b81b24c699 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 22 Sep 2020 08:07:14 +0200 Subject: update to 1.5.0 add patch for test suite from upstream and from https://github.com/thephpleague/mime-type-detection/pull/3 open https://github.com/thephpleague/mime-type-detection/pull/4 phpunit 9 switch to phpunit9 --- 485f75211335bfd69882bee7d3fccc730485aa82.patch | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 485f75211335bfd69882bee7d3fccc730485aa82.patch (limited to '485f75211335bfd69882bee7d3fccc730485aa82.patch') diff --git a/485f75211335bfd69882bee7d3fccc730485aa82.patch b/485f75211335bfd69882bee7d3fccc730485aa82.patch new file mode 100644 index 0000000..7c5ae5d --- /dev/null +++ b/485f75211335bfd69882bee7d3fccc730485aa82.patch @@ -0,0 +1,41 @@ +From 485f75211335bfd69882bee7d3fccc730485aa82 Mon Sep 17 00:00:00 2001 +From: Frank de Jonge +Date: Mon, 21 Sep 2020 20:19:38 +0200 +Subject: [PATCH] Assert start of string for SVG type, it varies based on PHP + version + +--- + src/FinfoMimeTypeDetectorTest.php | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/FinfoMimeTypeDetectorTest.php b/src/FinfoMimeTypeDetectorTest.php +index fadbe88..9f6c91b 100644 +--- a/src/FinfoMimeTypeDetectorTest.php ++++ b/src/FinfoMimeTypeDetectorTest.php +@@ -38,7 +38,7 @@ public function detecting_mime_type_from_contents(): void + + $mimeType = $this->detector->detectMimeType('flysystem.svg', $contents); + +- $this->assertEquals('image/svg', $mimeType); ++ $this->assertStringStartsWith('image/svg', $mimeType); + } + + /** +@@ -51,7 +51,7 @@ public function detecting_mime_type_from_buffer(): void + + $mimeType = $this->detector->detectMimeTypeFromBuffer($contents); + +- $this->assertEquals('image/svg', $mimeType); ++ $this->assertStringStartsWith('image/svg', $mimeType); + } + + /** +@@ -61,7 +61,7 @@ public function detecting_from_contents_falls_back_to_extension_detection(): voi + { + $mimeType = $this->detector->detectMimeType('flysystem.svg', ''); + +- $this->assertEquals('image/svg+xml', $mimeType); ++ $this->assertStringStartsWith('image/svg+xml', $mimeType); + } + + /** -- cgit