Skip to content

Commit 5cb4b74

Browse files
Changed psr-7 versions to 1.1 and 2.0 + added regression test (#1344) (#1345)
(cherry picked from commit 06ffbff) Co-authored-by: Enrico Zimuel <[email protected]>
1 parent fa388b6 commit 5cb4b74

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"php": "^7.4 || ^8.0",
1414
"elastic/transport": "^8.7",
1515
"psr/http-client": "^1.0",
16-
"psr/http-message": "^1.0 || ^2.0",
16+
"psr/http-message": "^1.1 || ^2.0",
1717
"psr/log": "^1|^2|^3",
1818
"guzzlehttp/guzzle": "^7.0"
1919
},

tests/Response/ElasticsearchTest.php

+8
Original file line numberDiff line numberDiff line change
@@ -200,4 +200,12 @@ public function testAccessAsObject()
200200

201201
$this->assertEquals($array['foo'], $this->elasticsearch->foo);
202202
}
203+
204+
public function testWithStatusForPsr7Version1And2Compatibility()
205+
{
206+
$this->elasticsearch->setResponse($this->response200);
207+
208+
$this->elasticsearch = $this->elasticsearch->withStatus(400);
209+
$this->assertEquals(400, $this->elasticsearch->getStatusCode());
210+
}
203211
}

0 commit comments

Comments
 (0)