{"id":92623,"date":"2020-11-06T16:17:06","date_gmt":"2020-11-06T15:17:06","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=phpstorm&#038;p=92623"},"modified":"2020-11-09T09:56:48","modified_gmt":"2020-11-09T08:56:48","slug":"phpstorm-2020-3-eap-6","status":"publish","type":"phpstorm","link":"https:\/\/blog.jetbrains.com\/pt-br\/phpstorm\/2020\/11\/phpstorm-2020-3-eap-6","title":{"rendered":"PhpStorm 2020.3 EAP #6: Xdebug 3, Tailwind CSS, Git stage, and More"},"content":{"rendered":"<p>This build introduces support for the upcoming Xdebug 3, Tailwind CSS, improvements for Twig, Git stage support, and the ability to generate multiple files with templates.<\/p>\n<p>If you prefer watching to reading, check out the <a href=\"https:\/\/www.youtube.com\/playlist?list=PLQ176FUIyIUYKmB_LrGuXyVhutInZKFAq\" target=\"_blank\" rel=\"noopener\"><em>Coming in PhpStorm 2020.3<\/em><\/a> series on our <a href=\"https:\/\/www.youtube.com\/channel\/UCGp4UBwpTNegd_4nCpuBcow\" target=\"_blank\" rel=\"noopener\">JetBrains YouTube channel<\/a>!<\/p>\n<p align=\"center\"><a class=\"jb-download-button\" href=\"https:\/\/www.jetbrains.com\/phpstorm\/nextversion\/\" target=\"_blank\" rel=\"noopener\"><i class=\"download-icon\"><\/i>Download PhpStorm 2020.3 EAP<\/a><\/p>\n<p><!--more--><\/p>\n<h2 id=\"xdebug\">Xdebug 3<\/h2>\n<p>If you are a fan of dump-and-die debugging, consider giving the new Xdebug 3 a try. The configuration is now much faster and easier to set up.<\/p>\n<p>Let\u2019s add the following Docker configuration to our project and create a remote interpreter based on it.<\/p>\n<p><em>Dockerfile<\/em><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"dockerfile\" data-enlighter-linenumbers=\"true\" data-enlighter-title=\"\">\r\nFROM php:8.0-rc-cli\r\nRUN mkdir -p \/usr\/src\/php\/ext\/xdebug &amp;&amp; curl -fsSL https:\/\/pecl.php.net\/get\/xdebug | tar xvz -C &quot;\/usr\/src\/php\/ext\/xdebug&quot; --strip 1 &amp;&amp; docker-php-ext-install xdebug\r\nRUN docker-php-ext-enable xdebug\r\n<\/pre>\n<p><em>docker-compose.yml<\/em><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yml\" data-enlighter-linenumbers=\"true\" data-enlighter-title=\"\">\r\nversion: &#039;2&#039;\r\nservices:\r\n debug:\r\n   build: .\r\n   volumes:\r\n     - .\/:\/var\/www\/html\r\n   environment:\r\n     XDEBUG_MODE: debug\r\n<\/pre>\n<p>To configure Xdebug X, the only thing we need to specify is <code>XDEBUG_MODE=debug<\/code>.<\/p>\n<p>Xdebug&#8217;s default debugging port has changed from 9000 to 9003. To ease migration, PhpStorm will be listening to both ports by default. You can adjust the port and other settings for Xdebug under <em>Preferences\/Settings | Languages &amp; Frameworks | PHP | Debug<\/em>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/xdebug_config.png\" class=\"alignnone wp-image-93616\" alt=\"\" width=\"624\" \/><\/p>\n<p>Let\u2019s debug a simple script. We\u2019ll add a breakpoint and run the default debug configuration <strong>Debug&nbsp;\u2018index.php&nbsp;(PHP&nbsp;Script)\u2019<\/strong> from the file context menu.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/xdebug_3.png\" data-gif-src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/xdebug_3.gif\" class=\"alignleft size-full wp-image-93606\" alt=\"\" width=\"810\" \/><\/p>\n<p>Learn more about Xdebug 3 in the <a href=\"https:\/\/3.xdebug.org\/docs\/upgrade_guide\" target=\"_blank\" rel=\"noopener\">Upgrade guide<\/a>.<\/p>\n<p><strong>Xdebug Cloud<\/strong><br \/>\nWe\u2019ve been working closely with <a href=\"https:\/\/twitter.com\/derickr\" target=\"_blank\" rel=\"noopener\">Derick Rethans<\/a> to support the upcoming <a href=\"https:\/\/cloud.xdebug.com\/\" target=\"_blank\" rel=\"noopener\">Xdebug Cloud<\/a>. It is already included in PhpStorm, and we\u2019ll announce full support as soon as Xdebug Cloud is generally available. Stay tuned!<\/p>\n<h2 id=\"tailwind_css_support\">Tailwind CSS support<\/h2>\n<p>One of the most anticipated improvements, support for Tailwind CSS, will finally land in PhpStorm 2020.3! Let\u2019s see how this can help you work with this popular framework more efficiently.<\/p>\n<p>First, you can now expect PhpStorm to autocomplete Tailwind classes in your HTML files and after the <code>@apply<\/code> directive.<\/p>\n<p><img decoding=\"async\" alt=\"tailwind-completion-after-apply\" width=\"600\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/tailwind-completion-after-apply.png\"\/><\/p>\n<p>You\u2019ll also see completion suggestions for pseudo-class variants.<\/p>\n<p><img decoding=\"async\" alt=\"tailwind-completion-for-pseudo-class-variants\" width=\"600\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/tailwind-completion-for-pseudo-class-variants.png\"\/><\/p>\n<p>If you hover over a class in your HTML and CSS files, the IDE will show you the preview of the resulting CSS. You can also see this preview when autocompleting your code with the help of the <em>Documentation<\/em> popup (<kbd>F1<\/kbd><kbd>\/Ctrl+Q<\/kbd>).<\/p>\n<p><img decoding=\"async\" alt=\"tailwind-class-declaration-preview-from-doc-popup\" width=\"600\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/tailwind-class-declaration-preview-from-doc-popup.png\"\/><\/p>\n<p>Besides that, PhpStorm will support the customizations you make using <em>tailwind.config.js<\/em> files. The IDE will analyze those files and provides completion based on your customizations. If you define a custom theme with new colors, for example, you\u2019ll see newly generated classes with the name of the custom color in the completion popup.<\/p>\n<p><img decoding=\"async\" alt=\"tailwind-customization-support\" width=\"600\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/tailwind-customization-support.png\"\/><\/p>\n<p>Lastly, Tailwind CSS support is provided through the <a href=\"https:\/\/plugins.jetbrains.com\/plugin\/15321-tailwind-css\" target=\"_blank\" rel=\"noopener\">corresponding plugin<\/a> bundled with WebStorm. If you\u2019re using any other JetBrains IDE and want to take advantage of the new functionality, you can install the plugin from <em>Preferences\/Settings | Plugins<\/em>.<\/p>\n<p>That\u2019s all for now about Tailwind CSS support. Please try the existing features and <a href=\"https:\/\/youtrack.jetbrains.com\/issue\/WEB-42792\" target=\"_blank\" rel=\"noopener\"><strong>share your feedback<\/strong><\/a><strong> with us<\/strong>! We plan to improve this support further.<\/p>\n<h2 id=\"highlight_and_rename_variables_in_twig\">Highlight and Rename variables in Twig<\/h2>\n<p>Select a variable or put the caret on it to highlight all its usages in the template. In addition to highlighting, there is also a <strong>Rename refactoring<\/strong> available now. It works pretty much like it does in PHP files. Use the <kbd>Shift + F6<\/kbd> shortcut and type a new name.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/twig_rename.png\" data-gif-src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/twig_rename.gif\" class=\"alignleft size-full wp-image-93528\" alt=\"\" width=\"624\" \/><\/p>\n<h2 id=\"templates_can_now_generate_multiple_files\">Templates can now generate multiple files<\/h2>\n<p>When you frequently need to create similar boilerplate files, it makes sense to create file templates. With PhpStorm 2020.3 it will be possible to generate a bunch of files at the same time. You can create a skeleton for a module or a controller-view combo.<\/p>\n<p>Go to <em>Preferences \/ Settings | Editor | File and Code Templates<\/em> and click <img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/icon_add_template.png\" class=\"alignnone wp-image-93596\" alt=\"\" width=\"24\" \/> to create a new template, and then click the <strong>Create Child Template File<\/strong> icon <img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/icon_add_child_template.png\" class=\"alignnone wp-image-93586\" alt=\"\" width=\"24\" \/>.<\/p>\n<p>You will see a new node appear under the parent file.<\/p>\n<p>In the <em>File name<\/em> field, you can specify a pattern to generate a file name and path using predefined variables like <code>${NAME}<\/code>.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/file_templates_create.png\" data-gif-src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/file_templates_create.gif\" class=\"alignleft size-full wp-image-93478\" alt=\"\" width=\"624\" \/><\/p>\n<p>Your customized template is ready to use. Let\u2019s see how the files are generated:<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/file_templates_use.png\" data-gif-src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/file_templates_use.gif\" class=\"alignleft size-full wp-image-93488\" alt=\"\" width=\"624\" \/><\/p>\n<h2 id=\"git_stage_support\">Git stage support<\/h2>\n<p><strong>Note:<\/strong> This functionality is only available for the Commit tool window. You can enable it in <em>Preferences\/Settings | Version Control | Commit<\/em> by ticking the <em>Use non-modal commit interface<\/em> checkbox.<\/p>\n<p>PhpStorm 2020.3 will come with support for the Git staging area. To turn it on, tick the <em>Enable staging area<\/em> checkbox in <em>Preferences\/Settings | Version Control | Git<\/em>. Once you do, the support for changelists will be disabled.<\/p>\n<p>If you go back to the Commit tool window using <kbd>Cmd+0<\/kbd> \/ <kbd>Alt+0<\/kbd>, you\u2019ll see that it contains staged and unstaged files.<\/p>\n<p><strong>Stage files<\/strong> by clicking the + icon near them.<br \/>\n<img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/git_stage.png\" data-gif-src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/git_stage.gif\" class=\"alignleft size-full wp-image-93518\" alt=\"\" width=\"624\" \/><\/p>\n<p><strong>Stage specific lines<\/strong> using the gutter icon near the changes in the editor. This way you can commit some changes in a file and keep the rest uncommitted for further work.<br \/>\n<img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/git_stage_lines.png\" class=\"alignnone wp-image-93508\" alt=\"\" width=\"624\" \/><\/p>\n<p><strong>Stage for the diff<\/strong> is also accessible via the gutter icon.<br \/>\n<img decoding=\"async\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/git_stage_diff.png\" data-gif-src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/11\/git_stage_diff.gif\" class=\"alignleft size-full wp-image-93498\" alt=\"\" width=\"624\" \/><\/p>\n<p>When you click <em>Commit<\/em>, all staged files (or specific lines) will be committed.<\/p>\n<hr \/>\n<p>The full list of changes in this build is available in the <a href=\"https:\/\/confluence.jetbrains.com\/display\/PhpStorm\/PhpStorm+203.5600.44+Release+Notes\" target=\"_blank\" rel=\"noopener\"><strong>release notes<\/strong><\/a>.<\/p>\n<ul>\n<li>\n        <strong>Important!<\/strong> PhpStorm EAP builds are not fully tested and may be unstable.\n    <\/li>\n<li>\n        You can install an EAP build side by side with a stable PhpStorm version to try out the latest features.\n    <\/li>\n<li>\n        EAP builds are <em>free<\/em> to use but expire 30 days after the build date.\n    <\/li>\n<\/ul>\n<p>Please report any problems you find to our <a href=\"https:\/\/youtrack.jetbrains.com\/issues\/WI\" target=\"_blank\" rel=\"noopener\">issue tracker<\/a>, or by commenting on this post!<\/p>\n<p><em>Your JetBrains PhpStorm team<\/em><br \/>\n<em>The Drive to Develop<\/em><\/p>\n","protected":false},"author":869,"featured_media":80332,"comment_status":"closed","ping_status":"closed","template":"","categories":[826],"tags":[285,1112,1116],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/phpstorm\/92623"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/phpstorm"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/types\/phpstorm"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/users\/869"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/comments?post=92623"}],"version-history":[{"count":3,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/phpstorm\/92623\/revisions"}],"predecessor-version":[{"id":93767,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/phpstorm\/92623\/revisions\/93767"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/media\/80332"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/media?parent=92623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/categories?post=92623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/tags?post=92623"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/pt-br\/wp-json\/wp\/v2\/cross-post-tag?post=92623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}