Skip to content

PHP 8.1 JsonSerialize deprecation #8

@detantfa

Description

@detantfa

The update to PHP 8.1 brings the following error.

image

Deprecated function: Return type of Ticketmatic\Model\Event::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in include() (line 51 of /var/www/html/vendor/ticketmatic/phpsdk/lib/Model/Event.php).

To reproduce this, simply update your local environment to PHP 8.1 and on the page where the library is called, the error appears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions