geerlingguy / geerlingguy/drupal-for-kubernetes

error php

Open
#56 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
177
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Hello I have the following error.
Do you know how to solve it because I did not find.
I use PHP8.1 fpm on debian 11
Thank you in advance for your answers.

Wed Jun 29 10:36:01.159405 2022] [proxy_fcgi:error] [pid 21923:tid 140473356224256] [client 172.16.1.254:62631] AH01071: Got error 'PHP message: PHP Deprecated: Return type of Drupal\\Core\\Render\\Markup::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/drupal/web/core/lib/Drupal/Component/Render/MarkupTrait.php on line 71PHP message: PHP Deprecated: Return type of Drupal\\Core\\Render\\Markup::count() should either be compatible with Countable::count(): int, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/drupal/web/core/lib/Drupal/Component/Render/MarkupTrait.php on line 61'
[Wed Jun 29 10:36:01.232020 2022] [proxy_fcgi:error] [pid 21923:tid 140473339438848] [client 172.16.1.254:62631] AH01071: Got error 'PHP message: PHP Deprecated: Return type of Drupal\\Core\\Render\\Markup::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/drupal/web/core/lib/Drupal/Component/Render/MarkupTrait.php on line 71PHP message: PHP Deprecated: Return type of Drupal\\Core\\Render\\Markup::count() should either be compatible with Countable::count(): int, or the #[\\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/drupal/web/core/lib/Drupal/Component/Render/MarkupTrait.php on line 61', referer: http://xxx.xxx/

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with Drupal/Component/Render/MarkupTrait.php at lines 61 and 71, then compare the reported Countable and JsonSerializable return-type requirements with PHP 8.1. Reproduce the messages in the reported PHP-FPM environment; done means the deprecation notices no longer appear.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.