Vscode-intelephense: Possibly specify PHP version - Thinks "mysql" function is still a thing

Created on 11 Apr 2019  路  2Comments  路  Source: bmewburn/vscode-intelephense

I have a function that I use quite heavily named "mysql" that just executes a query. This was implemented way after the built-in mysql function was deprecated and removed (I think back in like PHP 4), but recently I'm getting errors about how it expected 3 required arguments and I've only given 1 or 2.

image

image

if (!strempty($Hash['se'] ?? '')) {
    $SentEmailData = mysql("select`SentEmailID`from`sentemails`where`_SentEmailID+SHA256`=@@SentEmailID_SHA256;", $Hash['se']);
}

My mysql function is defined like

function mysql($MySQL, $Parameters = [], ?int $Options = null, ?bool $SlowLogging = null, ?bool $Inline = null, ?bool $Cache = null, ?bool $ErrorLogging = null, ?bool $Logging = null): array {
    // ...
    return [];
}

It even shows the function doc it thinks I'm trying to call, which clearly isn't being used here in PHP7.2
image

resolved in 1.0.14

Most helpful comment

In the next release I've removed mysql from the default stubs that are loaded seeing as though it is no longer included with PHP since 7. You can configure the stubs as required with the intelephense.stubs setting. For a list of all stubs see the phpstorm-stubs github repo.

All 2 comments

In the next release I've removed mysql from the default stubs that are loaded seeing as though it is no longer included with PHP since 7. You can configure the stubs as required with the intelephense.stubs setting. For a list of all stubs see the phpstorm-stubs github repo.

I guess it isn't a high priority thing after php 5.6.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

steven7mwesigwa picture steven7mwesigwa  路  4Comments

ottopic picture ottopic  路  3Comments

vanasis picture vanasis  路  4Comments

usrnm-nk picture usrnm-nk  路  3Comments

pseudoanime picture pseudoanime  路  3Comments