PHP8.1 compatibility problems

Created on 26 April 2023, almost 2 years ago
Updated 8 May 2023, almost 2 years ago

PHP8.1 compatibility problems

Phpstan tool found some deprecation issues, that are not ok for php8.1. All of the same kind: "the return type of method is not covariant with tentative return type of parent method". Php8.1 requires declaration of return type otherwise you will get the deprecation notice.

Problems are located in these files:
crumbs/lib/Container/MultiWildcardData.php
crumbs/lib/Container/MultiWildcardDataIterator.php
crumbs/lib/PluginSystem/PluginMethodIterator.php

Proposed resolution

Use the #[\ReturnTypeWillChange] attribute to temporarily suppress the error.
The patch will follow in the comment.

πŸ› Bug report
Status

Closed: duplicate

Version

2.3

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024