Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#3 | 3081679.patch | 630 bytes | eiriksm |
Comments
Comment #2
eiriksmComment #3
eiriksmOops, realized I also added a mode change for my services.yml file. Updated patch
Comment #4
init90Looks correct.
Comment #6
larowlanCommitted 22f6783 and pushed to 8.8.x. Thanks!
c/p to 8.7.x