Error while installation of module

Created on 4 June 2024, 6 months ago
Updated 11 June 2024, 5 months ago

when I try to install module, it throws following error:

Fatal error: Declaration of Drupal\date_recur_search_api\Plugin\ComputedField\DateOccurrence::attachAsBundleField(&$fields, Drupal\Core\Entity\EntityTypeInterface $entity_type, string $bundle): void must be compatible with Drupal\computed_field\Plugin\ComputedField\ComputedFieldBase::attachAsBundleField($fields, Drupal\Core\Entity\EntityTypeInterface $entity_type, string $bundle): bool in D:\laragon\www\june3\web\modules\contrib\date_recur_search_api\src\Plugin\ComputedField\DateOccurrence.php on line 41

I' m also attaching image of the error.

🐛 Bug report
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

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

Merge Requests

Comments & Activities

  • Issue created by @praveen rani
  • Merge request !2Update DateOccurrence.php → (Open) created by praveen rani
  • Issue was unassigned.
  • Status changed to Needs review 6 months ago
  • Hi @joachim for above issue I have created MR. Please review it.

    Thank You.

  • Status changed to Closed: works as designed 6 months ago
  • 🇬🇧United Kingdom joachim

    I think you're on a version of CF that's too old. The return was changed from bool to void.

    And it's a good idea to read the docs before making an MR! This return value meaning is totally fictional!

    > // Return true to indicate the fields were successfully attached.

  • Status changed to Active 5 months ago
  • I also encountered this issue. After looking into it I see that the alpha9 release which is the latest release still has a bool return type.

    The dev branch has the change to void.

    Until Computed Fields has a new release I'll try out using the dev branch.

  • 🇬🇧United Kingdom joachim

    Ah my mistake -- I thought I'd made a new release of Computed Fields.

    I was holding off because there's one more thing I want to fix and then I'm making a beta!

  • Status changed to Closed: works as designed 5 months ago
  • 🇬🇧United Kingdom joachim

    Made a new release of CF. Should all work now!

Production build 0.71.5 2024