Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API Deprecate FlushMiddelware #11444

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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