Skip to content

Conversation

@amayer5125
Copy link
Contributor

This fixes the notice I get when running the queue worker on PHP 8.1.

Notice: Deprecated (8192): Return type of Cake\Queue\Job\Message::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

* @return mixed
*/
public function jsonSerialize()
public function jsonSerialize(): mixed
Copy link
Member

@othercorey othercorey Mar 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to add the \ReturnTypeWillChange attribute instead to support PHP 7.

@othercorey othercorey added this to the 1.0.0 milestone Mar 13, 2022
@othercorey othercorey merged commit aed83ab into cakephp:master Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants