PhpStorm Updated For PHP 8.3 |
Written by Kay Ewbank | |||
Tuesday, 21 November 2023 | |||
The latest version of PhpStorm, the IDE for PHP and web development from JetBrains, has been updated to support the new features of PHP 8.3, due to be released later this week. PhpStorm's IDE can be used to develop for PHP and works with a variety of frameworks including Symfony, Laravel, Drupal, WordPress, Zend Framework, Magento, Joomla!, CakePHP and Yii. JetBrains says the editor deeply understands PHP code's structure, and provides code completion, refactorings, and on-the-fly error prevention. The latest version has been updated to add support for the new features in PHP 8.3, which will be released on November 23. The new features include typed class constants, improvements to readonly classes, an #[Override] attribute, and json_validate() function. JetBrains says that most of the changes in the IDE related to the new features will be integrated "organically". One improvement makes use of the #[Override] attribute more obvious. The attribute can be used to make the developer's intent obvious when overriding a method. The new version of PhP will check whether the method marked with #[Override] actually overrides the parent method and throws an exception if that is not the case. PhpStorm now warns about such cases in advance and also suggests that you add the #[Override] attribute when applicable. A second improvement is aimed at the new json_validate() function which is being added to PhP's standard library. Until now, JSON strings had to be decoded to see whether they were valid or caused an error. PhpStorm can now detect such patterns and will suggest replacing them with a json_validate() function call. If all you want to do is see if the input is valid JSON, this uses less memory compared to decoding the string. Another change works with PHP 8.3's new ability to declare types for class constants. PhpStorm now provides suggestions to insert the appropriate type, type hint completion, compatibility checks with the default value's type, and type redeclaration checks when overriding a constant in a child class. PhPStorm 2023.2.4 is available now. More InformationRelated ArticlesJetBrains Qodana Adds Taint Analysis For PHP JetBrains Releases New Version of PHP IDE To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.
Comments
or email your comment to: comments@i-programmer.info |
|||
Last Updated ( Tuesday, 21 November 2023 ) |