From 40ded47645a95cfe34c2423408e33f0df906683e Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 25 Jan 2022 16:18:18 +0100 Subject: [PATCH 1/2] Bump voku/portable-ascii to v2 --- composer.json | 2 +- src/Illuminate/Support/composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ee7cf00bda5a..91c2d3aa6185 100644 --- a/composer.json +++ b/composer.json @@ -42,7 +42,7 @@ "symfony/var-dumper": "^6.0", "tijsverkoyen/css-to-inline-styles": "^2.2.2", "vlucas/phpdotenv": "^5.4.1", - "voku/portable-ascii": "^1.6.1" + "voku/portable-ascii": "^2.0" }, "replace": { "illuminate/auth": "self.version", diff --git a/src/Illuminate/Support/composer.json b/src/Illuminate/Support/composer.json index ec1387b61e8b..1e1681cee1e7 100644 --- a/src/Illuminate/Support/composer.json +++ b/src/Illuminate/Support/composer.json @@ -23,7 +23,7 @@ "illuminate/contracts": "^9.0", "illuminate/macroable": "^9.0", "nesbot/carbon": "^2.53.1", - "voku/portable-ascii": "^1.6.1" + "voku/portable-ascii": "^2.0" }, "conflict": { "tightenco/collect": "<5.5.33" From 035360c811da2b2c82fb9694125d6db891f3eadb Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Tue, 25 Jan 2022 16:25:17 +0100 Subject: [PATCH 2/2] Adjust tests to new behavior --- tests/Filesystem/FilesystemAdapterTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Filesystem/FilesystemAdapterTest.php b/tests/Filesystem/FilesystemAdapterTest.php index c6da781e1874..c1fabc8255d0 100644 --- a/tests/Filesystem/FilesystemAdapterTest.php +++ b/tests/Filesystem/FilesystemAdapterTest.php @@ -72,7 +72,7 @@ public function testDownloadNonAsciiFilename() $files = new FilesystemAdapter($this->filesystem, $this->adapter); $response = $files->download('file.txt', 'пиздюк.txt'); $this->assertInstanceOf(StreamedResponse::class, $response); - $this->assertSame("attachment; filename=pizdyuk.txt; filename*=utf-8''%D0%BF%D0%B8%D0%B7%D0%B4%D1%8E%D0%BA.txt", $response->headers->get('content-disposition')); + $this->assertSame("attachment; filename=pizdiuk.txt; filename*=utf-8''%D0%BF%D0%B8%D0%B7%D0%B4%D1%8E%D0%BA.txt", $response->headers->get('content-disposition')); } public function testDownloadNonAsciiEmptyFilename() @@ -81,7 +81,7 @@ public function testDownloadNonAsciiEmptyFilename() $files = new FilesystemAdapter($this->filesystem, $this->adapter); $response = $files->download('пиздюк.txt'); $this->assertInstanceOf(StreamedResponse::class, $response); - $this->assertSame('attachment; filename=pizdyuk.txt; filename*=utf-8\'\'%D0%BF%D0%B8%D0%B7%D0%B4%D1%8E%D0%BA.txt', $response->headers->get('content-disposition')); + $this->assertSame('attachment; filename=pizdiuk.txt; filename*=utf-8\'\'%D0%BF%D0%B8%D0%B7%D0%B4%D1%8E%D0%BA.txt', $response->headers->get('content-disposition')); } public function testDownloadPercentInFilename()