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

The old 'converters' option no longer exists. It's been replaced by 'parameters'

options:
  converters:
    foo: 'user'

New way:

options:
  parameters:
    foo:
      type: 'entity:user'

In a Route Subscriber, the options array looks like this:

<?php
         
array(
           
'parameters' => array(
             
'entity' => array(
               
'type' => 'entity:' . $entity_type,
              ),
            ),
          )
?>

ParamConverters need to implement ParamConverterInterface and be tagged paramconverter in services.yml file

<?php
class LanguageConverter implements ParamConverterInterface {

 
/**
   * {@inheritdoc}
   */
 
public function convert($value, $definition, $name, array $defaults) {
   
$languages = language_list(Language::STATE_ALL);
    return isset(
$languages[$value]) ? $languages[$value] : NULL;
  }

 
/**
   * {@inheritdoc}
   */
 
public function applies($definition, $name, Route $route) {
    if (!empty(
$definition['type']) && $definition['type'] == 'language') {
      return
TRUE;
    }
    return
FALSE;
  }

}
?>
services:
  language_converter:
    class: Drupal\language\LanguageConverter
    tags:
      - { name: paramconverter }
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