MessageTrait: Fixed HeaderBag::get parameter deprecation in Symfony 4.4

main
Igor Scheller 5 years ago
parent 9a170c82cb
commit 5704174fe6

@ -111,7 +111,7 @@ trait MessageTrait
*/
public function getHeader($name)
{
return $this->headers->get($name, null, false);
return $this->headers->all($name);
}
/**

@ -74,6 +74,11 @@ class MessageTraitResponseTest extends TestCase
$this->assertEquals(['bar'], $newMessage->getHeader('Foo'));
$this->assertEquals([], $newMessage->getHeader('LoremIpsum'));
$newMessage = $message
->withHeader('foo', 'bar')
->withAddedHeader('foo', 'batz');
$this->assertEquals(['bar', 'batz'], $newMessage->getHeader('foo'));
}
/**

Loading…
Cancel
Save