Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using psr/http-message:^2.0 and updating dependencies #17

Merged
merged 4 commits into from
Jan 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/phpunit.yaml
Original file line number Diff line number Diff line change
@@ -15,12 +15,13 @@ jobs:
dependencies:
- "locked"
php-version:
- "7.0"
- "7.1"
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"
- "8.2"
- "8.3"
operating-system:
- "ubuntu-latest"

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -21,11 +21,11 @@
],
"require": {
"php" : "^7.0 || ^8.0",
"psr/http-message": "^1.0"
"psr/http-message": "^2.0"
},
"require-dev": {
"scrutinizer/ocular": "~1.1",
"guzzlehttp/psr7": "^1.3",
"guzzlehttp/psr7": "^2.0",
"phpunit/phpunit": "^6.0 || ^7.0 || ^8.0 || ^9.0"
},
"autoload": {
4 changes: 2 additions & 2 deletions tests/SetCookieTest.php
Original file line number Diff line number Diff line change
@@ -3,9 +3,9 @@
namespace HansOtt\PSR7Cookies;

use DateTimeImmutable;
use GuzzleHttp\Psr7\Message;
use GuzzleHttp\Psr7\Response;
use PHPUnit\Framework\TestCase;
use function GuzzleHttp\Psr7\str;

final class SetCookieTest extends TestCase
{
@@ -41,7 +41,7 @@ public function test_it_can_be_added_to_a_psr_response()
{
$cookie = new SetCookie('name', 'value');
$responseWithCookie = $cookie->addToResponse(new Response());
$httpResponse = str($responseWithCookie);
$httpResponse = Message::toString($responseWithCookie);
$expected = 'HTTP/1.1 200 OK'."\r\n";
$expected .= 'Set-Cookie: name=value'."\r\n\r\n";
$this->assertEquals($expected, $httpResponse);