[ticket/14285] Temporal fix for StreamedResponse

PHPBB3-14285
This commit is contained in:
Rubén Calvo 2018-07-13 08:17:33 +02:00 committed by rubencm
parent d11b83a4c5
commit 4abdabe6f4
2 changed files with 33 additions and 3 deletions

View file

@ -17,8 +17,8 @@ use phpbb\cache\service;
use phpbb\db\driver\driver_interface;
use phpbb\exception\http_exception;
use phpbb\storage\storage;
use phpbb\storage\streamed_response;
use Symfony\Component\HttpFoundation\Request as symfony_request;
use Symfony\Component\HttpFoundation\StreamedResponse;
class controller
{
@ -31,7 +31,7 @@ class controller
/** @var storage */
protected $storage;
/** @var StreamedResponse */
/** @var streamed_response */
protected $response;
/** @var symfony_request */
@ -43,7 +43,7 @@ class controller
$this->db = $db;
$this->storage = $storage;
$this->symfony_request = $symfony_request;
$this->response = new StreamedResponse();
$this->response = new streamed_response();
}
public function handle($file)

View file

@ -0,0 +1,30 @@
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace phpbb\storage;
use Symfony\Component\HttpFoundation\StreamedResponse;
// Temporal fix for: https://github.com/symfony/symfony/issues/27924
class streamed_response extends StreamedResponse
{
/**
* {@inheritdoc}
*/
public function setNotModified()
{
$this->setCallback(function () {});
return parent::setNotModified();
}
}