Parameter upcasting in Drupal 8 with Form Controller I have created a custom module with mymodule.routing.yml in which I am using own parameter {my_menu}. I have created a mymodule.services.yml file too in which I have used class for param conversion. Parameter conversion class is calling properly but I am not able to get the parameter in Form Controller class.

Code that I have written :

mymoudle.routing.yml : 

entity.my_menu.mymodule:
  path: '/node/{my_menu}/mytab'
  defaults:
    _title: 'My Title'
    _form: '\Drupal\mymodule\Form\MyModuleformControllerForm'
  requirements:
    _permission: 'edit my page'
    _entity_access: 'my_menu.update'
  options:
    _node_operation_route: TRUE
    parameters:
      my_menu:
        type: my_menu


mymoudle.services.yml : 

services:
  my_menu:
    class: Drupal\mymodule\ParamConverter\MyModuleParamConverter
    tags:
      - { name: paramconverter }


src/ParamConverter/MyModuleParamConverter.php :

/**
 * {@inheritdoc}
 */
public function convert($value, $definition, $name, array $defaults) {
  dsm($value); // Node id that exists.
  return Node::load($value);
}

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


src/Controller/MyModuleformControllerForm : 

public function buildForm(array $form, FormStateInterface $form_state, NodeInterface $node = NULL) {
  dsm($node); // It is null here
}
Your variable needs to be called my_menu, check ControllerResolver