简体   繁体   English

PhpStorm找到项目中所有已弃用的用法

[英]PhpStorm find all deprecated usages in the project

I'm working now on a pretty big PHP-project and I want to upgrade Symfony framework to the next version. 我现在正在开发一个非常大的PHP项目,我想将Symfony框架升级到下一个版本。 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? 有没有方便的方法在PhpStorm中找到所有弃用的方法用法?

Code | Run Inspection by Name... Code | Run Inspection by Name... -- search for "deprecated" and choose correct one. Code | Run Inspection by Name... - 搜索“已弃用”并选择正确的。

在此输入图像描述

This will work as long as new Symfony is already in the project (so that IDE knows what method/class/constant is now considered deprecated). 只要新的Symfony已经在项目中,这将起作用(因此IDE知道现在认为已弃用的方法/类/常量)。

In every Symfony version is a README file with upgrade instructions. 在每个Symfony版本中都有一个带有升级说明的README文件。

https://github.com/symfony/symfony/blob/master/UPGRADE-2.3.md https://github.com/symfony/symfony/blob/master/UPGRADE-2.3.md

You should work with these documents to find out changes and deprecated functions. 您应该使用这些文档来查找更改和已弃用的函数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM