Problem/Motivation

The method AjaxResponse::getCommands claims it is going to return \Drupal\Core\Ajax\CommandInterface[].

This is not the case. $commands in that class are going to be an array of return values from \Drupal\Core\Ajax\CommandInterface::render (which in turn has the following description: Return an array to be run through json_encode and sent to the client.)

Proposed resolution

Change the doc comment

Remaining tasks

Write a patch

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

N/A

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

eiriksm created an issue. See original summary.

eiriksm’s picture

Status: Active » Needs review
FileSize
747 bytes
eiriksm’s picture

FileSize
630 bytes

Oops, realized I also added a mode change for my services.yml file. Updated patch

init90’s picture

Status: Needs review » Reviewed & tested by the community

Looks correct.

  • larowlan committed 22f6783 on 8.8.x
    Issue #3081679 by eiriksm: AjaxResponse::getCommands has wrong return...
larowlan’s picture

Version: 8.8.x-dev » 8.7.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 22f6783 and pushed to 8.8.x. Thanks!

c/p to 8.7.x

  • larowlan committed abb4887 on 8.7.x
    Issue #3081679 by eiriksm: AjaxResponse::getCommands has wrong return...

Status: Fixed » Closed (fixed)

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