vscode-intelephense icon indicating copy to clipboard operation
vscode-intelephense copied to clipboard

\mysqli_sql_exception->getSqlState()

Open nunoperalta opened this issue 3 years ago • 4 comments

\mysqli_sql_exception->getSqlState() is now a public function, since PHP 8.1.2. https://www.php.net/manual/en/class.mysqli-sql-exception.php

I have set "intelephense.environment.phpVersion": "8.1.2"

but it still shows:

Undefined method 'getSqlState'.intelephense(1013)

nunoperalta avatar Feb 03 '22 05:02 nunoperalta

Needs a PR upstream at https://github.com/JetBrains/phpstorm-stubs/blob/master/mysqli/mysqli.php

bmewburn avatar Feb 15 '22 07:02 bmewburn

Thanks. I can't figure out how to open an Issue/Request with them. They have GitHub Issues disabled.

nunoperalta avatar Feb 15 '22 16:02 nunoperalta

Reported here now: https://youtrack.jetbrains.com/issue/WI-67525/phpstorm-stubs-mysqlisqlexception-getSqlState

nunoperalta avatar Jul 12 '22 03:07 nunoperalta

@bmewburn - just got a response from Jetbrains.

Correct me if I am wrong but isn't it in stubs already? https://github.com/JetBrains/phpstorm-stubs/blob/master/mysqli/mysqli.php#L35

I've updated:

"intelephense.environment.phpVersion": "8.1.8",

let Intelephense re-index the codebase, and it's still showing as undefined to me.

image

nunoperalta avatar Jul 12 '22 04:07 nunoperalta

This is still giving errors to me.

image

nunoperalta avatar Oct 25 '22 04:10 nunoperalta

This is resolved in 1.9.0 as you updated the stubs. Thanks!

nunoperalta avatar Jan 01 '23 15:01 nunoperalta