Fix PHP 8.1 compatibility issues

Created on 4 August 2022, almost 2 years ago
Updated 29 January 2023, over 1 year ago

The module has some compatibility problems with PHP 8.1 which were identified in the Date module.

Date.DateMigrateTestCase
βœ—	
include_once
exception: [Deprecated] Line 15 of sites/all/modules/migrate/includes/source.inc:
Return type of MigrateSource::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

exception: [Deprecated] Line 15 of sites/all/modules/migrate/includes/source.inc:
Return type of MigrateSource::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

exception: [Deprecated] Line 15 of sites/all/modules/migrate/includes/source.inc:
Return type of MigrateSource::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

exception: [Deprecated] Line 15 of sites/all/modules/migrate/includes/source.inc:
Return type of MigrateSource::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

exception: [Deprecated] Line 15 of sites/all/modules/migrate/includes/source.inc:
Return type of MigrateSource::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

exception: [Deprecated] Line 864 of sites/all/modules/migrate/plugins/sources/xml.inc:
Return type of MigrateXMLReader::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

exception: [Deprecated] Line 864 of sites/all/modules/migrate/plugins/sources/xml.inc:
Return type of MigrateXMLReader::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

exception: [Deprecated] Line 864 of sites/all/modules/migrate/plugins/sources/xml.inc:
Return type of MigrateXMLReader::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

exception: [Deprecated] Line 864 of sites/all/modules/migrate/plugins/sources/xml.inc:
Return type of MigrateXMLReader::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

exception: [Deprecated] Line 864 of sites/all/modules/migrate/plugins/sources/xml.inc:
Return type of MigrateXMLReader::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

exception: [Deprecated] Line 3567 of includes/bootstrap.inc:
Return type of MigrateSQLMap::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

exception: [Deprecated] Line 3567 of includes/bootstrap.inc:
Return type of MigrateSQLMap::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

exception: [Deprecated] Line 3567 of includes/bootstrap.inc:
Return type of MigrateSQLMap::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

exception: [Deprecated] Line 3567 of includes/bootstrap.inc:
Return type of MigrateSQLMap::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

exception: [Deprecated] Line 3567 of includes/bootstrap.inc:
Return type of MigrateSQLMap::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

  • PHP 8.2

    The issue particularly affects sites running on PHP version 8.2.0 or later.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024