Is there a way to conveniently replace deprecated Joomla classes with VS Code. I do have the PHP CodeSniffer (with Joomla Coding standards) and Intelephense extensions, although I am not sure if everything is set up 100% as it should be. Maybe I missed something. So far the deprecated classes are highlighted and the tool tips show which class to use instead.
But is it also possible to automate the replacement? Replacing the class name and also inserting the
use statement at the beginning of the file?
class HelloWorldViewHelloWorlds extends JViewLegacy
use Joomla\CMS\MVC\View\HtmlView ... class HelloWorldViewHelloWorlds extends HtmlView
Updating an old extension gets quite tedious, when doing all of them manually.
PHPStorm seems to have something like this:
click on indicated deprecated class, Alt + Enter, then Import Class, choose class and name spacing is placed at top of file (haven't tried it myself since I don't use PHPStorm)