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.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | openai-OpenAIActionBase_return_type-3450196-6.patch | 835 bytes | liam morland |
Issue fork openai-3450196
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
Comment #2
ioanmar commentedComment #4
ioanmar commentedComment #5
kopeboyThat MR removed the error and made openai_eca usable, thank you!
Comment #6
liam morlandThis patch contains the contents of the merge request.
Comment #7
thejimbirch commented+1 for RTBC.
WSOD before the patch.
Fixed after applying the patch, and can use ECA again.