lint/php-8.3/prefer-json-validate
In the lint-recommended preset and every stricter one. In Rector’s rector/php-polyfills, rector/php83 sets. Safe fix. Runs only when [php] version is 8.3 or later.
What it does
Replace json_decode($json, true) !== null && json_last_error() === JSON_ERROR_NONE with json_validate()
Configuration
[lint.rules]
"php-8.3/prefer-json-validate" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
JsonValidate(rector)