LogicException on content templates with dynamic field bindings after upgrading from 1.4.1 to 1.5.1
### Overview After upgrading Canvas from `1.4.1` to `1.5.1`, content templates that bind a component prop to an entity field can no longer be loaded or saved: opening an affected content template throws `LogicException: Missing the keys expression.` (from `EntityFieldPropSource::parse()`). Reported and independently confirmed by two sites in MR !1223. A separate config schema validation failure on `Fallback` components, originally reported here, has been split out to #3591685. ### Steps to reproduce 1. In a content template, bind a single-value component prop to an entity field (a dynamic `entity-field` prop source — only content templates permit these; the default component tree forbids them). 2. Trigger any change that bumps the component's version hash. A module or Canvas upgrade does this across all instances. 3. Open or save the content template. ### Root cause **Input corruption during version update — regression introduced by #3587024+.** When a component instance is projected onto a new version, `JsonSchemaPropsComponentInstanceUpdater::update()` truncates array inputs that exceed the new cardinality. The check only tests `is_array()` and element count — it does not distinguish a multi-value list of values from a single dynamic prop source, which is itself an associative array (`['sourceType' => …, 'expression' => …, …]`). This is broader than "maxItems was tightened". Because `StorablePropShape::DEFAULT_CARDINALITY` is `1`, any single-value prop bound to a dynamic source has an input whose element count (≥ 2 keys) exceeds the cardinality. The slice keeps only the first key and drops `expression`, so the next parse throws. It triggers on any version change that runs the updater, not only on cardinality reductions. ### Proposed resolution Skip cardinality slicing when the input is a single prop source (an associative array carrying a `sourceType` key) rather than a list of values. A patch is attached and turned into MR !1223. It resolves the symptom on affected sites but has not been reviewed and ships with no test coverage yet. ### Remaining tasks - Review the approach in MR !1223 against the broader root-cause framing above. - Add regression coverage in `JsonSchemaPropsComponentInstanceUpdaterTest` for a single-value prop bound to a dynamic (`entity-field`) source across a version update — the existing data provider only uses static sources, which is why the bug went uncaught. ### User interface changes None. --- *AI use disclosed per [Drupal.org policy](https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquette/policy-on-the-use-of-ai-when-contributing-to-drupal): the original report and patch were AI-assisted; this summary was revised with AI assistance after verifying the root cause against the `1.x` source.*
issue