upgraded dependencies
This commit is contained in:
@@ -30,11 +30,6 @@ class StreamedResponse extends Response
|
||||
protected $streamed;
|
||||
private $headersSent;
|
||||
|
||||
/**
|
||||
* @param callable|null $callback A valid PHP callback or null to set it later
|
||||
* @param int $status The response status code
|
||||
* @param array $headers An array of response headers
|
||||
*/
|
||||
public function __construct(callable $callback = null, int $status = 200, array $headers = [])
|
||||
{
|
||||
parent::__construct(null, $status, $headers);
|
||||
@@ -50,13 +45,15 @@ class StreamedResponse extends Response
|
||||
* Factory method for chainability.
|
||||
*
|
||||
* @param callable|null $callback A valid PHP callback or null to set it later
|
||||
* @param int $status The response status code
|
||||
* @param array $headers An array of response headers
|
||||
*
|
||||
* @return static
|
||||
*
|
||||
* @deprecated since Symfony 5.1, use __construct() instead.
|
||||
*/
|
||||
public static function create($callback = null, $status = 200, $headers = [])
|
||||
public static function create($callback = null, int $status = 200, array $headers = [])
|
||||
{
|
||||
trigger_deprecation('symfony/http-foundation', '5.1', 'The "%s()" method is deprecated, use "new %s()" instead.', __METHOD__, static::class);
|
||||
|
||||
return new static($callback, $status, $headers);
|
||||
}
|
||||
|
||||
@@ -121,7 +118,7 @@ class StreamedResponse extends Response
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setContent($content)
|
||||
public function setContent(?string $content)
|
||||
{
|
||||
if (null !== $content) {
|
||||
throw new \LogicException('The content cannot be set on a StreamedResponse instance.');
|
||||
|
Reference in New Issue
Block a user