Open klonos opened 3 months ago
PR up for review/testing: https://github.com/backdrop/backdrop/pull/4821
It would be a nice bonus if there was a way to log a warning, similar to
watchdog_deprecated_function()
, so that contrib and custom code that is using this can be notified to switch totriggering_element
instead.
I could not figure out any way to do that. If anyone has any ideas, please let me know.
Related to the above, I have tried adding clicked_button
as a "forbidden word" in our CSpell configuration, with the suggestion of triggering_element
, which should catch any accidental additions to the core codebase in the future.
PS: There is a general problem with CSpell flagged words and suggestions not working as expected for us at the moment, which could either be a CSpell bug, or us not having configured CSpell correctly. Please follow https://github.com/streetsidesoftware/cspell/issues/5835 for details on that. In any case, the configuration will be there for when things start working with CSpell.
$form_state['clicked_button']
was removed in favor of$form_state['triggering_element']
even in D7. See https://git.drupalcode.org/project/drupal/-/blob/7.x/includes/form.inc?ref_type=heads#L257We also have a
@todo
note inform_builder()
to remove the backwards compatibility workaround in Backdrop 2.0. See https://github.com/backdrop/backdrop/blob/1.x/core/includes/form.inc#L2056:This task here is NOT to remove the backwards-compatible workaround itself (which would be a 2.x tasks), rather than to make sure that we are not using it in core. A quick grep shows 40+ instances of that currently.
It would be a nice bonus if there was a way to log a warning, similar to
watchdog_deprecated_function()
, so that contrib and custom code that is using this can be notified to switch totriggering_element
instead.