-
Notifications
You must be signed in to change notification settings - Fork 732
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
Prepare the road to \JsonException usage #1949
Conversation
47fce5e
to
5b15cc5
Compare
@@ -20,7 +20,8 @@ | |||
"elasticsearch/elasticsearch": "^7.1.1", | |||
"nyholm/dsn": "^2.0.0", | |||
"psr/log": "^1.0", | |||
"symfony/deprecation-contracts": "^2.2" | |||
"symfony/deprecation-contracts": "^2.2", | |||
"symfony/polyfill-php73": "^1.19" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems a bit overkill to have an additional dependency for a single exception change? What is the benefit of having JsonException
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For preparing smooth upgrade to native json_encode
and json_decode
functions with JSON_THROW_ON_ERROR
option (introduced in PHP 7.3) and fully get rid of Elastica\JSON
util class and JSONParseException
exception class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This extra polyfill package can be ignored on project side by using replace
composer feature.
For example that's what I use in many projects when they are running on modern PHP versions, this way these packages are not installed as they are useless:
"replace": {
"paragonie/random_compat": "*",
"ralouphie/getallheaders": "*",
"symfony/polyfill-apcu": "*",
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-intl-grapheme": "*",
"symfony/polyfill-intl-icu": "*",
"symfony/polyfill-intl-idn": "*",
"symfony/polyfill-intl-normalizer": "*",
"symfony/polyfill-mbstring": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-uuid": "*"
},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM. You have a conflict on the changelog.
5b15cc5
to
e2a074a
Compare
No description provided.