Import Cleanup Improvements in PhpStorm 2016.2

We’ve made some improvements in the way that unused use statements are detected in PhpStorm 2016.2.

In previous versions of PhpStorm, unused import statements warnings would not trigger for all imported classes, and never triggered for constants or functions which were introduced in PHP 5.6. In 2016.2 we’ve fixed that, and now give the correct warnings for imported classes, constants and functions that aren’t used. These unused imports will also get removed when triggering the Reformat Code tool, and when Optimize imports are selected.


This is nothing spectacular (hold on tight for more features that ARE), but cleaning unneeded code is always a Good Thing™, so removing these remnants from a time past should be pleasing to everyone. Now to run these inspections on the recently released ZF3 codebase…

This feature in now available in PhpStorm 2016.2 EAP.

 – Gary and the PhpStorm Team

About Gary Hockin

Gary Hockin has been creating code to power web applications for 15 years, the last three of them at an extraordinary level. He is handsome, talented, funny and articulate, and also extremely modest. Gary is a valued contributor to Zend Framework 2 and is a member of the community review team. He's married and has two wonderful children, and when he's not coding, writing about code, speaking about code or reading about code, he can usually be found in the pub playing pool.
This entry was posted in Cool Feature and tagged , , , , . Bookmark the permalink.