Remove assertion in `ComputedUrlWithQueryString::calculateDependencies()` to allow contrib reuse

Created on 14 October 2025, 16 days ago
Updated 15 October 2025, 14 days ago

Overview

Update the calculateDependencies() method of class ComputedUrlWithQueryString class to prevent error when used by other contributed modules.

As part of ticket 📌 Decouple image (URI) shape matching from specific image file types/extensions Active , the ComputedUrlWithQueryString class was refactored to allow other contributed modules (e.g., Acquia DAM) to use it directly, eliminating the need to copy its code. An assert was removed to improve reusability, but the calculateDependencies() method was missed to be updated accordingly. This causes an error when the method is invoked:

AssertionError: assert($url_prop_expression instanceof ReferenceFieldTypePropExpression) in assert() (line 85 of /var/www/html/web/modules/contrib/canvas/src/Plugin/DataType/ComputedUrlWithQueryString.php).
📌 Task
Status

RTBC

Version

1.0

Component

Code

Created by

🇮🇳India vishalkhode

Live updates comments and jobs are added and updated live.
  • Contributed project blocker

    It denotes an issue that prevents porting of a contributed project to the stable version of Drupal due to missing APIs, regressions, and so on.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024