Dispatcher Factory to Http\Server

I am upgrading to cake php 3.6 and the class DispatcherFactory is deprecated where it suggests to use Http\Server.

In my current bootstrap.php,
DispatcherFactory::add(‘Asset’);
DispatcherFactory::add(‘Routing’);
DispatcherFactory::add(‘ControllerFactory’);

is used. How to move these to Http\Server. Please suggest

use Cake\Http\Server;

and

Server::add(‘Asset’);

Thanks for you reply, but I don’t see any ‘add’ method in the Server class.

Ah sorry, you are right.

Dispatcher filters deprecated at 3.3

This might be useful: https://book.cakephp.org/3.0/en/controllers/middleware.html