Skip to content

[REQ] Guzzle::json_encode is deprecated since Guzzle 7.15 #24641

Description

@FreekVR

Is your feature request related to a problem? Please describe.

Guzzle 7.15 (released 3 weeks ago): https://github.com/guzzle/guzzle/releases deprecated the Utils::jsonDecode() and Utils::jsonEncode() along with the release of the new major v8. Any project with Guzzle versions above this will report deprecation warnings. Guzzle 8 is already available and this is a required step to prepare for that eventual upgrade.

The current PHP generator implements this in the API file generator, perhaps also elsewhere although we didn't hit any deprecations apart from these classes.

Describe the solution you'd like

Replace the jsonDecode and jsonEncode with their native counterparts as suggested in the Guzzle deprecation note (eg \json_encode() and \json_decode())

Describe alternatives you've considered

None - these follow the directives in the Guzzle upgrade guide.

Additional context

https://github.com/guzzle/guzzle/blob/8.0/UPGRADING.md#removed-function-and-json-helper-apis

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions