<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: grena</title>
    <description>The latest articles on DEV Community by grena (@grena).</description>
    <link>https://dev.to/grena</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F711742%2F96e9702f-d8fd-41ce-888d-728048eb4c19.jpeg</url>
      <title>DEV Community: grena</title>
      <link>https://dev.to/grena</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/grena"/>
    <language>en</language>
    <item>
      <title>Clean docker volumes</title>
      <dc:creator>grena</dc:creator>
      <pubDate>Mon, 24 Jul 2023 12:46:32 +0000</pubDate>
      <link>https://dev.to/grena/clean-docker-volumes-kmg</link>
      <guid>https://dev.to/grena/clean-docker-volumes-kmg</guid>
      <description>&lt;p&gt;First, we'll take a look at space taken by Docker.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker system &lt;span class="nb"&gt;df&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          34        0         12.7GB    12.7GB &lt;span class="o"&gt;(&lt;/span&gt;100%&lt;span class="o"&gt;)&lt;/span&gt;
Containers      0         0         0B        0B
Local Volumes   7         0         24.96GB   24.96GB &lt;span class="o"&gt;(&lt;/span&gt;100%&lt;span class="o"&gt;)&lt;/span&gt;
Build Cache     0         0         0B        0B
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, see which volumes uses most space :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker system &lt;span class="nb"&gt;df&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Local Volumes space usage:

VOLUME NAME                                                        LINKS     SIZE
62d5e5e939ff3ac09436e97e57f7ac069a6437505a364c9752765147185bbe4c   0         314.8MB
768a9dd324ac40c20809a3a4a84d1b0e472288bd4a2ff1437a72df2689602738   0         47.73MB
109ee0d2c7319dcaf431397ae2c2cbf31a31df5e7bb2998098d0eefd6c6c4d36   0         47.3MB
897bb1224a20fac27c0a1005b36a1ca700cd5a803cf4f3ab097d46735abcf9b2   0         47.3MB
a917bf9067962cf9365de644f0e07ab08ab10ecd6927bf926cf8b2a586874b53   0         124.2MB
03dac5e5e485efd6408e09866afed5ebf8ed7f7981bd18ab37ec9b04dd485e0e   0         124.2MB
646b44d17a24bb1ccb98462a1fda78dc2da5b5d78339fa05d0b3be4bc7139045   0         124.2MB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that you have volume names &amp;amp; size, put all volumes you want to remove in a &lt;code&gt;volumes_to_remove.txt&lt;/code&gt; (one per line).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;62d5e5e939ff3ac09436e97e57f7ac069a6437505a364c9752765147185bbe4c
768a9dd324ac40c20809a3a4a84d1b0e472288bd4a2ff1437a72df2689602738
109ee0d2c7319dcaf431397ae2c2cbf31a31df5e7bb2998098d0eefd6c6c4d36
897bb1224a20fac27c0a1005b36a1ca700cd5a803cf4f3ab097d46735abcf9b2
a917bf9067962cf9365de644f0e07ab08ab10ecd6927bf926cf8b2a586874b53
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we'll use a &lt;code&gt;script.sh&lt;/code&gt; to parse the .txt file and remove volume one by one :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"volumes_to_remove.txt"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
    &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"File volumes_to_remove.txt does not exist."&lt;/span&gt;
    &lt;span class="nb"&gt;exit &lt;/span&gt;1
&lt;span class="k"&gt;fi

while &lt;/span&gt;&lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; volume_name&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
    if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$volume_name&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
        &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Remove volume : &lt;/span&gt;&lt;span class="nv"&gt;$volume_name&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
        docker volume &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="nv"&gt;$volume_name&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;fi
done&lt;/span&gt; &amp;lt; &lt;span class="s2"&gt;"volumes_to_remove.txt"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't forget to &lt;code&gt;chmod +x script.sh&lt;/code&gt; and :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>docker</category>
    </item>
    <item>
      <title>Timetroopers.io, the new Doodle</title>
      <dc:creator>grena</dc:creator>
      <pubDate>Tue, 01 Nov 2022 12:47:49 +0000</pubDate>
      <link>https://dev.to/grena/timetroopersio-the-new-doodle-2o1</link>
      <guid>https://dev.to/grena/timetroopersio-the-new-doodle-2o1</guid>
      <description>&lt;p&gt;I released a side project called &lt;a href="https://www.timetroopers.io/" rel="noopener noreferrer"&gt;Timetroopers.io&lt;/a&gt;, a &lt;strong&gt;Doodle like&lt;/strong&gt; that makes it easy to find common dates with other people.&lt;/p&gt;

&lt;p&gt;Being a big fan of the &lt;strong&gt;Lean&lt;/strong&gt; philosophy, I delivered an MVP version that solves the problem: finding dates in common.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frgdprtyse9kh6dkixzpe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frgdprtyse9kh6dkixzpe.png" alt="App screenshot showing common dates" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's a minimal version: French only, no editing, no deleting, not yet responsive, etc... &lt;/p&gt;

&lt;p&gt;What's next?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Translate the app into &lt;strong&gt;English&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Make it &lt;strong&gt;responsive&lt;/strong&gt; for mobile&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Follow me to see the evolution of the project!&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>webdev</category>
      <category>devjournal</category>
      <category>startup</category>
    </item>
    <item>
      <title>PHPStorm Tips #10 : Last Edit Location</title>
      <dc:creator>grena</dc:creator>
      <pubDate>Fri, 26 Aug 2022 10:09:02 +0000</pubDate>
      <link>https://dev.to/grena/phpstorm-tips-10-last-edit-location-27kf</link>
      <guid>https://dev.to/grena/phpstorm-tips-10-last-edit-location-27kf</guid>
      <description>&lt;p&gt;Editer le fichier &lt;strong&gt;A&lt;/strong&gt;, aller jeter un oeil au fichier &lt;strong&gt;B&lt;/strong&gt;, puis &lt;strong&gt;C&lt;/strong&gt;, puis &lt;strong&gt;D&lt;/strong&gt;, puis ouvrir un dossier pour lire le fichier &lt;strong&gt;E&lt;/strong&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Mince, j'ai fait ma modif dans quel fichier au fait ?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Bien que la tempête PHP colore les onglets en bleu s'ils sont modifiés et rouge s'ils sont nouveaux dans le VCS, il est parfois difficile de s'y retrouver.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzmv10zuo429krs9b0dws.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzmv10zuo429krs9b0dws.png" alt="Screenshot de beaucoup d'onglets PHPStorm" width="800" height="139"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Le raccouci &lt;strong&gt;Last Edit Location&lt;/strong&gt; vous permet de &lt;strong&gt;revenir sur le dernier fichier que vous avez édité&lt;/strong&gt;, en l'occurence, le fichier &lt;strong&gt;A&lt;/strong&gt; dans mon exemple.&lt;/p&gt;

&lt;p&gt;Par défault, c'est &lt;code&gt;ctrl&lt;/code&gt; + &lt;code&gt;shift&lt;/code&gt; + &lt;code&gt;Backspace&lt;/code&gt;, assez simple de s'en souvenir.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi6od15ei6yg8obi6ul7g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi6od15ei6yg8obi6ul7g.png" alt="Screenshot du raccourci" width="627" height="114"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;En appuyant plusieurs fois dessus, il remontera votre historique d'édition &lt;strong&gt;pour la session en cours&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>phpstorm</category>
      <category>productivity</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>PHPStorm Tips #9 : Zoom ton code</title>
      <dc:creator>grena</dc:creator>
      <pubDate>Tue, 23 Aug 2022 09:58:33 +0000</pubDate>
      <link>https://dev.to/grena/phpstorm-tips-9-zoom-ton-code-4bjf</link>
      <guid>https://dev.to/grena/phpstorm-tips-9-zoom-ton-code-4bjf</guid>
      <description>&lt;p&gt;La tempête PHP &lt;a href="https://blog.jetbrains.com/phpstorm/2022/08/phpstorm-2022-2-is-now-available/#Keyboard_shortcut_to_change_the_font_size_globally" rel="noopener noreferrer"&gt;a introduit en 2022.2 une petite fonctionnalité pratique&lt;/a&gt; quand on partage son écran via un call : &lt;strong&gt;zoomer globalement sur le code et pouvoir reset à la valeur par défaut&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffl5gwv7ga284olk3a4ib.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffl5gwv7ga284olk3a4ib.gif" alt="Video montrant le zoom sur le code" width="600" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🧐 Le zoom &lt;strong&gt;persiste si on change de fichier&lt;/strong&gt;, pas comme avant.&lt;/p&gt;

&lt;p&gt;Pour s'en servir, il va déjà falloir éditer les raccourcis, direction keymap dans les settings pour chercher ces 3 là :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjqworjb8aw8oouxdvmtv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjqworjb8aw8oouxdvmtv.png" alt="Screenshot des keymaps" width="614" height="176"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Increase font size in all editors&lt;/strong&gt; (ex: &lt;code&gt;Ctrl&lt;/code&gt;+&lt;code&gt;Shift&lt;/code&gt;+&lt;code&gt;=&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decrease font size in all editors&lt;/strong&gt; (ex: &lt;code&gt;Ctrl&lt;/code&gt;+&lt;code&gt;Shift&lt;/code&gt;+&lt;code&gt;-&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reset font size&lt;/strong&gt; (ex: &lt;code&gt;Ctrl&lt;/code&gt;+&lt;code&gt;Shift&lt;/code&gt;+&lt;code&gt;0&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>phpstorm</category>
      <category>productivity</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>PHPStorm Tips #8 : Rechercher et ouvrir plusieurs fichiers</title>
      <dc:creator>grena</dc:creator>
      <pubDate>Tue, 19 Jul 2022 20:18:33 +0000</pubDate>
      <link>https://dev.to/grena/phpstorm-tips-8-rechercher-et-ouvrir-plusieurs-fichiers-nll</link>
      <guid>https://dev.to/grena/phpstorm-tips-8-rechercher-et-ouvrir-plusieurs-fichiers-nll</guid>
      <description>&lt;p&gt;Aujourd'hui, petit coup de projo sur la recherche de fichiers et la capacité à en ouvrir plusieurs d'un coup.&lt;/p&gt;

&lt;p&gt;Pour chercher un fichier, plusieurs possibilités :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Rechercher par &lt;strong&gt;nom de fichier&lt;/strong&gt; &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;N&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Rechercher par &lt;strong&gt;classe&lt;/strong&gt; &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;N&lt;/code&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Dans les deux cas, PHPStorm va t'ouvrir une &lt;strong&gt;liste déroulante&lt;/strong&gt; avec les résultats :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ei81ypeqwlmdaknf4k1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ei81ypeqwlmdaknf4k1.png" alt=" " width="709" height="287"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;On peut utiliser les flèches pour mettre le fichier qu'on veut ouvrir en surbrillance puis &lt;code&gt;Entrée&lt;/code&gt; pour l'ouvrir.&lt;/p&gt;

&lt;p&gt;Mais si t'hésites entre plusieurs fichiers (&lt;em&gt;par exemple avec le même nom de classe ou de fichier&lt;/em&gt;), il est possible d'en ouvrir plusieurs, pour ça :&lt;/p&gt;

&lt;p&gt;Soit tu restes appuyé sur &lt;code&gt;Shift&lt;/code&gt; puis &lt;code&gt;↓&lt;/code&gt; pour descendre et &lt;strong&gt;mettre en surbrillance&lt;/strong&gt; plusieurs fichiers:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsab6q0oqo756xcik91r1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsab6q0oqo756xcik91r1.gif" alt=" " width="600" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Soit avec la souris, &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;clic gauche&lt;/code&gt; :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4c5gagch127mnsfgl98.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4c5gagch127mnsfgl98.gif" alt=" " width="600" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Puis &lt;code&gt;Entrée&lt;/code&gt;, et voilà, tous les fichiers sélectionnés s'ouvriront !&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⛈️ &lt;strong&gt;Le commentaire de l'expert&lt;/strong&gt; : La recherche PHPStorm est assez "intelligente", si tu sais que ta classe &lt;code&gt;Toto&lt;/code&gt; est dans le namespace &lt;code&gt;MonJoliNamespace&lt;/code&gt;, tu peux chercher : "Joli/Tot", et il le trouvera.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>phpstorm</category>
      <category>productivity</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>PHPStorm Tips #7 : Naviguer dans le YAML</title>
      <dc:creator>grena</dc:creator>
      <pubDate>Tue, 19 Jul 2022 20:11:56 +0000</pubDate>
      <link>https://dev.to/grena/phpstorm-tips-7-naviguer-dans-le-yaml-1kn</link>
      <guid>https://dev.to/grena/phpstorm-tips-7-naviguer-dans-le-yaml-1kn</guid>
      <description>&lt;p&gt;Aujourd'hui, 2 petites astuces :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Comment aller rapidement &lt;strong&gt;à la déclaration d'une clé&lt;/strong&gt; .yml&lt;/li&gt;
&lt;li&gt;Comment &lt;strong&gt;copier une clé .yml&lt;/strong&gt; pour la coller en tant que string&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🔎 Trouver rapidement une clé
&lt;/h2&gt;

&lt;p&gt;Si tu es face à une clé, par exemple :&lt;/p&gt;

&lt;p&gt;&lt;code&gt;akeneo.tailored_import.data_mapping.operations.category_replacement.title&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Et que tu veux rapidement retrouver le fichier .yml où elle est déclarée, sélectionne la clé, puis utilise le raccourci &lt;code&gt;Shift&lt;/code&gt; 2 fois de suite (&lt;code&gt;Shift&lt;/code&gt; &lt;code&gt;Shift&lt;/code&gt;). &lt;/p&gt;

&lt;p&gt;La recherche rapide va te retrouver le fichier et te montrer la clé :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7kplpba4auw413didn5a.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7kplpba4auw413didn5a.gif" alt=" " width="600" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  💾 Copier rapidement une clé
&lt;/h2&gt;

&lt;p&gt;Maintenant, l'inverse peut être utile : à partir d'une clé .yml, tu veux rapidement la copier pour la coller en tant que &lt;em&gt;string&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Pour ça, sur la clé dans le fichier .yml fais un clic droit, puis "&lt;strong&gt;Copy / Paste Special&lt;/strong&gt;" &amp;gt; "&lt;strong&gt;Copy Reference&lt;/strong&gt;", et voilà, tu peux coller ça n'importe où :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0767ikf6644oql89vnx1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0767ikf6644oql89vnx1.gif" alt=" " width="586" height="221"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>phpstorm</category>
      <category>productivity</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>PHPStorm Tips #6 : Les contextes</title>
      <dc:creator>grena</dc:creator>
      <pubDate>Tue, 19 Jul 2022 20:07:26 +0000</pubDate>
      <link>https://dev.to/grena/phpstorm-tips-6-les-contextes-121c</link>
      <guid>https://dev.to/grena/phpstorm-tips-6-les-contextes-121c</guid>
      <description>&lt;p&gt;Aujourd'hui petit coup d'oeil aux contextes PHPStorm, que je trouve cools pour le cas suivant :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tu bosses sur ta branche &lt;strong&gt;PR-1&lt;/strong&gt;, avec 8 fichiers d'ouverts&lt;/li&gt;
&lt;li&gt;Tu dois revenir rapidement sur une autre branche, &lt;strong&gt;PR-2&lt;/strong&gt; et travailler sur 6 autres fichiers&lt;/li&gt;
&lt;li&gt;Tu reviens sur ta branche &lt;strong&gt;PR-1&lt;/strong&gt;, et tu veux rapidement ré-ouvrir les 8 fichiers sur lesquels tu bossais&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;PHPStorm peut ajouter une sélection de fichiers à un contexte pour la retrouver plus tard.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Quand t'es prêt à sauvegarder ta sélection de fichiers ouverts, va dans Tools &amp;gt; Tasks &amp;amp; Context &amp;gt; Save Context (ou &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;S&lt;/code&gt;), nomme ton contexte et zouh !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftb3m0lo60bdzq4m6it2x.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftb3m0lo60bdzq4m6it2x.gif" alt=" " width="600" height="703"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Perso, je nomme ce contexte du nom de la PR sur laquelle j'étais. Ensuite, tu peux tout fermer, ouvrir et bouiner les fichiers que tu veux etc.&lt;/p&gt;

&lt;p&gt;Une fois que t'es prêt à retrouver ton contexte sauvegardé, Tools &amp;gt; Tasks &amp;amp; Context &amp;gt; Load Context (ou &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;L&lt;/code&gt;), et ZOUH, tu retrouves tous tes fichiers !&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0dzx1f55faaamn0cg9n1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0dzx1f55faaamn0cg9n1.gif" alt=" " width="600" height="703"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pour supprimer un contexte, ouvre le "Load Context" clique sur la petite flèche, puis sur "Remove". &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ul92ssknjhhy7y729zj.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7ul92ssknjhhy7y729zj.gif" alt=" " width="447" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⛈️ &lt;strong&gt;Le commentaire de l'expert&lt;/strong&gt; : Pour aller plus loin et notamment exploiter le plein potentiel des Tasks, c'est par ici : &lt;a href="https://www.jetbrains.com/help/phpstorm/managing-tasks-and-context.html" rel="noopener noreferrer"&gt;https://www.jetbrains.com/help/phpstorm/managing-tasks-and-context.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>phpstorm</category>
      <category>productivity</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>PHPStorm Tips #5 : Toute la pouissance des Live Templates</title>
      <dc:creator>grena</dc:creator>
      <pubDate>Tue, 19 Jul 2022 19:58:34 +0000</pubDate>
      <link>https://dev.to/grena/phpstorm-tips-5-toute-la-pouissance-des-live-templates-23n9</link>
      <guid>https://dev.to/grena/phpstorm-tips-5-toute-la-pouissance-des-live-templates-23n9</guid>
      <description>&lt;p&gt;Aujourd'hui, on attaque un autre morceau de la tempête, les &lt;strong&gt;Live Templates&lt;/strong&gt; !&lt;/p&gt;

&lt;p&gt;C'est ultra puissant et customisable, l'idée c'est de se l'approprier pour faire vos propres Live Templates. Prêts ? Allez on attaque.&lt;/p&gt;

&lt;h2&gt;
  
  
  Le principe ⚙️
&lt;/h2&gt;

&lt;p&gt;L'idée est de "programmer" un raccourci de texte qui va générer un snippet de code préformaté. Par exemple, si t'en as marre de copier/coller la license des fichiers :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fojobi75s5pnsazfioz74.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fojobi75s5pnsazfioz74.png" alt=" " width="774" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tu peux créer un Live Template, et dès que tu écris "license", et que tu complètes avec &lt;code&gt;Tab&lt;/code&gt;, BIM, le snippet est généré.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fylsjyrxjbvdx8ik0sdif.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fylsjyrxjbvdx8ik0sdif.gif" alt=" " width="600" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pour faire ça, rendez-vous dans les Live Templates :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj4ykcg7daah2h6kdh57q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj4ykcg7daah2h6kdh57q.png" alt=" " width="529" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Puis en cliquant sur le +, on peut ajouter un Live Template dans le langage que l'on veut, ici, on va le créer en PHP :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjzhaheo18fyuh0o66u2k.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjzhaheo18fyuh0o66u2k.gif" alt=" " width="800" height="643"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Les variables 🔢
&lt;/h2&gt;

&lt;p&gt;Alors si c'était juste des snippet fixes, ça serait vite limité. Là où PHPStorm est pratique, c'est que ton snippet peut contenir des variables dynamiques. &lt;/p&gt;

&lt;p&gt;Si on reprend l'exemple de la license pour rajouter l'année :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0w6vpu0rdnzx458evtt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd0w6vpu0rdnzx458evtt.png" alt=" " width="774" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ici, on veut que 2022 soit toujours l'année actuelle, pour ça, on &lt;strong&gt;va passer par une variable&lt;/strong&gt; en modifiant notre Live Template :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foaj3s28nactv4cvzixde.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foaj3s28nactv4cvzixde.png" alt=" " width="661" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;La syntaxe pour les variables c'est &lt;code&gt;$NOMDELAVARIABLE$&lt;/code&gt;.&lt;br&gt;
Une fois qu'on a des variables, on va pouvoir les éditer :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F93zemeuxiu6mqg37rsh7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F93zemeuxiu6mqg37rsh7.png" alt=" " width="746" height="207"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Dans cette nouvelle fenêtre, on va retrouver les variables de notre Live Template, et on va pouvoir modifier tout ça :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fikqlv04lmjhsu5asyem7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fikqlv04lmjhsu5asyem7.png" alt=" " width="675" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Chaque variable peut suivre une &lt;strong&gt;Expression&lt;/strong&gt; pré-définie : une date, un formattage spécifique (camel case, snake case...), le nom d'un fichier, une concaténation... tu peux voir &lt;a href="https://www.jetbrains.com/help/idea/template-variables.html#predefined_functions" rel="noopener noreferrer"&gt;toutes les Expressions sur cette page&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Nous, ici, on veut l'année en cours, donc on va utiliser &lt;code&gt;date()&lt;/code&gt; :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0iv3zog7iwmhvvd4wmnp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0iv3zog7iwmhvvd4wmnp.png" alt=" " width="338" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;En lui passant "yyyy", on aura l'année ! Donc maintenant, quand on va utiliser notre Live Template, il sera toujours à l'année actuelle :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8wrolq9990nfibfp7xdd.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8wrolq9990nfibfp7xdd.gif" alt=" " width="600" height="235"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Autre example 🧠
&lt;/h2&gt;

&lt;p&gt;Allez, pour illustrer, un exemple un peu plus complexe avec l'utilisation des variables, un Live Template "&lt;strong&gt;specfunc&lt;/strong&gt;" pour rapidement créer une function pour un PHPSpec :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuypa0kos0ghp2lpwyctb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuypa0kos0ghp2lpwyctb.png" alt=" " width="416" height="282"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Rien de bien compliqué, 2 variables : (&lt;em&gt;ne faites pas attention à &lt;code&gt;$END$&lt;/code&gt; pour le moment&lt;/em&gt;) :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvwf7ypawjdwiqliv4rqz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvwf7ypawjdwiqliv4rqz.png" alt=" " width="377" height="126"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;FUNC_NAME_SNAKE&lt;/code&gt; prendra donc la variable de &lt;code&gt;FUNC_NAME&lt;/code&gt; sous forme de snake case ! Donc d'abord on appelle notre live template en tapant "specfunc", puis le Live Template se lance, on a donc la main pour écrire notre variable, et l'autre est calculée :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcu9gy8bujniv8t6lwi2l.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcu9gy8bujniv8t6lwi2l.gif" alt=" " width="438" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Et voilà, plus besoin de se faire des crampes aux mains en écrivant une phrase avec des underscores.&lt;/p&gt;

&lt;p&gt;Note : on peut mettre &lt;code&gt;$END$&lt;/code&gt; pour placer le curseur où on veut une fois que le Live Template est terminé. Ici, je le mets au niveau du commentaire, pour pouvoir rapidement le supprimer.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⛈️ &lt;strong&gt;Le commentaire de l'expert&lt;/strong&gt; : Pour aller plus loin, la doc de JetBrains est plutôt bien fichue, n'hésitez pas à aller fouiner des bonnes astuces : &lt;a href="https://www.jetbrains.com/help/idea/using-live-templates.html" rel="noopener noreferrer"&gt;https://www.jetbrains.com/help/idea/using-live-templates.html&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>phpstorm</category>
      <category>productivity</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>PHPStorm Tips #4 : Extend Selection</title>
      <dc:creator>grena</dc:creator>
      <pubDate>Tue, 19 Jul 2022 19:27:06 +0000</pubDate>
      <link>https://dev.to/grena/phpstorm-tips-4-extend-selection-ih6</link>
      <guid>https://dev.to/grena/phpstorm-tips-4-extend-selection-ih6</guid>
      <description>&lt;p&gt;Aujourd'hui, un petit raccourci de derrière les fagots : &lt;strong&gt;Extend Selection&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6wxqef9uqu6i3clo93si.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6wxqef9uqu6i3clo93si.gif" alt=" " width="600" height="82"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Quoi que tu aies sélectionné, PHPStorm peut &lt;strong&gt;étendre ta sélection&lt;/strong&gt; de manière logique. Par exemple, si tu as sélectionné le texte en jaune :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv51gbekb1jklr1630xr2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv51gbekb1jklr1630xr2.png" alt=" " width="665" height="31"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tu peux &lt;strong&gt;étendre&lt;/strong&gt; la sélection avec &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;W&lt;/code&gt;, ce qui donnera :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuwcygx7o8ejckqieqwko.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuwcygx7o8ejckqieqwko.png" alt=" " width="664" height="28"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;A partir de là, il est possible de l'&lt;strong&gt;étendre&lt;/strong&gt; encore avec &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;W&lt;/code&gt; :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3u0k7xg0hegj6sqtjm01.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F3u0k7xg0hegj6sqtjm01.png" alt=" " width="663" height="27"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Et ainsi et suite, je pense que t'as capté le deal.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⛈️ &lt;strong&gt;Le commentaire de l'expert&lt;/strong&gt; : Si jamais tu as un peu abusé du &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;W&lt;/code&gt; et que tu veux réduire ta sélection, &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;W&lt;/code&gt; est là pour &lt;strong&gt;réduire&lt;/strong&gt; ta sélection.&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>phpstorm</category>
      <category>productivity</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>PHPStorm Tips #3 : Extract method / variable</title>
      <dc:creator>grena</dc:creator>
      <pubDate>Tue, 19 Jul 2022 19:20:00 +0000</pubDate>
      <link>https://dev.to/grena/phpstorm-tips-3-extract-method-variable-5028</link>
      <guid>https://dev.to/grena/phpstorm-tips-3-extract-method-variable-5028</guid>
      <description>&lt;p&gt;Aujourd'hui, on extrait !&lt;/p&gt;

&lt;h2&gt;
  
  
  Extract method - &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;M&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Un bloc de code un peu trop important qui mérite sa propre méthode ? PHPStorm t'aide à extraire tout ça, check donc :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feejdzd53e7vvnxz56n0p.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feejdzd53e7vvnxz56n0p.gif" alt=" " width="600" height="418"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;En plus il te laisse la main pour changer la visibilité (private, public..), changer l'ordre et le typehint des arguments, merci la tempête.&lt;/p&gt;

&lt;p&gt;Pour se souvenir du raccourci, &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;M&lt;/code&gt;&lt;strong&gt;&lt;em&gt;ethod&lt;/em&gt;&lt;/strong&gt;, MALIN !&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduce variable - &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;V&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Un accès un peu trop récurrent sur un getter ? Une string que tu utilises plusieurs fois ? PHPStorm te permet de rapidement l'extraire en variable :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftrnaxkzw0p6te53i4ddg.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftrnaxkzw0p6te53i4ddg.gif" alt=" " width="600" height="289"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Comme tu peux le voir, il te propose de changer l'occurence sélectionnée ou toutes les occurences qu'il a trouvé 😍&lt;/p&gt;

&lt;p&gt;Pour se souvenir du raccourci, &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;V&lt;/code&gt;&lt;strong&gt;&lt;em&gt;ariable&lt;/em&gt;&lt;/strong&gt;, ULTRA MALIN !&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⛈️ &lt;strong&gt;Le commentaire de l'expert&lt;/strong&gt; : ces méthodes d'extractions sont aussi disponibles dans le menu "refactor" au clic droit !&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp14em924381m6zqu409d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp14em924381m6zqu409d.png" alt=" " width="800" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>phpstorm</category>
      <category>productivity</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>PHPStorm Tips #2 : Select Occurences</title>
      <dc:creator>grena</dc:creator>
      <pubDate>Tue, 19 Jul 2022 19:14:13 +0000</pubDate>
      <link>https://dev.to/grena/phpstorm-tips-2-select-occurences-2246</link>
      <guid>https://dev.to/grena/phpstorm-tips-2-select-occurences-2246</guid>
      <description>&lt;p&gt;Aujourd'hui, focus sur 2 raccourcis !&lt;/p&gt;

&lt;h2&gt;
  
  
  Select All Occurences -  &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;J&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6x1n5i9gjm77umpl9zkm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6x1n5i9gjm77umpl9zkm.png" alt=" " width="791" height="283"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;💡 Pratique pour :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🖊️ &lt;strong&gt;Renommer&lt;/strong&gt; rapidement &lt;strong&gt;toutes les strings similaires&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🎯 Chopper un &lt;strong&gt;multicurseur&lt;/strong&gt; dans une structure avec le même pattern&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Sélectionne le mot / bout de string que tu veux rechercher, puis &lt;code&gt;Ctrl&lt;/code&gt; + &lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;J&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;PHPStorm va te donner un multicurseur. A partir de là, tu peux renommer, te balader, etc. Ultra pratique, regarde, je sélectionne "code", j'utilise le raccourci, et BIM :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwv9po8ncyh9c5qk8t1ca.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwv9po8ncyh9c5qk8t1ca.gif" alt=" " width="502" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Add Selection for Next Occurence -  &lt;code&gt;Alt&lt;/code&gt; + &lt;code&gt;J&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff5baaw0rt3xilwjl1l9f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff5baaw0rt3xilwjl1l9f.png" alt=" " width="800" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similaire au raccourci plus haut, sauf qu'il va prendre &lt;strong&gt;l'occurence qui suit&lt;/strong&gt; celle qu'on vient de sélectionner, pas TOUTES (pratique si on veut faire la fine bouche).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhekmixagqonuru2m7ad5.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhekmixagqonuru2m7ad5.gif" alt=" " width="502" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Note, ces raccourcis fonctionnent également sur &lt;strong&gt;des bouts de strings&lt;/strong&gt;, que ce soit du texte ou du code... on peut donc être très créatif :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx8lj4yqyx0ob6ehrfenn.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx8lj4yqyx0ob6ehrfenn.gif" alt=" " width="502" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⛈️ &lt;strong&gt;Le commentaire de l'expert&lt;/strong&gt; : ces raccourcis sont tops pour modifier des chaines/clés/valeurs, mais pour tout ce qui est changement rapide de nom de variable ou de méthode, toujours utiliser l'outil de refactor &lt;code&gt;Shift&lt;/code&gt; + &lt;code&gt;F6&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>phpstorm</category>
      <category>productivity</category>
      <category>php</category>
      <category>webdev</category>
    </item>
    <item>
      <title>PHPStorm Tips #1 : Review une PR Github</title>
      <dc:creator>grena</dc:creator>
      <pubDate>Tue, 19 Jul 2022 19:07:38 +0000</pubDate>
      <link>https://dev.to/grena/phpstorm-tips-1-review-une-pr-github-4k4c</link>
      <guid>https://dev.to/grena/phpstorm-tips-1-review-une-pr-github-4k4c</guid>
      <description>&lt;p&gt;Tu savais qu'il était possible de review une PR GitHub directement depuis PHPStorm ?&lt;/p&gt;

&lt;p&gt;Assure-toi d'avoir le plugin GitHub (&lt;strong&gt;pré-installé&lt;/strong&gt; théoriquement) :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvwputvkaogfxnevf7w4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvwputvkaogfxnevf7w4.png" alt="Le plugin GitHub dans PHPStorm" width="524" height="677"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Puis dans l'onglet &lt;strong&gt;Pull Requests&lt;/strong&gt;, tu peux chercher des PRs par leur nom ! Regarde :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9wi22l4f2v8i7gesat4l.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9wi22l4f2v8i7gesat4l.gif" alt="Demonstration video du plugin" width="600" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;D'ici, tu peux même commencer une review, commenter, choisir l'affichage du diff (unified, split) et lâcher un GTM. C'est pas dingo ça ?&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;⛈️ &lt;strong&gt;Le commentaire de l'expert&lt;/strong&gt; : attention, PHPStorm &lt;strong&gt;ne tire pas la branche&lt;/strong&gt;, mais montre uniquement le diff. Tous les autres fichiers du projets sont donc à l'état de ta branche locale, ne te fais pas fumer !&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>phpstorm</category>
      <category>productivity</category>
      <category>php</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
