PHP 8.1 Deprecated function

Created on 31 January 2023, almost 2 years ago
Updated 31 May 2023, over 1 year ago

Problem/Motivation

The iCal library this module uses needs upgrading to a more recent version that supports 8.1 to prevent deprecated function notices.

Deprecated function: Return type of Eluceo\iCal\PropertyBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 14 of /var/www/html/vendor/eluceo/ical/src/PropertyBag.php).
include('/var/www/html/vendor/eluceo/ical/src/PropertyBag.php') (Line: 571)
Composer\Autoload\includeFile('/var/www/html/vendor/composer/../eluceo/ical/src/PropertyBag.php') (Line: 428)
Composer\Autoload\ClassLoader->loadClass('Eluceo\iCal\PropertyBag') (Line: 247)
Eluceo\iCal\Component\Calendar->buildPropertyBag() (Line: 97)
Eluceo\iCal\Component->build() (Line: 125)
Eluceo\iCal\Component->render() (Line: 260)

Steps to reproduce

Create an ical feed with the wizard on PHP8.1 and view it.

Proposed resolution

Upgrade the library in composer.json to 0.17.0.

I can see another issue relating to upgrading to V2 of the library but in the absence of that being done, just upgrading to 0.17.0 will fix this issue.

If anyone is interested in a short term fix you can upgrade the library by using an alias:

composer require "eluceo/ical:0.17.0 as 0.15.1"

πŸ› Bug report
Status

Fixed

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom very_random_man

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

Comments & Activities

Production build 0.71.5 2024