Return type declaration error for Drupal\openai_eca\Plugin\Action\OpenAIActionBase::create

Created on 27 May 2024, 30 days ago
Updated 16 June 2024, 10 days ago

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.

🐛 Bug report
Status

RTBC

Version

1.0

Component

Code

Created by

🇬🇧United Kingdom ORION web

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.69.0 2024