#3591764: Make Canvas test suite pass on 11.4; drop support for 11.2

Drupal 11.4 compatibility — MR overview

Makes Canvas pass on Drupal 11.4 while keeping 11.3 green (both run in CI), and bumps the minimum to ^11.3 (drops 11.2). Almost all changes are test expectations reacting to upstream core changes; two are product fixes.

Canvas-only changes (not forced by a specific core issue)

  • Version-gating style: >= 11.4 checks (with the 11.3 path as the special case) so the legacy code is easy to grep and delete once 11.3 support is dropped.
  • Minimum core ^11.3; all 11.2 references removed.
  • Reverted the temporary local article_content_type test recipe to cut MR size (added while core #3587118 was in flight; https://www.drupal.org/project/drupal/releases/11.4.1 then allowed reverting).

Testing

  • CI runs phpunit (11.3 …) and phpunit (11.4 …); both must stay green.
  • Verified locally on real 11.3.10 and 11.4.0 installs.

Upstream core changes that forced Canvas to change

Each row: Canvas area, the core issue, the core commit, its change record, and the Canvas impact.

Ordered by impact (product/runtime changes first, then by breadth of the test surface touched). ~LoC = approximate Canvas lines changed (insertions + deletions across the relevant commits).

# Canvas area ~LoC Core issue Commit CR Canvas impact (<50 words)
1 Content templates (Field UI integration) — product ~40 #3564234 Display-mode overview page 987768ba #3574383 "Manage display" is now a display-builder-agnostic overview (route entity.entity_view_display_overview.node) + an "Overview" tab. Product: ContentTemplateHooks::menuLocalTasksAlter() adds ContentTemplate cacheability on that route. CanvasTemplateDisplayTest accounts for the extra tab.
2 Auto-save (Internal HTTP API) — product ~25 #1499532 Respect explicit path alias langcode 6c3a9c494ee ⚠️ missing! The path widget dropped its langcode element. ApiLayoutControllerPatchTest drops path[0][langcode]. Also surfaced a Canvas bug — product: AutoSaveManager::normalizeEntity() now ignores empty path aliases, avoiding spurious auto-saves.
3 Config entities & validation (Data model) ~115 #3555534 symfony/validator 7.4: init constraint options in constructor 2f828800373 #3554746 ImmutableProperties is now declared/read as nested ['properties' => [...]]. Canvas config entities declare it nested; validation tests read ['properties'].
4 Internal HTTP API (shared test infra) ~65 #3451483 Dynamic Page Cache header for 4xx/5xx b00e9a89eab #3584640 4xx/5xx now report UNCACHEABLE (<status>). HttpApiTestBase version-gates the expected X-Drupal-Dynamic-Cache: on <11.4, 401/403 (thrown before the subscriber) expect no header, other 4xx/5xx expect UNCACHEABLE (no cacheability).
5 Functional test setup ~15 #3587118 Remove content types from standard profile b1939f63c86 #3590571 The article node type is no longer installed by the standard profile. EntityFormControllerTest creates it (with an image field so the form is multipart/form-data).
6 Config validation (field default values) ~10 #3541535 field_config_base fully validatable b9da335854b ⚠️ missing! Field config is now FullyValidatable, so a component_tree default value's missing keys emit extra "is a required key because field_type is component_tree" errors. DefaultFieldValueTest version-gates the expected messages.
7 Page variant & cacheability ~35 #3341042 Only the list cache tag for block config entities 2db4214058a ⚠️ missing! Blocks now expose only config:block_list, dropping per-block config:block.block.* and block_view. CanvasPageVariantTest / CanvasPageVariantEnableTest version-gate those tags.
8 Component sources (Block) ~50 #3547808 label_display value (+ #3555534/#3555535 constraint reformatting) b59cf67292f ⚠️ missing! 11.4 changed the block.settings.* config schema, so block component version hashes differ. ComponentInputsEvolutionTest + BlockComponentTreeSchemaUpdateTestTrait hardcode per-version hashes.
9 Component sources (code components) & prop shapes ~50 #3352063 SDC schema $ref references (+ #3554720) 2055107f551 #3591541 ComponentMetadata now emits object-prop example values in the schema's declared properties order (src, alt, width, height) rather than authored order. JsComponentTest version-gates the resolved image key order.
10 Shape matching (field props) ~10 #3066751 resolvable_uri on LinkItem 014ef571d6d #3143736 LinkItem gained a computed resolvable_uri property (unmappable to a field prop source). FieldInstanceSupportTest marks it known-unsupported and version-gates the support ratio.
11 Component sources (SDC discovery) ~30 #3559156 Support Twig's CVA function 134cf9f7a9d #3581193 Adds cva + input example components to the sdc_theme_test theme. SingleDirectoryComponentTest discovers them (excluded from the detailed dependent assertions).
12 Test fixtures ~55 #3587564 Move search from node to Search module fa9f7873fdb #3590298 The search_index / search_result view modes are gone. Test fixtures / expected view-mode lists updated.

Closes #3591764

Edited by Wim Leers

Merge request reports

Loading