- Issue created by @cboyden
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 6:22pm 13 October 2023 - last update
about 1 year ago 5 pass
When running on PHP 8.1, this module generates PHP deprecated function errors. Some examples:
Deprecated function: Return type of FieldChain::seek($position) should either be compatible with SeekableIterator::seek(int $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 12 of cer/field_object/includes/FieldChain.inc).
Deprecated function: Return type of FieldChain::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 12 of cer/field_object/includes/FieldChain.inc).
Deprecated function: Return type of FieldChain::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 12 of cer/field_object/includes/FieldChain.inc).
Deprecated function: Return type of FieldChain::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 12 of cer/field_object/includes/FieldChain.inc).
Deprecated function: Return type of FieldChain::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 12 of cer/field_object/includes/FieldChain.inc).
Deprecated function: Return type of FieldChain::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 12 of cer/field_object/includes/FieldChain.inc).
Deprecated function: Return type of CerFieldHandler::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 14 of cer/includes/CerFieldHandler.inc).
Deprecated function: Return type of CerFieldHandler::seek($position) should either be compatible with SeekableIterator::seek(int $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 14 of cer/includes/CerFieldHandler.inc).
Deprecated function: Return type of CerFieldHandler::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 14 of cer/includes/CerFieldHandler.inc).
Deprecated function: Return type of CerFieldHandler::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 14 of cer/includes/CerFieldHandler.inc).
Deprecated function: Return type of CerFieldHandler::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 14 of cer/includes/CerFieldHandler.inc).
Deprecated function: Return type of CerFieldHandler::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 14 of cer/includes/CerFieldHandler.inc).
Deprecated function: Return type of CerFieldHandler::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 14 of cer/includes/CerFieldHandler.inc).
Deprecated function: Return type of FieldHierarchy::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include_once() (line 8 of cer/field_object/includes/FieldHierarchy.inc).
Add the #[\ReturnTypeWillChange] annotation to these functions, so that they will be compatible with PHP 8.1 and also backwards-compatible with earlier PHP versions.
Patch and test.
None.
None.
None.