Problem/Motivation

The following three errors are displayed when trying to add a new ECA model under /admin/config/workflow/eca and on the resulting screen /admin/config/workflow/eca/add/bpmn-io (BPMN is the modeller I've added and enabled for ECA).

Error: ECA ran into error from third party in the context of "Collecting all available events": Declaration of Drupal\openai_eca\Plugin\Action\OpenAIActionBase::create(Symfony\Component\DependencyInjection\ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): Drupal\eca\Plugin\Action\ActionBase must be compatible with Drupal\eca\Plugin\Action\ActionBase::create(Symfony\Component\DependencyInjection\ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): static

Error: ECA ran into error from third party in the context of "Collecting all available conditions": Declaration of Drupal\openai_eca\Plugin\Action\OpenAIActionBase::create(Symfony\Component\DependencyInjection\ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): Drupal\eca\Plugin\Action\ActionBase must be compatible with Drupal\eca\Plugin\Action\ActionBase::create(Symfony\Component\DependencyInjection\ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): static

Error: ECA ran into error from third party in the context of "Collecting all available actions": Declaration of Drupal\openai_eca\Plugin\Action\OpenAIActionBase::create(Symfony\Component\DependencyInjection\ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): Drupal\eca\Plugin\Action\ActionBase must be compatible with Drupal\eca\Plugin\Action\ActionBase::create(Symfony\Component\DependencyInjection\ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition): static

Steps to reproduce

The following modules are enabled, version 2.0.0-beta1:

  • OpenAI Core version 1.0.0-beta5
  • OpenAI ChatGPT ECA version 1.0.0-beta5
  • ECA Core version 2.0.0-beta1
  • ECA Content version 2.0.0-beta1
  • ECA UI version 2.0.0-beta1
  • ECA BPMN version 2.0.0-beta1
  • BPMN.iO for ECA version 2.0.0-beta1

Upon trying to add a new ECA model, the errors above occur.

Proposed resolution

Changing the return type declaration of \Drupal\openai_eca\Plugin\Action\OpenAIActionBase::create from ActionBase to static.

Issue fork openai-3450196

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

ioanmar created an issue. See original summary.

ioanmar’s picture

Assigned: Unassigned » ioanmar

ioanmar’s picture

Assigned: ioanmar » Unassigned
Status: Active » Needs review
kopeboy’s picture

Status: Needs review » Reviewed & tested by the community

That MR removed the error and made openai_eca usable, thank you!

liam morland’s picture

Version: 1.0.0-beta5 » 1.0.x-dev
StatusFileSize
new835 bytes

This patch contains the contents of the merge request.

thejimbirch’s picture

+1 for RTBC.

WSOD before the patch.

Fixed after applying the patch, and can use ECA again.