Issue #3589970: Make $webform nullable in applyWorkflowQueryFilters()

Summary

When the global webform submission entity list is rendered via core's EntityListController (e.g. /admin/structure/webform/submissions/manage), there is no specific webform context. WebformSubmissionWorkflowListBuilder::getQuery() passes $this->webform (NULL in this path) to ResultsFilterHooks::applyWorkflowQueryFilters(), whose third argument is typed non-nullable WebformInterface, producing a fatal TypeError on every request to that route.

Change

Single-character signature change plus the docblock update.

-  public static function applyWorkflowQueryFilters(array &$data, array $query_strings, WebformInterface $webform): void {
+  public static function applyWorkflowQueryFilters(array &$data, array $query_strings, ?WebformInterface $webform): void {

The method's only use of $webform is the delegated call to WebformSubmissionStorageInterface::addQueryConditions(), whose own signature already accepts ?WebformInterface $webform = NULL (see WebformSubmissionStorageInterface.php:239), so NULL propagates safely through the existing code path.

Test plan

  • Visit /admin/structure/webform/submissions/manage — page rendered, no TypeError, list of submissions visible.
  • Visit a per-webform submission list (/admin/structure/webform/manage/X/results/submissions) — still works, workflow query string filters still applied.
  • phpcs --standard=Drupal,DrupalPractice clean.

Merge request reports

Loading