php versions / deprecations / strict_types

Wouldn't it be great, if the IDE would show usages of functions, which will be deprecated/removed in the future?

We have a project which is running on php7.4 - but we'll update it someday to php8 / php8.3 and php 11 (hopefully :-)
So writing for example get_class() is now OK (php7.4) - but after updating to php8.3 it's deprecated (without parameter).
PhpStorm knows that (it's marked, if php8.3 is selected), but doesn't show it, if php7.4 is selected.

If php8.3 is selected, it show things like “'substr()' call can be converted to ‘str_starts_with()’” which are not yet possible (live-env is still php7.4)

It would be great, if PhpStorm would show up future deprecations and removed functions etc, without suggesting not yet supported features.

Same would be nice for strict-types declarations:
(a settings options: ‘hint strict-types')

trim(null)” would be marked by the IDE, but since “declare(strict_types=1);” is not set, php should run it.
So writing strict code (eg. to be able to enable “declare(strict_types=1);” some day), without crashing everything today, get's possible.


1 comment

Hi Christian,

At the moment, there's no such feature, but we have it filed as a feature request here. Please vote for it if you have a spare minute.


Please sign in to leave a comment.