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

[8.0] Fix Utils::json*() for native \JSON_THROW_ON_ERROR option #3184

Merged
merged 1 commit into from
Mar 31, 2024

Conversation

TimWolla
Copy link
Contributor

@TimWolla TimWolla commented Oct 5, 2023

If a user passes the native \JSON_THROW_ON_ERROR option, these functions would throw a \JsonException instead of the expected \InvalidArgumentException.

If a user passes the native `\JSON_THROW_ON_ERROR` option, these functions
would throw a `\JsonException` instead of the expected
`\InvalidArgumentException`.
@TimWolla
Copy link
Contributor Author

TimWolla commented Oct 5, 2023

Oh, this only exists as of PHP 7.3. Would you consider it appropriate to drop support for PHP 7.2? It's at 1.8% for Guzzle 7 as per: https://packagist.org/packages/guzzlehttp/guzzle/php-stats#7

@GrahamCampbell
Copy link
Member

We can consider this for Guzzle 8. AWS and others need Guzzle 7 to retain PHP 7.2 support. We're also still fighting to get people to upgrade from Guzzle 5 and 6, so dropping more PHP versions is just gonna make it harder, or give us two 7.x lines to provide security fixes for.

@GrahamCampbell GrahamCampbell added this to the 8.0.0 milestone Jan 1, 2024
@GrahamCampbell GrahamCampbell changed the base branch from 7.8 to 8.0 March 31, 2024 13:15
@GrahamCampbell GrahamCampbell changed the title Fix Utils::json*() for native \JSON_THROW_ON_ERROR option [8.0] Fix Utils::json*() for native \JSON_THROW_ON_ERROR option Mar 31, 2024
@GrahamCampbell GrahamCampbell merged commit db32c20 into guzzle:8.0 Mar 31, 2024
29 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants