Skip to content

Commit

Permalink
API Deprecate FlushMiddelware (#11444)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Oct 24, 2024
1 parent 16cb270 commit 8621411
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Control/Middleware/FlushMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8621411

Please sign in to comment.