[ https://issues.apache.org/jira/browse/THRIFT-5753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17805907#comment-17805907 ]
Volodymyr Panivko commented on THRIFT-5753: ------------------------------------------- In current version of php many functions received more strict type hint, some functions become deprecated. It will be better to remove support of php5 and move to 7.4 for better compatibility in future. I think it's better to start with writing unit test for current realization and after that we can change code for 7.4 > PHP 8.1 deprecated warning about return type in jsonSerialize functions > ----------------------------------------------------------------------- > > Key: THRIFT-5753 > URL: https://issues.apache.org/jira/browse/THRIFT-5753 > Project: Thrift > Issue Type: Bug > Components: PHP - Library > Reporter: Pavel Kvach > Priority: Minor > Time Spent: 0.5h > Remaining Estimate: 0h > > In PHP 8.1 a "mixed" return type was added to the > "JsonSerializable::jsonSerialize()" method. > This triggers a deprecation warning for generated PHP classes: > {code:java} > Return type of TestClass::jsonSerialize() should either be compatible with > JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] > attribute should be used to temporarily suppress the notice in ...{code} -- This message was sent by Atlassian Jira (v8.20.10#820010)