PhpStorm 2020.2 – PHP Built-in functions are not recognized

It’s a known issue. AFAIK there is still no solid idea on why it happens and why only some users are affected. https://youtrack.jetbrains.com/issue/WI-54626 — watch this ticket (star/vote/comment) to get notified on any progress. Fixed in PhpStorm 2021.1.1 version. Current workaround: Close IDE Locate folder where PhpStorm 2020.2 stores indexes/caches on your computer (see below) … Read more

Undefined class Route (Laravel in PhpStorm)

Check the Laracasts walkthrough 1) Go to: https://github.com/barryvdh/laravel-ide-helper 2) Click on the gist Generated version for L5: https://gist.github.com/barryvdh/5227822 3) Click on “Raw” to get the current version (as of June 22, 2016 it is): https://gist.githubusercontent.com/barryvdh/5227822/raw/4d4b0ca26055fa4753b38edeb94fad2396c497c0/_ide_helper.php 4) Make sure you’re in your root directory (this is mine) cd /var/www/html/project 5) Download the gist: wget https://gist.githubusercontent.com/barryvdh/5227822/raw/4d4b0ca26055fa4753b38edeb94fad2396c497c0/_ide_helper.php 6) … Read more

How to document magic (_call and _callStatic) methods for IDEs

Use class-level PHPDoc comment — specifically @method tag — works fine in PhpStorm: /** * @method static someClass get_by_user_id(int $id) Bla-bla * @method static someClass get_first_by_id(int $id) */ abstract class a { … In the above: @method — PHPDoc tag static — tells that this is static method someClass or $this — return type get_by_user_id … Read more

PHPStorm + XDebug Setup Walkthrough

I’ve found a more modern and easier solution partially based on CrasyCoder’s post. The steps you need to do are the following: If your brand new php installation doesn’t contain php.ini, rename the php.ini-development to php.ini Install xdebug with help of the wizard: http://xdebug.org/wizard.php Follow its recommendations literally. Put in your php.ini the string: xdebug.remote_enable=1 … Read more

How to disable parameter name hints in PhpStorm?

A bit of general info on parameter names hints can be found in this official introduction blog post: https://blog.jetbrains.com/phpstorm/2017/03/new-in-phpstorm-2017-1-parameter-hints/ Now back to the actual question: NOTE: It’s all working since 2017.1 version Either right click on such parameter and choose appropriate action from the menu or go via Settings/Preferences directly: Settings/Preferences | Editor | Appearance … Read more