Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

Symfony has a Symfony\Component\HttpFoundation\BinaryFileResponse class that can be used to deliver files through PHP to the client. It also supports X-Sendfile and X-Accel-Mapping via BinaryFileResponse::trustXSendfileTypeHeader().

file_transfer() has been dropped in favor of that.

Drupal 7:

return file_transfer($uri, $headers);

Drupal 8:

use Symfony\Component\HttpFoundation\BinaryFileResponse;
...
return new BinaryFileResponse($uri, 200, $headers);

Ref: http://symfony.com/doc/current/components/http_foundation/introduction.h...

Impacts: 
Module developers