fix: #3621167 Seed the AI Context items through AiContextItem::setScope()

Closes #3621167.

src/AiFigmaInstaller.php writes a grouped scope_id => [value, ...] array into the AI Context item's scope field. Since drupal/ai_context 1.0.0-beta5 (https://www.drupal.org/i/3586405) that field is a multi-value scope_id + value field, so the write throws InvalidArgumentException. The exception is caught and logged as a warning, so the recipe reports success while no AI Context item is ever created.

This routes both write sites through AiContextItem::setScope(), which takes the grouped array on both sides of the beta5 change, with a fallback to set('scope', ...) when the method is absent. The drupal/ai_context constraint is unchanged.

Same fix as varbase_ai_figma #3621159 / MR !11.

AI-Generated: Yes

Checkpoints

  • File an issue about this project
  • Addition/Change/Update/Fix to this project
  • Testing to ensure no regression
  • Automated unit/functional testing coverage
  • Developer Documentation support on feature change/addition
  • User Guide Documentation support on feature change/addition
  • UX/UI designer responsibilities
  • Accessibility and Readability
  • Reviewed by a human
  • Code review by maintainers
  • Full testing and approval
  • Credit contributors
  • Review with the product owner
  • Update Release Notes
  • Release
Edited by Rajab Natshah

Merge request reports

Loading
Loading