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

Allow invokable services as controllers where controller implements the __invoke magic method rather than an action, popular within the ADR (Action–domain–responder) architectural pattern.

An invokable service can be any service configured with dependency injection;

# modules/contrib/invoke/src/Controller/Invoke.php
namespace Drupal\invoke\Controller;

use Symfony\Component\HttpFoundation\Response;

class InvokeController {

  /**
   * The database connection.
   *
   * @var \Drupal\Core\Database\Connection
   */
  protected $connection;

  /**
   * @param \Drupal\Core\Database\Connection $connection
   *   The database connection.
   */
  public function __construct(Connection $connection) {
    $this->connection = $connection;
  }

  public function __invoke() {
    // do something with database connection
    return new Response('data');
  }
}
# invoke.services.yml
services:
  controller.invoke:
    class: Drupal\invoke\Controller\InvokeController:
    arguments: ['@database']
acme_invoke:
# invoke.routing.yml
invoke:
  path: /invoke
  defaults:
    _controller: controller.invoke
  requirements:
    _access: 'TRUE'

or configure it by it's FQCN (fully qualified class name):

# invoke.services.yml
services:
  Drupal\invoke\Controller\InvokeController:
    arguments: ['@database']
acme_invoke:
# invoke.routing.yml
invoke:
  path: /invoke
  defaults:
    _controller: Drupal\invoke\Controller\InvokeController
  requirements:
    _access: 'TRUE'

It could also be a FQCN of a class which is not configured by dependency injection and does not have constructor arguments:

# modules/contrib/invoke/src/Controller/Invoke.php
namespace Drupal\invoke\Controller;

use Symfony\Component\HttpFoundation\Response;

class InvokeController {
  public function __invoke() {
    return new Response('Hello World');
  }
}
acme_invoke:
# invoke.routing.yml
invoke:
  path: /invoke
  defaults:
    _controller: Drupal\invoke\Controller\InvokeController
  requirements:
    _access: 'TRUE'
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done
Details: 

Documentation can be added to https://www.drupal.org/docs/8/api/routing-system/structure-of-routes once the feature is accepted in Drupal 8.7.