PhpStorm 2021.1

Añade la capacidad de obtener una vista previa de archivos PHP y HTML en el editor.
Abril 9, 2021
Nueva versión

Características

  • PHP
    • Set the PHP language level in the status bar - You can now set any PHP version for the project without modifying composer.json.
    • Locate PHP settings more easily - To make it easier to find and change PHP-related settings, This section has been moved to the top level Settings.
    • Preview PHP and HTML files in the editor - In the Editor, a new icon has been added in the top-right corner that opens a tab for previewing files inside of PhpStorm. It works with HTML and PHP files. Any changes in linked CSS and JavaScript files will be reflected in the preview as well.
    • Use table prefixes in SQL queries - It is now possible to specify prefixes via the .phpstorm.meta.php file.
  • Inspections and quick-fixes
    • Boolean expression can be simplified - If a boolean expression contains true or false literals, PhpStorm can now help simplify it. Use an Alt+Enter quick fix to remove redundancies and improve readability.
    • Strict comparison of operands with incompatible types - The === operator for strict comparison will now always result in false if one operand type is not the same as the other. PhpStorm will now highlight such cases, as they can potentially be a source of bugs. PhpStorm takes into account all type-inferred information and will help you find issues in less obvious cases.
    • PHP 8: Replace assignment in the function call with named argument - You can now use Alt+Enter to replace the assignment with a real named argument.
    • Replace 'isset' with coalesce - This code snippet isset($a) ? $a : $b; is exactly the same as $a ?? $b, so PhpStorm will now suggest an Alt+Enter quick-fix to replace it.
    • Simplify 'if' blocks with the common body - Some if or else blocks may become redundant after changes that make their bodies the same. PhpStorm will now offer either to extract common parts or to merge blocks.
    • Invert 'if' statement - Press Alt-Enter on any if and choose Invert `if` statement from the menu. This will change the condition to its opposite and make the necessary code adjustments to preserve the logic.
    • Unnecessary leading '\' in 'use' statement - In some cases, the leading backslash is redundant for namespaces. PhpStorm now helps determine where it can be removed.
    • 'foreach' variable overwrites already defined variables - Variables for key and value in a foreach loop can clash with the names of other variables or parameters. PhpStorm now highlights all of the places where errors could occur.
    • Unnecessary curly braces syntax for variables - PhpStorm now highlights when the curly braces in the context of string interpolation are redundant and can be safely removed to make the code cleaner.
    • Change parameter type based on a default value - If the declared type does not match the type of a value, you can now quickly update the type using Alt+Enter. With PHP 8, PhpStorm will offer to use a union type.
    • Replace 'isset' with '!== null' - Using the isset() function is only effective for arrays and variables. In all other cases, it makes sense to verify whether the operand is not null. You can now use Alt+Enter to replace isset() checks with null checks.
    • Highlight unsafe http:// links - You can now highlight http:// protocol usages in strings and PhpStorm offers an Alt-Enter quick-fix to change them to https://. You can also add URLs to the ignore list with a quick-fix.
    • Suspicious name combination - PhpStorm now highlights some typical misusages of parameter names or return values.
    • Configure pre-commit inspections - You can now choose a code inspection profile before committing changes to the VCS.
  • Other
    • Synthetic scope for better refactoring - In PHP, loop constructs like foreach, for, while and catch blocks do not have isolated scopes. Added a synthetic scope for such blocks, so the rename refactoring (Shift+F6) will be more intuitive.
    • Better automatic language injection - This release allows you to analyze how variables are used and inject language references automatically.
    • Extensions in 'suggest' section of composer.json - You can now consider extensions in both require and suggest sections. PhpStorm will warn you when an extension is registered in composer.json as suggested but is used without checks, like extension_loaded() or function_exists(). You can use a quick-fix to move extensions to require/require-dev.
    • Debugging WSL 2 projects in Docker is now possible.
    • Quality tools now properly resolve paths with docker-compose in exec mode.
    • Large files (more than 5k lines) are handled correctly.
    • Significantly improved performance in projects with many aliases.
  • Code With Me
    • Collaborative development - Code With Me is now bundled with PhpStorm. It allows you to share the project you currently have open in your IDE with others and work on it together in real time. Your peers do not even need to have their own IDEs installed to collaborate with you. The platform also features embedded audio and video calls, along with chat messaging.
  • HTTP Client
    • Support for SSL - You can now define SSL settings in the HTTP client by clicking Add environment file and selecting Private. The IDE will automatically create a file where you can add your SSL configurations: clientCertificate, hasCertificatePassphrase, clientCertificateKeyand verifyHostCertificate.
    • UI improvements - There is a new eye icon that contains options for the way the body is displayed. You can also switch modes between Text/JSON/HTML/XML, you can enable line numbers and there is a new button to quickly Copy Response Body to Clipboard.
  • IDE
    • Maximize tabs in the split view - Whenever several tabs that split the editor vertically are open, you can double-click either of them to maximize the editor window for that specific tab. To bring the window back to its original size, simply double-click it again.
    • JSONPath support - You can now use the JSONPath query language to search through JSON documents.
    • JSON Lines format support - PhpStorm now supports the newline-delimited JSON Lines format used for working with structured data and logs. The IDE will recognize .jsonl, .jslines, .ldjson, and .ndjson file types.
    • Typography settings - It is now possible to adjust font variations and a fallback font.
  • Web Technologies
    • Improved support for Stylelint - Inspecting your CSS code with Stylelint is now easier. Hover over a problem in your file or place the caret on it and press Alt+Enter, then select Stylelint: Fix current file. You can also now specify a path to the configuration file under the corresponding field in Preferences/Settings.
    • Check the specificity of your selectors - When working with style sheets, you can now check the specificity of your selectors.
  • GitHub pull request improvements
    • Added a new dialog which includes everything you might need:
      • Select base and head branches from a list that includes all the branches available.
      • Review changed files in the Files tab.
      • Edit PR title and description, appoint reviewers and assignees, and add labels.
      • Create draft pull requests.
  • Database Tools
    • UI for grants - Added a UI for editing grants when modifying objects. The Modify user window now has a UI for adding grants to objects. These updates are available for PostgreSQL, Amazon Redshift, Greenplum, MySQL, MariaDB, DB2, Microsoft SQL Server, and Sybase.
    • Context live templates - Added a solution for generating simple statements straight from the database explorer – live templates. You can add your own templates or edit the existing ones in the SQL node.
Preview PHP and HTML files in the editor

PhpStorm

IDE de PHP con refactorizaciones, finalización de código, análisis de código instantáneo y orientación a la productividad de la codificación.

PhpStorm también está disponible en:

¿Alguna pregunta?

Chatee en vivo ahora mismo con nuestros especialistas en licencias de JetBrains.