Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

laminas-json is abandoned #177

Closed
matbech opened this issue Nov 28, 2024 · 1 comment · Fixed by #178
Closed

laminas-json is abandoned #177

matbech opened this issue Nov 28, 2024 · 1 comment · Fixed by #178

Comments

@matbech
Copy link
Contributor

matbech commented Nov 28, 2024

laminas-json is abandoned and should be removed from the implementation in AbstractRestfulController and from the 'require-dev' section in composer.json.
Reason: json_decode is available in all supported PHP versions.

Warning when running composer:
Package laminas/laminas-json is abandoned, you should avoid using it. No replacement was suggested.

composer.json

    "require-dev": {
        "laminas/laminas-coding-standard": "^2.5.0",
        "laminas/laminas-json": "^3.6",
        "phpunit/phpunit": "^10.5.38",
        "webmozart/assert": "^1.11"
    },
@froschdesign
Copy link
Member

@matbech
Help is welcome at any time! 😃 👍🏻

protected function jsonDecode($string)
{
if (function_exists('json_decode')) {
return json_decode($string, (bool) $this->jsonDecodeType);
}
if (class_exists(Json::class)) {
return Json::decode($string, (int) $this->jsonDecodeType);
}
throw new DomainException(sprintf(
'Unable to parse JSON request, due to missing ext/json and/or %s',
Json::class
));
}

@gsteel gsteel linked a pull request Nov 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants