By kim.pepper on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.5.x
Introduced in version:
11.5.0
Issue links:
Description:
#value_callback on form elements is now resolved with CallableResolver::getCallableFromDefinition(), matching #process, #after_build, and #submit. It accepts service notation (my.service:method) in addition to static methods, ClassName::method, and array callables.
Note: Previously, an invalid or unresolvable #value_callback was silently ignored and Drupal fell back to the element's default value callback. It now throws \InvalidArgumentException when the definition cannot be resolved. A form with a broken #value_callback that previously rendered (with the wrong fallback behavior) will now fail with an exception instead. This brings it inline with other callback types.
Impacts:
Module developers