Skip to content

PHPUnit suggestions shown for non-PHPUnit code #1999

@kAlvaro

Description

@kAlvaro
Subject Details
Plugin Php Inspections (EA Extended) 5.6.0
Language level PHP 8.4

Current behaviour

PHPUnit suggestions are offered based on method name only, so they don't make any sense outside PHPUnit context.

In the example below, it's suggestion a method that doesn't even exist:

Image

Expected behaviour

Suggestions should only be shown if the method belongs to PHPUnit. In this example, \PHPUnit\Framework\Assert::assertTrue().

Environment details

Information from Help - About dialog

PhpStorm 2025.3.2
Build #PS-253.30387.85, built on January 21, 2026
Source revision: 790528c506585
Licensed to <REDACTED>
Subscription is active until February 16, 2026.
Runtime version: 21.0.9+10-b1163.94 amd64 (JCEF 137.0.17)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 6.8.0-53-generic
Ubuntu 24.04.3 LTS; glibc: 2.39
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 4096M
Cores: 16
Registry:
  ide.browser.jcef.sandbox.enable=false
  debugger.watches.in.variables=false
  documentation.show.toolbar=true
  run.processes.with.pty=TRUE
Non-Bundled Plugins:
  com.intellij.classic.ui (253.28294.218)
  FrameSwitcher (4.10.0-243)
  lermitage.intellij.ilovedevtoys (1.11.1)
  Subversion (253.30387.92)
  ru.adelf.idea.dotenv (253.30387.92)
  org.jetbrains.junie (253.549.165)
  org.jetbrains.plugins.terminal (253.30387.92)
  com.github.deeepamin.gitlabciaid (1.14.0)
  String Manipulation (9.16.0)
  com.jetbrains.restClient (253.30387.92)
  izhangzhihao.rainbow.brackets (2025.3.6)
  com.kalessil.phpStorm.phpInspectionsEA (5.6.0)
  lv.midiana.misc.phpstorm-plugins.deep-keys (2022.08.03.001)
  net.king2500.plugins.PhpAdvancedAutoComplete (1.1.0)
  de.espend.idea.php.annotation (12.0.2)
  org.sonarlint.idea (11.11.0.83979)
  mobi.hsz.idea.gitignore (4.5.7)
  org.jetbrains.plugins.docker.gateway (253.30387.92)
Current Desktop: KDE

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