phpinspectionsea icon indicating copy to clipboard operation
phpinspectionsea copied to clipboard

JSON encoding API usage Harden errors handling vs PHP 8 named parameters

Open InvisibleSmiley opened this issue 5 years ago • 3 comments

Subject Details
Plugin Php Inspections (EA Extended) 4.0.6
Language level PHP 8

Example code

json_decode("{}", options: JSON_THROW_ON_ERROR);

Current behaviour

Suggestion to modify the code. Applying the suggestion produces wrong code.

Expected behaviour

No suggestion to modify code, no ability to apply suggestion producing wrong code.

Environment details

PhpStorm 2020.3 EAP Build #PS-203.4203.36, built on October 1, 2020 Runtime version: 11.0.8+10-b1098.1 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0

InvisibleSmiley avatar Oct 01 '20 15:10 InvisibleSmiley

I "up" for this issue :slightly_smiling_face:.

jazithedev avatar Sep 22 '21 06:09 jazithedev

any updates?

vvval avatar Oct 11 '21 11:10 vvval

+1

ghost avatar May 20 '25 15:05 ghost

Thank you for reporting @InvisibleSmiley ! Fixed in #1977.

ea-inspections-team avatar Jun 05 '25 17:06 ea-inspections-team