

To create an attribute, declare a usual class and add an # marker on top of it. annotations are a new, structured way to specify metadata in PHP. And as a bonus, arguments passed this way are type-safe, unlike array elements.Īttributes a.k.a. With named arguments, this is not necessary because you can specify the parameters you need. If the passed value is the same as the parameter’s default, PhpStorm will grey out the argument and you can safely remove it with a quick-fix:ĭevelopers often use options arrays to pass a set of parameters. PhpStorm highlights arguments if they include a typo or if there is no matching parameter: Calls are now self-documented, and optional parameters have become truly optional because you can omit them.Ĭonvert positional arguments to named arguments with the Add name identifiers quick-fix: In PHP 8, function and method arguments can be passed by specifying a parameter name. If switching is inactive, it means there is a constraint on the language version in the project’s composer.json you should adjust it in that file. Switch it from there to take advantage of the new features of PHP 8. The status bar now always displays the current language level of the project. Here’s what’s available and how you can use it in the IDE. PhpStorm 2020.3 supports all of the latest language changes. We would like to say a big thank you to all the contributors and the release managers! The folks from PHP even let us participate in creating the announcement page – check it out. Tailwind CSS, with coding assistance for Tailwind classes.Database Tools bring support for SQL for MongoDB and new data extractors.

Git stage is now supported as an alternative to changelists.Setting PhpStorm as a default application for opening files. IDE visual theme stays in sync with the OS. All sorts of IDE enhancements: Search Everywhere got some new moves.In the Editor, you can now render diagrams and charts with Mermaid.js, split tabs easier, and instantly preview files without opening them.Collaborative Development lets you share your project with others and work on it together in real-time.HTTP Client can now run Guzzle requests and copy requests as cURL.Xdebug 3 with streamlined configuration, and Debugger Improvements such as inline watches and interactive hints.PHPStan and Psalm can detect issues directly in the code editor or in batch mode.PHP 8: support for all language features, and even open-source Custom Attributes.Read on for details on all the new features and significant updates, along with a ton of GIFs! This major release includes full support for PHP 8, static analyzers PHPStan and Psalm, Xdebug 3, Tailwind CSS, collaborative development via Code With Me, and much more.
