Skip to content

Deprecation Warnings Encountered with PHP 8.1 / Symfony 6.4 #11

Description

@TipPro

A few deprecation warnings I encountered while running PHP 8.1. Raising this issue to help ensure future compatibility.

Environment:

PHP Version: 8.1
mivaecommerce/api-sdk-php Version: 2.7
Symfony Version: 6.4

Deprecation Notices:

I observed the following deprecation warnings, primarily in the Symfony logs/profiler during application use:

  1. Regarding RequestInterface change:
    User Deprecated: The "MerchantAPI\Request::setBinaryEncoding()" method will require a new "?string $encoding" argument in the next major version of its interface "MerchantAPI\RequestInterface", not defining it is deprecated.

  2. Regarding JsonSerializable return type in MerchantAPI\Request:
    User Deprecated: Method "JsonSerializable::jsonSerialize()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "MerchantAPI\Request" now to avoid errors or add an explicit @return annotation to suppress this message.

  3. Regarding JsonSerializable return type in MerchantAPI\Model:
    User Deprecated: Method "JsonSerializable::jsonSerialize()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "MerchantAPI\Model" now to avoid errors or add an explicit @return annotation to suppress this message.

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