Problem/Motivation

The following all allow the ::Callback shorthand:

  • #ajax][callback
  • #process
  • #after_build
  • #validate
  • #submit

#entity_builders should as well.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett created an issue. See original summary.

tim.plunkett’s picture

Status: Active » Needs review
FileSize
3.22 KB
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

WFM. We have implicit test coverage, I'm just wondering whether we need explicit ones for that. Today I'm totally on the meh side of things.

alexpott’s picture

Status: Reviewed & tested by the community » Needs review

Today I'm totally on the meh side of things too. Do the other examples in the issue summary have explicit tests? Or are we okay with the implicit coverage here?

tim.plunkett’s picture

Status: Needs review » Reviewed & tested by the community

No they do not, only the method itself is tested in

  • \Drupal\Tests\Core\Form\FormStateTest::testPrepareCallbackValidMethod
  • \Drupal\Tests\Core\Form\FormStateTest::testPrepareCallbackInValidMethod
  • \Drupal\Tests\Core\Form\FormStateTest::testPrepareCallbackArray

added in #2309323: Allow #submit and #validate to be specified as methods of the form object

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

I've thought about asking for a CR here but existing code does not need to change so there is nothing to do. No backporting this to 8.2.x means that contrib can only safely use this once 8.4.x is out so a CR now it pointless.

Committed c3cad9b and pushed to 8.3.x. Thanks!

  • alexpott committed c3cad9b on 8.3.x
    Issue #2821265 by tim.plunkett: Allow #entity_builders to use the ::...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.