From 9199097936eb4440421a419c2a3673d79c8ccc25 Mon Sep 17 00:00:00 2001 From: Graham Watson Date: Mon, 30 May 2022 21:15:15 -0400 Subject: [PATCH 1/3] Fix typo --- src/Exception/UploadedFileErrorException.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Exception/UploadedFileErrorException.php b/src/Exception/UploadedFileErrorException.php index b3a3e68e..a12e95ab 100644 --- a/src/Exception/UploadedFileErrorException.php +++ b/src/Exception/UploadedFileErrorException.php @@ -31,7 +31,7 @@ public static function dueToUnwritablePath() : self public static function dueToUnwritableTarget(string $targetDirectory) : self { return new self(sprintf( - 'The target directory `%s` does not exists or is not writable', + 'The target directory `%s` does not exist or is not writable', $targetDirectory )); } From 86df32439bc9d1d29d91dbce3e2556994d62f8b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 10 Jun 2022 14:16:26 +0200 Subject: [PATCH 2/3] Fix typo in property name in UploadedFileTest::setUp() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a deprecation warning in PHP 8.2: > Deprecated: Creation of dynamic property LaminasTest\Diactoros\UploadedFileTest::$tmpfile is deprecated in /pwd/test/UploadedFileTest.php on line 39 Signed-off-by: Tim Düsterhus --- test/UploadedFileTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/UploadedFileTest.php b/test/UploadedFileTest.php index f7518862..598488f6 100644 --- a/test/UploadedFileTest.php +++ b/test/UploadedFileTest.php @@ -36,7 +36,7 @@ class UploadedFileTest extends TestCase protected function setUp() : void { - $this->tmpfile = null; + $this->tmpFile = null; } protected function tearDown() : void From d88c90da3981c6c0915643123f7fd8420191b103 Mon Sep 17 00:00:00 2001 From: Florian Hofsaess Date: Mon, 27 Jun 2022 17:56:33 +0200 Subject: [PATCH 3/3] Clarifies change in parsing headers Signed-off-by: Florian Hofsaess --- docs/book/v2/migration.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/book/v2/migration.md b/docs/book/v2/migration.md index 035b87e8..7cf5701b 100644 --- a/docs/book/v2/migration.md +++ b/docs/book/v2/migration.md @@ -29,10 +29,6 @@ The first approach may fail if libraries you depend on specifically require a version 1 release. The second approach may leave you on a version 1 release in situations where other libraries you depend on require version 1. -In all cases, if you are only using the PSR-7 implementations and/or the -`ServerRequestFactory::fromGlobals()` functionality, upgrading to version 2 will -pose no backwards compatibility issues. - ## Changed - `Laminas\Diactoros\RequestTrait` now raises an `InvalidArgumentException` in @@ -42,6 +38,12 @@ pose no backwards compatibility issues. `UnexpectedValueException` due to an unexpected HTTP method; this is due to the fact that the HTTP method value can no longer be set to an invalid value. +- `Laminas\Diactoros\marshalHeadersFromSapi()` is parsing headers differently compared to the legacy implementation. + As a consequence Headers with `'0'` as values will be part of the parsed Headers. + In former versions those headers were ignored. + Usages of `\Laminas\Diactoros\MessageTrait::hasHeader()` and `\Laminas\Diactoros\MessageTrait::getHeader()` + might be affected if you are using `ServerRequestFactory::fromGlobals()` functionality. + ## Removed Several features were removed for version 2. These include removal of the