PHP 8.1: deprecated function warnings due to missing return type

Created on 6 April 2023, about 1 year ago
Updated 24 October 2023, 8 months ago

Problem/Motivation

In certain configurations, Facet API will trigger warnings under PHP 8.1+ such as:

Deprecated function: Return type of FacetapiFacet::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

Steps to reproduce

Proposed resolution

Add the #[\ReturnTypeWillChange] attribute to selected methods of FacetapiFacet.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada nedjo

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.

Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024