Skip to content

Commit

Permalink
Changed psr-7 versions to 1.1 and 2.0 + added regression test (#1344) (
Browse files Browse the repository at this point in the history
…#1345)

(cherry picked from commit 06ffbff)

Co-authored-by: Enrico Zimuel <[email protected]>
  • Loading branch information
github-actions[bot] and ezimuel committed Aug 3, 2023
1 parent fa388b6 commit 5cb4b74
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"php": "^7.4 || ^8.0",
"elastic/transport": "^8.7",
"psr/http-client": "^1.0",
"psr/http-message": "^1.0 || ^2.0",
"psr/http-message": "^1.1 || ^2.0",
"psr/log": "^1|^2|^3",
"guzzlehttp/guzzle": "^7.0"
},
Expand Down
8 changes: 8 additions & 0 deletions tests/Response/ElasticsearchTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,12 @@ public function testAccessAsObject()

$this->assertEquals($array['foo'], $this->elasticsearch->foo);
}

public function testWithStatusForPsr7Version1And2Compatibility()
{
$this->elasticsearch->setResponse($this->response200);

$this->elasticsearch = $this->elasticsearch->withStatus(400);
$this->assertEquals(400, $this->elasticsearch->getStatusCode());
}
}

0 comments on commit 5cb4b74

Please sign in to comment.