Change record status: 
Project: 
Introduced in branch: 
10.3.x
Introduced in version: 
10.3.0
Description: 

Drupal core is removing a step in form processing where the replace method is updated to replaceWith. Contributed and custom modules should no longer rely on this step, so they should use replaceWith.

Before Drupal 10.3.0

Either this code or the code in the following section would have the same effect.

  public function buildForm(array $form, FormStateInterface $form_state) {
    $form['driver_text'] = [
      // ...
      '#ajax' => [
        'callback' => 'ajax_forms_test_validation_form_callback',
        'wrapper' => 'message_area',
        'method' => 'replace',
      ],

Starting with Drupal 10.3.0

Only replaceWith is supported:

  public function buildForm(array $form, FormStateInterface $form_state) {
    $form['driver_text'] = [
      // ...
      '#ajax' => [
        'callback' => 'ajax_forms_test_validation_form_callback',
        'wrapper' => 'message_area',
        'method' => 'replaceWith',
      ],
Impacts: 
Module developers