Skip to content

[False positive] JSON_THROW_ON_ERROR is not recognized in named parameter call (PHP 8.0) #1725

Open
@niconoe-

Description

@niconoe-
Subject Details
Plugin Php Inspections (EA Extended) from 4.0.6.3 (still bugged in 4.0.7.1)
Language level PHP 8.0, PHP 8.1, PHP 8.2

Current behaviour

When calling json_decode with the flags: names parameter set to JSON_THROW_ON_ERROR, the plugin is rising an error about [EA] Please consider taking advantage of JSON_THROW_ON_ERROR flag for this call options.

image

Expected behaviour

Expected behaviour is "no error" as I am taking advantage of the Throwable behavior.

Environment details

PhpStorm 2021.1.2
Build #PS-211.7142.44, built on April 30, 2021
Subscription is active until February 22, 2022.
Runtime version: 11.0.10+9-b1341.41 amd64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
Linux 4.15.0-142-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 4
Registry: run.processes.with.pty=TRUE, ide.tooltip.initialDelay=600
Non-Bundled Plugins: au.com.glassechidna.luanalysis (1.2.3), manjaro.mpb (1.5), me.aristotll.python.typing.adder (1.1), mobi.hsz.idea.gitignore (4.1.0), org.plugin.dot.id (1.2), com.kalessil.phpStorm.phpInspectionsEA (4.0.6.3), de.espend.idea.php.annotation (8.0.0), PlantUML integration (5.3.0)
Current Desktop: Unity

Probably some actions have been already taken regarding #1555 or #1592 but those were not about PHP 8.0 and the ability to use a named parameter.

Thanks a lot 🙂

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions