Fix valueCallback() and processAjaxForm() deprecations

Created on 8 June 2024, 7 months ago
Updated 10 September 2024, 4 months ago

Testing at core 10.3 produces

\Drupal\Core\Render\Element\FormElement::valueCallback() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0.
Use \Drupal\Core\Render\Element\FormElementBase::valueCallback() instead.
See https://www.drupal.org/node/3436275

and the same tests also produce

\Drupal\Core\Render\Element\FormElement::processAjaxForm() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0.
Use \Drupal\Core\Render\Element\FormElementBase::processAjaxForm() instead.
See https://www.drupal.org/node/3436275

and

\Drupal\Core\Render\Element\FormElement::preRenderAjaxForm() is deprecated in drupal:10.3.0 and is removed from drupal:12.0.0.
Use \Drupal\Core\Render\Element\FormElementBase::preRenderAjaxForm() instead.
See https://www.drupal.org/node/3436275

Change record https://www.drupal.org/node/3436275

See https://git.drupalcode.org/project/scheduler/-/jobs/1812992 as an example

Nine functional tests are affected:
SchedulerValidationTest
SchedulerPastDatesTest
SchedulerMessageTest
SchedulerTokenReplaceTest
SchedulerDeleteEntityTest
SchedulerDefaultTimeTest
SchedulerNonEnabledTypeTest
SchedulerFieldsDisplayTest
SchedulerPermissionsTest

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇬🇧United Kingdom jonathan1055

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jonathan1055
  • First commit to issue fork.
  • 🇬🇧United Kingdom jonathan1055

    Hi @ankitv18
    Just wondering if you are working on this? You created the issue fork two weeks ago but have not pushed any changes. Let me know, as I don't want to duplicate work you have already done locally but not pushed it yet.

  • 🇮🇳India ankitv18

    I guess these warnings are coming from drupal core.
    There's one instance in TimestampDatetimeNoDefaultWidget where Datetime::valueCallback is called
    @jonathan1055 if you have solution then please proceed ~~ I created the branch but then realised the issue was created in june and after that many changes were pushed with new release. Also I'm occupied with other work.

Production build 0.71.5 2024