PhpStorm find all deprecated usages in the project

PhpDeprecatedPhpstorm

Php Problem Overview


I'm working now on a pretty big PHP-project and I want to upgrade Symfony framework to the next version. Before I do that, I want to be sure that there are no deprecated method usages left in the project.

Is there handy way to find all deprecated method usages in PhpStorm?

Php Solutions


Solution 1 - Php

Code | Analyze Code | Run Inspection by Name... (Ctrl + Alth +Shift + I here on Windows using default keymap) -- search for "deprecated" and choose the most correct one for your needs.

enter image description here

https://www.jetbrains.com/help/phpstorm/2021.2/running-inspections.html#run-one-inspection

This will work as long as new Symfony is already in the project (so that the IDE knows what method/class/constant is now considered deprecated (based on @deprecated PHPDoc tags)).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionalexey_detrView Question on Stackoverflow
Solution 1 - PhpLazyOneView Answer on Stackoverflow