crashes with Call to undefined method RRule\RSet::rewind()

Created on 18 March 2024, 4 months ago

Problem/Motivation

I have code which calls:

$iterator = $recur_field->first()->getHelper()
$iterator->rewind();

This causes this crash:

Error: Call to undefined method RRule\RSet::rewind() in Drupal\date_recur\Rl\RlHelper->rewind() (line 252 of modules/contrib/date_recur/src/Rl/RlHelper.php).

Drupal\date_recur\DateRecurHelper->rewind() (Line: 90)

The Iterator interface was removed from rlanvin/php-rrule's RSet class in commit 5a23f0e03b53a23d2190cf1f8f905f8118a3296c:

commit 5a23f0e03b53a23d2190cf1f8f905f8118a3296c
Author: rlanvin <remi@cloudconnected.fr>
Date:   Fri Oct 4 22:57:28 2019 +0100

    Remove Iterator interface implementation from RSet

    Was replaced by IteratorAggregate interface in v2.0

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Checklist βœ”

[[Remove this:] Replace ❌ with βœ” where applicable]

  • [ βŒ ] Changeset meets coding standards and project style guide β†’ .
  • [ βŒ ] Changeset has tests
  • [ βŒ ] Proposal has been discussed externally (Slack/IRC)
πŸ› Bug report
Status

Active

Version

3.5

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

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

Comments & Activities

Production build 0.69.0 2024