diff --git a/src/Control/Middleware/FlushMiddleware.php b/src/Control/Middleware/FlushMiddleware.php index 374063eec36..c14fd319df6 100644 --- a/src/Control/Middleware/FlushMiddleware.php +++ b/src/Control/Middleware/FlushMiddleware.php @@ -3,17 +3,23 @@ namespace SilverStripe\Control\Middleware; use SilverStripe\Control\HTTPRequest; -use SilverStripe\Core\BaseKernel; use SilverStripe\Core\ClassInfo; use SilverStripe\Core\Flushable; use SilverStripe\Core\Injector\Injector; use SilverStripe\Core\Kernel; +use SilverStripe\Dev\Deprecation; /** * Triggers a call to flush() on all implementors of Flushable. + * @deprecated 5.4.0 Will be replaced with flushing inside the Kernel directly. */ class FlushMiddleware implements HTTPMiddleware { + public function __construct() + { + Deprecation::noticeWithNoReplacment('5.4.0', 'Will be replaced with flushing inside the Kernel directly.'); + } + public function process(HTTPRequest $request, callable $delegate) { $kernel = Injector::inst()->get(Kernel::class);