<?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>Forem: Alexander Dyriavin</title>
    <description>The latest articles on Forem by Alexander Dyriavin (@dyriavin).</description>
    <link>https://forem.com/dyriavin</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%2F569288%2F899bd2cf-1328-415d-bad4-2f8565952b1a.jpg</url>
      <title>Forem: Alexander Dyriavin</title>
      <link>https://forem.com/dyriavin</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/dyriavin"/>
    <language>en</language>
    <item>
      <title>My Journey to Building a light theme</title>
      <dc:creator>Alexander Dyriavin</dc:creator>
      <pubDate>Thu, 27 Apr 2023 04:58:47 +0000</pubDate>
      <link>https://forem.com/dyriavin/my-journey-to-building-a-light-theme-770</link>
      <guid>https://forem.com/dyriavin/my-journey-to-building-a-light-theme-770</guid>
      <description>&lt;p&gt;Disclaimer: &lt;/p&gt;

&lt;p&gt;My intention is not to persuade you that a light theme is superior to a dark theme or vice versa. This is simply my personal experience, and I am sharing it with you without any intention of giving a recommendation.&lt;/p&gt;

&lt;p&gt;I was a Dark-mode person for a while, but a couple of years ago, I started to get less productive and got some strange pain in my eyes/head. I started looking around for what could be a root cause of this issue and came across those articles: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://en.wikipedia.org/wiki/Astigmatism" rel="noopener noreferrer"&gt;Astigmatism&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://pm.inf.ethz.ch/publications/AsenovHilligesMueller16.pdf" rel="noopener noreferrer"&gt;The Effect of Richer Visualizations on Code Comprehension&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tecfa.unige.ch/tecfa/maltt/cosys-2/textes/hall04.pdf" rel="noopener noreferrer"&gt;The impact of web page text-background colour&lt;br&gt;
combinations on readability, retention, aesthetics and behavioural intention&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://tidbits.com/2019/05/31/the-dark-side-of-dark-mode/" rel="noopener noreferrer"&gt;Dark side of dark mode&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;After experiencing issues with productivity and pain in my eyes and head, I knew that I needed to try a white theme to evaluate the differences and see if it could help solve my problems. I decided to conduct an experiment, which lasted for around two weeks, to determine whether a white theme would be suitable for me. However, the outcome was shocking, as by the end of the second week, after switching back to my favorite dark theme (Gruvbox &amp;lt;3) the experience was quite unexpected. I found myself struggling to focus for more than 15 minutes, and the symptoms of reduced productivity and pain in my eyes and head were slowly coming back. This made me realize the importance of finding the right theme for my own personal needs and preferences, and inspired me to continue exploring different options until I found the perfect fit.&lt;/p&gt;

&lt;p&gt;Over the years, I experimented with various themes, but none of them seemed to satisfy my needs. While there's no denying that a dark theme has a richer color palette and looks cooler than a light theme, I still felt that it wasn't the right fit for me. I used the GitHub light theme for a year, but eventually realized that it wasn't the perfect solution for me. This realization sparked an exciting journey for me, as I decided to build my own light theme. While it was a pleasant experience to use a theme maintained by someone else that was available for most of the tools I used, I was determined to create a theme that perfectly aligned with my personal preferences and requirements.&lt;/p&gt;

&lt;p&gt;As for my work setup, I use a MacBook as my primary machine for development, and I rely on a few key tools to get my work done. These tools include Visual Studio Code (Vscode), various products from JetBrains, and Warp.&lt;/p&gt;

&lt;p&gt;Once I had my desired color palette in mind, I began building my own theme starting with Vscode. I found that building a theme in Vscode was a relatively straightforward process, and there are a few key things to keep in mind if you're interested in building your own. &lt;/p&gt;

&lt;p&gt;First, it's important to know that Vscode uses textmate2 as a tokenizer engine, and you can find detailed documentation on how this works on the Vscode website. Additionally, there is a tool called VSCE that can greatly simplify the process of theme development, and I highly recommend checking it out if you're just starting out. &lt;/p&gt;

&lt;p&gt;Once you're ready to get started, follow the steps outlined on the Vscode website to begin building your theme. One thing to keep in mind is that tokens can be combined into several groups in the theme.json file, which can help you organize your theme and ensure that it works seamlessly across different programming languages and syntaxes.&lt;br&gt;
Vscode links:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://github.com/microsoft/vscode-vsce" rel="noopener noreferrer"&gt;VSCE&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://macromates.com/blog/categories/textmate-2/" rel="noopener noreferrer"&gt;Text mate 2 &lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/api/get-started/your-first-extension" rel="noopener noreferrer"&gt;vscode - Your First Extension&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/api/language-extensions/overview" rel="noopener noreferrer"&gt;vscode - Language Extensions Overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/api/working-with-extensions/publishing-extension" rel="noopener noreferrer"&gt;vscode - Publishing extension&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/api/working-with-extensions/publishing-extension" rel="noopener noreferrer"&gt;vscode - Semantic Highlighting Overview&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;During my first iteration of the theme, I understood that my color palette sucked. &lt;br&gt;
Vscode offers &lt;a href="https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide#scope-inspector" rel="noopener noreferrer"&gt;Token Inspector&lt;/a&gt; that allows you to find and style the token type. The overall development experience is incredible, even though textmate2 does not support some token types.  &lt;br&gt;
After a few weeks of working on the theme - I was finally happy with the outcome. &lt;br&gt;
For those who are interested - &lt;a href="https://marketplace.visualstudio.com/items?itemName=AlexanderDyriavin.mimesis" rel="noopener noreferrer"&gt;Mimesis theme vscode&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But it was only one-third of the journey, the vscode theme was completed, and I started working on the theme for Warp. &lt;/p&gt;

&lt;p&gt;Warp offers you a clean way of creating a theme. It's super simple: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use this app - &lt;a href="https://warp-themes.com/" rel="noopener noreferrer"&gt;Warp themes&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Use this vs code extension - &lt;a href="https://marketplace.visualstudio.com/items?itemName=haack.warp-companion" rel="noopener noreferrer"&gt;Warp companion&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Considering that I already had colors aligned, it took me 15 mins to make a couple of prototypes for warp. &lt;br&gt;
For those who are interested - &lt;a href="https://github.com/dyriavin/mimesis-warp" rel="noopener noreferrer"&gt;Mimesis theme warp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The last leg of my journey involved building the theme for JetBrains IDE's, which proved to be the most challenging part of the project. This was primarily because JetBrains products are JVM based, and the development process was quite heavyweight. However, the available documentation and tutorials were quite helpful in achieving the desired result. While creating the theme for the General Editor (where you type code) was relatively easy, and I could tweak it without writing any line of code, the process of getting the IDE UI just right was a mess.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Follow the steps from the &lt;a href="https://github.com/JetBrains/intellij-platform-plugin-template" rel="noopener noreferrer"&gt;official repository&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Enable &lt;a href="https://plugins.jetbrains.com/docs/intellij/internal-ui-laf-defaults.html" rel="noopener noreferrer"&gt;LAF&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Use &lt;a href="https://plugins.jetbrains.com/docs/intellij/internal-ui-inspector.html" rel="noopener noreferrer"&gt;UI inspector&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Update your theme file and re-run app, if you feel stuck follow this &lt;a href="https://www.youtube.com/watch?v=9J0j-90dC60" rel="noopener noreferrer"&gt;tutorial&lt;/a&gt; - there a lot of useful information in the playlist :) &lt;/li&gt;
&lt;li&gt;Editor themes - &lt;a href="https://www.jetbrains.com/help/idea/configuring-colors-and-fonts.html" rel="noopener noreferrer"&gt;Semantic Highlighting Overview&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Customize themes - &lt;a href="https://plugins.jetbrains.com/docs/intellij/themes-customize.html" rel="noopener noreferrer"&gt;Reference to doc&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;IDE UI components - &lt;a href="https://jetbrains.design/intellij/principles/platform_theme_colors/#UI-components" rel="noopener noreferrer"&gt;Reference to doc&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For those who are interested - &lt;a href="https://plugins.jetbrains.com/plugin/21180-mimesis-theme" rel="noopener noreferrer"&gt;Mimesis theme JetBrains&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I've open-sourced all of the work, if you are interested in contributing, investigate theme:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://github.com/dyriavin/mimesis-theme" rel="noopener noreferrer"&gt;Mimesis-Jetbrains&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/dyriavin/mimesis-vscode" rel="noopener noreferrer"&gt;Mimesis-vscode&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Summary: &lt;br&gt;
I am not an expert in this field, but I had a problem and sought a solution. I decided to make this post to save some time for people with the same struggles as me. &lt;br&gt;
I am happy with the results of my themes, but some minor inconsistencies will be fixed in the future. I enjoyed working with API/Documentation provided by all vendors, and it was a pleasant experience; I am grateful to the Product teams behind those products! &lt;/p&gt;

&lt;p&gt;If you are looking for a light theme but have yet to find something that works for you, I am inviting you to try my theme. &lt;/p&gt;

&lt;p&gt;But remember that I built it over my experiences and preferences - I don't and won't claim that this theam will boost your performance or it will work for you. This theme is a subjective interpretation of my personal preferences an experiences.&lt;/p&gt;

</description>
      <category>themebuilding</category>
      <category>lightthemes</category>
      <category>vscodethemes</category>
      <category>themes</category>
    </item>
    <item>
      <title>Underestimated PHP</title>
      <dc:creator>Alexander Dyriavin</dc:creator>
      <pubDate>Sat, 02 Jul 2022 23:50:04 +0000</pubDate>
      <link>https://forem.com/dyriavin/underestimated-php-30jd</link>
      <guid>https://forem.com/dyriavin/underestimated-php-30jd</guid>
      <description>&lt;p&gt;After browsing Reddit and Twitter I`ve noticed that the majority of developers underestimate PHP as a language. &lt;/p&gt;

&lt;p&gt;As with any programming language or technology, PHP comes to us with its pros and cons, however, it doesn't change the fact that PHP is widely used. &lt;/p&gt;

&lt;p&gt;PHP was changing over the years, but the last year provided a new breath to the language, seeing such effort from different people, I highly disagree with the opinion that "PHP is dying".&lt;/p&gt;

&lt;p&gt;Just a recent finding shows that with each release, PHP as a language involves and brings new features to the community. &lt;br&gt;
With combination with such great tools as: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://github.com/phpstan/phpstan" rel="noopener noreferrer"&gt;Static analysis&lt;/a&gt; or &lt;a href="https://github.com/nunomaduro/larastan" rel="noopener noreferrer"&gt;Laravel-lovers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/FriendsOfPHP/PHP-CS-Fixer" rel="noopener noreferrer"&gt;Coding Standards Fixer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/phpmd/phpmd" rel="noopener noreferrer"&gt;Mess detector&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/squizlabs/PHP_CodeSniffer" rel="noopener noreferrer"&gt;Analysis violations of a defined coding standard&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Some of the references:&lt;br&gt;
&lt;a href="https://github.com/php/web-php/pull/602" rel="noopener noreferrer"&gt;https://github.com/php/web-php/pull/602&lt;/a&gt; - redesign the PHP home page, to make it look more up-to-date with UI/UX trends. &lt;br&gt;
&lt;a href="https://wiki.php.net/rfc/auto-capture-closure" rel="noopener noreferrer"&gt;https://wiki.php.net/rfc/auto-capture-closure&lt;/a&gt; - Short Closures 2.0&lt;br&gt;
&lt;a href="https://thephp.foundation/blog/2022/06/30/php-core-roundup-3/" rel="noopener noreferrer"&gt;https://thephp.foundation/blog/2022/06/30/php-core-roundup-3/&lt;/a&gt; - Detailed report on progress from PHP-foundation collective&lt;/p&gt;

&lt;p&gt;If you find have such post interesting, please share it with me. &lt;/p&gt;

</description>
      <category>php</category>
      <category>webdev</category>
      <category>laravel</category>
      <category>symfony</category>
    </item>
    <item>
      <title>Serving sites with different PHP-version using Laravel-valet</title>
      <dc:creator>Alexander Dyriavin</dc:creator>
      <pubDate>Fri, 05 Feb 2021 21:43:30 +0000</pubDate>
      <link>https://forem.com/dyriavin/serving-sites-with-different-php-version-using-laravel-valet-49jl</link>
      <guid>https://forem.com/dyriavin/serving-sites-with-different-php-version-using-laravel-valet-49jl</guid>
      <description>

&lt;p&gt;Before starting doing anything from this article, make sure that you already have installed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Brew (&lt;a href="https://brew.sh/" rel="noopener noreferrer"&gt;https://brew.sh/&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;PHP (any version)&lt;/li&gt;
&lt;li&gt;Laravel-valet (&lt;a href="https://laravel.com/docs/8.x/valet" rel="noopener noreferrer"&gt;https://laravel.com/docs/8.x/valet&lt;/a&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Since this article is related to serving sites with different PHP version, I will skip parts with installing Brew, Laravel-valet, and so on.&lt;/p&gt;

&lt;p&gt;Let's assume that you already have installed php7.* version, but for some reason, you need to serve app which is using different version neither your installed. &lt;/p&gt;

&lt;p&gt;Run this commands step by step:&lt;/p&gt;

&lt;p&gt;Install needed PHP-version (brew install php@&lt;em&gt;.&lt;/em&gt; → in my case it will be &lt;a href="mailto:php@7.2"&gt;php@7.2&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Once it installed, brew link &lt;a href="mailto:php@7.2"&gt;php@7.2&lt;/a&gt; and then brew will prompt that you need to add env-path to your .zshrc/.bashrc:&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="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'export PATH="/usr/local/opt/php@7.2/bin:$PATH"'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.zshrc
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s1"&gt;'export PATH="/usr/local/opt/php@7.2/sbin:$PATH"'&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you need to apply changes with :&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="nb"&gt;source&lt;/span&gt; ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we have locally instaled 2 versions of PHP, in my case php7.4 &amp;amp; php7.2&lt;/p&gt;

&lt;p&gt;Next step will be changing the current version of PHP for Valet :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;valet use php@7.2 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All valet-services will be restarted and you will able to run commands from a terminal ( composer install, etc) for your project with the older version of PHP&lt;/p&gt;

&lt;p&gt;Now we need to link our App to valet-sites, in my case app is built with Laravel, so I need to go to the entry point of application and link it to Valet:&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="nb"&gt;cd &lt;/span&gt;my-app.loc/public
valet &lt;span class="nb"&gt;link &lt;/span&gt;my-app.loc 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That will create folder in valet. &lt;/p&gt;

&lt;p&gt;Now we need to secure our website to use SSL certificates and valet will generate Nginx configuration, which is needed to change fastcgi_pass&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;valet secure my-app.loc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again valet will restart needed services, and you will be able to make changes in Nginx config for your app.&lt;/p&gt;

&lt;p&gt;But for now, we need to make changes in our &lt;a href="http://php.in/" rel="noopener noreferrer"&gt;php.in&lt;/a&gt;i configuration.&lt;/p&gt;

&lt;p&gt;You need to find your &lt;a href="http://php.in/" rel="noopener noreferrer"&gt;php.in&lt;/a&gt;i file, to that just run and cd to your PHP-directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;php &lt;span class="nt"&gt;-i&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;php.ini
&lt;span class="c"&gt;# output will look like this: &lt;/span&gt;
&lt;span class="c"&gt;# Configuration File (php.ini) Path =&amp;gt; /usr/local/etc/php/7.4&lt;/span&gt;
&lt;span class="c"&gt;# Loaded Configuration File =&amp;gt; /usr/local/etc/php/7.4/php.ini&lt;/span&gt;
&lt;span class="c"&gt;# cd to your php directory &lt;/span&gt;
&lt;span class="nb"&gt;cd&lt;/span&gt; /usr/local/etc/php/&lt;span class="k"&gt;*&lt;/span&gt;.&lt;span class="k"&gt;*&lt;/span&gt;/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We are interested in PHP-fpm configuration which is used by Valet for serving sites, probably in most cases it will be located in the same folder as your PHP but in sub-folder called like "PHP-fpm.d", we need to change valet socket to ours, so cd to PHP-fpm directory and open "valet-fpm. conf" in your favourite IDE, we need to change "listen" directive&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;# By default it would like this&lt;/span&gt;
listen &lt;span class="o"&gt;=&lt;/span&gt; /Users/&lt;span class="k"&gt;**&lt;/span&gt;user-name&lt;span class="k"&gt;**&lt;/span&gt;/.config/valet/valet.sock
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We need to change it according to your requirements, in my case I have installed php7.4 ( primary ) and php7.2 (for the temporary project ), currently I am in php7.4 directory, so my settings will be :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;listen &lt;span class="o"&gt;=&lt;/span&gt; /Users/&lt;span class="k"&gt;**&lt;/span&gt;user-name&lt;span class="k"&gt;**&lt;/span&gt;/.config/valet/valet74.sock
&lt;span class="c"&gt;# Save the file and exit &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now we need to do the same actions but for php7.2 version (in my case ) :&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="nb"&gt;cd&lt;/span&gt; /usr/local/etc/php/7.2/php-fpm.d
vim php-fpm.d
&lt;span class="c"&gt;# Changing listen to php72.sock&lt;/span&gt;
listen &lt;span class="o"&gt;=&lt;/span&gt; /Users/&lt;span class="k"&gt;**&lt;/span&gt;user-name&lt;span class="k"&gt;**&lt;/span&gt;/.config/valet/valet72.sock
&lt;span class="c"&gt;# Save and exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Short explanation :&lt;/p&gt;

&lt;p&gt;We need this to valet will proxy the request to different PHP versions, so :&lt;/p&gt;

&lt;p&gt;php7.4 → valet74.sock&lt;/p&gt;

&lt;p&gt;php7.2 → valet72.sock&lt;/p&gt;

&lt;p&gt;php5.6 → valet56.sock and etc&lt;/p&gt;

&lt;p&gt;Now we need to update our Nginx configs for apps:&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="nb"&gt;cd&lt;/span&gt; ~/.config/valet/Nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this folder, you will find-out Nginx. conf for each of your linked site:&lt;br&gt;
Open needed config with any IDE, and find "fastcgi_pass", by default it will look like this :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;fastcgi_pass &lt;span class="s2"&gt;"unix:/Users/**user-name**/.config/valet/valet.sock"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c"&gt;# Change it to needed version of your php &lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now all we need to do it's just :&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="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; ~/.config/valet/valet.sock &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; valet restart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And finally, you can run different web-apps with different PHP-version at the same time. If something went wrong and your app doesn't work - and throws you an error like this :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    This package / app requires php 7.2 but your PHP version &lt;span class="o"&gt;(&lt;/span&gt;7.4&lt;span class="o"&gt;)&lt;/span&gt; does not satisfy that requirement.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure that your php7.2 is up and running using this command :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew services list 
&lt;span class="c"&gt;# if error /stopeed &lt;/span&gt;
brew services restart or start php7.2
&lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; ~/.config/valet/valet.sock &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; valet restart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you got any problems to let me know in the comments! Thanks for reading this article!&lt;/p&gt;

</description>
      <category>php</category>
      <category>laravel</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
