Skip to content

[bug]: version 3.3.2 does not support PHP 7.2? #757

@dosinabox

Description

@dosinabox

Description

Version 3.3.2 claims to support PHP 7.2:

"require": {
    "php": "^7.2 || ^8.0",

However, it uses constants and features that are only available starting from PHP 7.3:

$parameters[$key] = json_encode($value, JSON_THROW_ON_ERROR);

As a result, this triggers two warnings on every search request when running on PHP 7.2.34.

Client

Search

Version

3.3.2

Relevant log output

Warning: Use of undefined constant JSON_THROW_ON_ERROR - assumed 'JSON_THROW_ON_ERROR' (this will throw an Error in a future version of PHP) in /xxx/vendor/algolia/algoliasearch-client-php/src/Support/Helpers.php on line 138
Warning: json_encode() expects parameter 2 to be integer, string given in /xxx/vendor/algolia/algoliasearch-client-php/src/Support/Helpers.php on line 138

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions