How does IntelliJ IDE w/ PHP plugin determine what version of library API to use?
Hi
I'm having a minor issue with phpdoc warnings with our memcached wrapper API. We are wrapping memcached with our own object. IntelliJ seems to think we're using memcached version 2.1.0 when in fact we are using version 2.2.0. There are some minor changes in memcached get/set between 2.1 and 2.2. I can't seem to discover how IntelliJ decides which version of memcache to use.
Environment: macOS Sierra 10.12.6, IntelliJ 2017.2 #IU-172.3317.76, PHP plugin installed (172.3317.83), PHP language level 5.6 (required for production), CLI interpreter 5.6.30, installation of memcached via brew of php56-memcachd (version 2.2.0_3)
I can disable these phpdoc warnings easily enough but I'd like to not have to do that. Any help appreciated.
Thanks
Jeff
请先登录再写评论。
Hi there,
I do not think it has more than one version of stubs.
But in any case: Ctrl+Click should show you the list of possible targets (where those signatures come from) in case if there is more than one. if only one -- it should take you straight there.
P.S. Since 2017.1 you can download and edit stubs as you wish (https://blog.jetbrains.com/phpstorm/2017/03/per-project-php-extension-settings-in-phpstorm-2017-1/ -- under "Advanced Settings" you can specify the path where to store local stubs, which are taken from https://github.com/JetBrains/phpstorm-stubs).
Great info! Just what I was seeking. Thank you very much!