<?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: Esnare Maussa</title>
    <description>The latest articles on DEV Community by Esnare Maussa (@esnare).</description>
    <link>https://dev.to/esnare</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%2F379717%2Fd168b33e-4c7a-4fe2-bc4b-cf68230e5564.jpeg</url>
      <title>DEV Community: Esnare Maussa</title>
      <link>https://dev.to/esnare</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/esnare"/>
    <language>en</language>
    <item>
      <title>Using Lando with Drupal 9</title>
      <dc:creator>Esnare Maussa</dc:creator>
      <pubDate>Mon, 07 Sep 2020 08:01:18 +0000</pubDate>
      <link>https://dev.to/esnare/using-lando-with-drupal-9-3pbj</link>
      <guid>https://dev.to/esnare/using-lando-with-drupal-9-3pbj</guid>
      <description>&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/Esnare"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--13VpCFOD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p1ckk8b282nuz10791yv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
After years of working with MAMP, I decided to move my development stack to Docker and Docker Compose. I did it mainly out of curiosity as many of my colleagues were getting very excited with it.&lt;/p&gt;

&lt;p&gt;And there I went, I started to dive deep into Docker compose, I learnt how to create my own docker files, use Dockerhub and started to master the syntax from Docker Compose. Nevertheless, it seemed to me that I had to do so much boiler to spin up a workable Drupal site.&lt;/p&gt;

&lt;p&gt;One day, while browsing on the web, I found Lando!&lt;/p&gt;

&lt;p&gt;Lando, - as they put it from their website - &lt;em&gt;it's a free and open-source local development environment built on Docker container technology&lt;/em&gt;. Just by running on command: &lt;strong&gt;lando start&lt;/strong&gt;, you are able to run a fully LAMP-based infrastructure regardless of what OS you're using.&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="nv"&gt;$ &lt;/span&gt;lando start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lando is not only for Drupal but it also gives you a pool of frameworks to choose from. Very effortless, you are able to run Drupal, Laravel, WordPress and many more. &lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;Just head out to their installation page, they couldn't make it easier:&lt;br&gt;
&lt;a href="https://docs.lando.dev/basics/installation.html"&gt;https://docs.lando.dev/basics/installation.html&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Drupal 9 Configuiration
&lt;/h2&gt;

&lt;p&gt;After installing Lando locally, you can run &lt;strong&gt;lando init&lt;/strong&gt;, that command will help you to configure your site step by step.&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="nv"&gt;$ &lt;/span&gt;lando init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At the end of the process, you should end up having a &lt;strong&gt;.lando.yml&lt;/strong&gt; file, similar to the one below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;#.lando.yml&lt;/span&gt;
&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;my-project&lt;/span&gt;
&lt;span class="na"&gt;recipe&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;drupal9&lt;/span&gt;
&lt;span class="na"&gt;config&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;webroot&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;web&lt;/span&gt;
  &lt;span class="na"&gt;php&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;7.4"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;You can achieve the same by copying and pasting the code above into a &lt;strong&gt;.lando.yml&lt;/strong&gt; file inside of your root directory and then just run &lt;strong&gt;lando start&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Running Drush
&lt;/h2&gt;

&lt;p&gt;You can run Drush commands by prefixing lando at the beginning of the command, such as &lt;strong&gt;lando drush command&lt;/strong&gt;&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;#Example&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;lando drush cr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You won't have to worry about the Drush configuration anymore, Lando will take care that you are using the right PHP version and the right Drush version for your Drupal site.&lt;/p&gt;

&lt;h2&gt;
  
  
  More info about lando
&lt;/h2&gt;

&lt;p&gt;Here are some interesting links about Lando:&lt;br&gt;
&lt;a href="https://dev.to/esnaremaussa/debugging-drupal-9-with-xdebug-and-vscode-phpstorm-5ch6"&gt;Debugging Drupal 9 with Xdebug and (VSCode || PHPStorm)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.lando.dev/guides/lando-101/lando-overview.html"&gt;Lando Overview&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.lando.dev/config/drupal9.html"&gt;Lando Drupal9 recipe&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.lando.dev/config/tooling.html#getting-started"&gt;Tooling with Lando&lt;/a&gt;&lt;/p&gt;

</description>
      <category>drupal</category>
      <category>lando</category>
      <category>stalessdrupal</category>
      <category>statelesswebsite</category>
    </item>
    <item>
      <title>Debugging Drupal 9 with Xdebug and (VSCode || PHPStorm) </title>
      <dc:creator>Esnare Maussa</dc:creator>
      <pubDate>Sun, 06 Sep 2020 06:09:23 +0000</pubDate>
      <link>https://dev.to/esnare/debugging-drupal-9-with-xdebug-and-vscode-phpstorm-5ch6</link>
      <guid>https://dev.to/esnare/debugging-drupal-9-with-xdebug-and-vscode-phpstorm-5ch6</guid>
      <description>&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/Esnare" rel="noopener noreferrer"&gt;&lt;img src="https://media.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%2Fi2yx44fd0btopp8lkmpp.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
In the old days, debugging Drupal websites consisted of printing out an array variable and inspect its values within. However, today with a  more complex Drupal codebase, those days are gone and ... behold &lt;a href="https://github.com/xdebug/xdebug" rel="noopener noreferrer"&gt;Xdebug&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Xdebug emerged as a nicer tool for debugging Drupal 9 sites when developing modules or themes. Therefore, In this post will be configuring Xdebug with Lando and integrating with VSCode as well as PHPStorm.&lt;/p&gt;
&lt;h2&gt;
  
  
  Drupal 9 configuration
&lt;/h2&gt;

&lt;p&gt;Let's start with the Drupal 9 configuration, we will be using the Composer &lt;a href="https://github.com/drupal/recommended-project" rel="noopener noreferrer"&gt;drupal/recommended-project&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Thus we will spin off a new Drupal 9 site like so:&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="nv"&gt;$ &lt;/span&gt;composer create-project drupal/recommended-project my_site_name_dir
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Composer will take care of the third-party dependencies and downloading Drupal core files, just change the my_site_name_dir for the name of your project.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Lando configuration
&lt;/h2&gt;

&lt;p&gt;We will be using the &lt;a href="https://docs.lando.dev/config/drupal9.html" rel="noopener noreferrer"&gt;drupal9&lt;/a&gt; recipe for lando which already come with a LAMP-based system for running Drupal 9 sites. This recipe is using PHP 7.3 per default. However, we will be running PHP 7.4 so we can use the latest version from the time of writing this post.&lt;/p&gt;

&lt;p&gt;Here is my Lando (.lando.yml) file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;laboratory&lt;/span&gt;
&lt;span class="na"&gt;recipe&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;drupal9&lt;/span&gt;
&lt;span class="na"&gt;config&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;webroot&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;web&lt;/span&gt;
  &lt;span class="na"&gt;php&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;7.4&lt;/span&gt;
  &lt;span class="na"&gt;xdebug&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
  &lt;span class="na"&gt;config&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;php&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;./php.ini&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Here is a Gist for .lando.yml file: &lt;a href="https://gist.github.com/esnaremaussa/7328289a49fbdd628ed9f2a3e965d8d3" rel="noopener noreferrer"&gt;esnaremaussa/.lando.yml&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  xdebug: true
&lt;/h3&gt;

&lt;p&gt;With this option, Lando will include Xdebug in the Docker container.&lt;/p&gt;

&lt;h3&gt;
  
  
  php: ./php.ini
&lt;/h3&gt;

&lt;p&gt;This option will allow us to tell Lando to use our own php.ini configuration rather than using the default php.ini file.&lt;/p&gt;

&lt;h2&gt;
  
  
  php.ini configuration
&lt;/h2&gt;

&lt;p&gt;This is the php.ini you should include in your project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="c"&gt;; Xdebug
&lt;/span&gt;&lt;span class="py"&gt;xdebug.max_nesting_level&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;256&lt;/span&gt;
&lt;span class="py"&gt;xdebug.show_exception_trace&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;0&lt;/span&gt;
&lt;span class="py"&gt;xdebug.collect_params&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;0&lt;/span&gt;
&lt;span class="py"&gt;xdebug.remote_enable&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;1&lt;/span&gt;
&lt;span class="py"&gt;xdebug.remote_autostart&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;1&lt;/span&gt;
&lt;span class="py"&gt;xdebug.remote_host&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;${LANDO_HOST_IP}&lt;/span&gt;
&lt;span class="py"&gt;xdebug.remote_log&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;./xdebug.log&lt;/span&gt;
&lt;span class="py"&gt;xdebug.remote_port&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s"&gt;9000&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This is a Gist for the php.ini file &lt;a href="https://gist.github.com/esnaremaussa/7328289a49fbdd628ed9f2a3e965d8d3" rel="noopener noreferrer"&gt;esnaremaussa/php.ini&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is a very generic configuration for Xdebug and everything should work out of the box after running &lt;strong&gt;lando start&lt;/strong&gt;. Nevertheless, these two configuration items are very important, especially when experiencing problems with Xdebug:&lt;/p&gt;

&lt;h3&gt;
  
  
  xdebug.remote_port = 9000
&lt;/h3&gt;

&lt;p&gt;Xdebug will be listening on port 9000 per default. Nevertheless, if you run into issues with Xdebug, don't' hesitate to change the port to 9001 (or anything, really) and rebuild lando.&lt;/p&gt;

&lt;h3&gt;
  
  
  xdebug.remote_log = ./xdebug.log
&lt;/h3&gt;

&lt;p&gt;The xdebug.remote_log flag is used for defining the location of the Xdebug logs. Very handy when things don't work as expected. &lt;/p&gt;

&lt;p&gt;The name can be anything and be located anywhere within your working directory. Right now, as configured above, the xdebug.log file will be located at the root of the application.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Trust me, changing the port when experiencing problems with Xdebug may just fix all your problems and save you a lot of time wandering around.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Wrapping up (first part)
&lt;/h2&gt;

&lt;p&gt;Up to this point, you should be able to run &lt;strong&gt;lando start&lt;/strong&gt; and have a Drupal 9 site up and running with Xdebug listening on port 9000.&lt;/p&gt;

&lt;p&gt;For the second part, we will be configuring the most popular IDEs among PHP developers, VSCode and PHPStorm.&lt;/p&gt;

&lt;h2&gt;
  
  
  Xdebug and VSCode
&lt;/h2&gt;

&lt;p&gt;Configuring VSCode with Xdebug is very simple, all you have to do is following these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Make sure have installed the PHP Debug plugin.&lt;br&gt;
This plugin can be found here: &lt;a href="https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-debug" rel="noopener noreferrer"&gt;PHP Debug&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create the folder &lt;strong&gt;.vscode&lt;/strong&gt; in the root of your application and create the &lt;strong&gt;launch.json&lt;/strong&gt; file with the following code:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"0.2.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"configurations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Listen for XDebug"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"php"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"request"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"launch"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"port"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;9000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"log"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"pathMappings"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"/app/"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"${workspaceFolder}/"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: in the port section, make sure is the same port added in the php.ini file.&lt;br&gt;
This is a Gist for the launch.json file &lt;a href="https://gist.github.com/esnaremaussa/7328289a49fbdd628ed9f2a3e965d8d3" rel="noopener noreferrer"&gt;esnaremaussa/launch.json&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create breakpoints on your code.&lt;br&gt;
For testing purposes, you can go to the &lt;strong&gt;index.php&lt;/strong&gt; file and add $test = 1 and add that line as a breakpoint in VSCode.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to the debugger section on VSCode and run the option which says: &lt;strong&gt;Listen for XDebug&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Finally, go to your Lando site and refresh your browser.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You should end up seeing something like this:&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq7j45ta3xlvsxgc3itsh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq7j45ta3xlvsxgc3itsh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;NOTE: On the Breakpoint section (bottom left in the image above), &lt;strong&gt;Everything&lt;/strong&gt; is marked as default. You should uncheck all the breakpoints selected per default and only leave the ones you have marked in your code.&lt;br&gt;
For some reason, the default breakpoints do not work with Drupal.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  PHP Storm and Xdebug
&lt;/h2&gt;

&lt;p&gt;Let's breakdown the PHPStorm configuration is a series of steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open the configuration window.&lt;br&gt;
You can get there by clicking on: configuration -&amp;gt; Languages and Frameworks -&amp;gt; PHP&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foywlx1r5qoxqikrmsiep.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foywlx1r5qoxqikrmsiep.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On PHP language level, we tell PHPStorm that we will be using PHP 7.4&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4a3ygy6sv5gag4j3zduw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F4a3ygy6sv5gag4j3zduw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Let's configure the CLI Interpreter.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fybr4gqnmxlsvgi21qso1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fybr4gqnmxlsvgi21qso1.gif" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;NOTE: You will have to tell to PHPStorm the path of the Xdebug.so file, you can get that by running these commands:&lt;/p&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;lando ssh
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
&lt;/code&gt;&lt;/pre&gt;

&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Now, create some breakpoints and start listening for Xdebug connections.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1b7rqhboa1wzb39fsm51.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1b7rqhboa1wzb39fsm51.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Refresh your browser and the debugger will show up with the &lt;strong&gt;index.php&lt;/strong&gt; variables.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fp97zeleiynvig5bkmpfc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fp97zeleiynvig5bkmpfc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Up to this point, you should have a functional PHPStorm + Xdebug configuration. Nevertheless, there is more to it, you can have Drush, PHP Unit and more integrations with PHPStorm. &lt;/p&gt;

&lt;p&gt;I will add a couple of links at the end of the post where there will be more info about&lt;/p&gt;

&lt;p&gt;Have fun and debug away!&lt;/p&gt;

&lt;h2&gt;
  
  
  More Resources
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.lando.dev/guides/lando-phpstorm.html" rel="noopener noreferrer"&gt;https://docs.lando.dev/guides/lando-phpstorm.html&lt;/a&gt;&lt;br&gt;
&lt;a href="https://docs.lando.dev/guides/lando-with-vscode.html" rel="noopener noreferrer"&gt;https://docs.lando.dev/guides/lando-with-vscode.html&lt;/a&gt;&lt;br&gt;
&lt;a href="https://untoldhq.com/blog/2019/08/02/when-lando-phpstorm-and-xdebug-setup-gets-hairy" rel="noopener noreferrer"&gt;https://untoldhq.com/blog/2019/08/02/when-lando-phpstorm-and-xdebug-setup-gets-hairy&lt;/a&gt;&lt;/p&gt;

</description>
      <category>xdebug</category>
      <category>drupal</category>
      <category>vscode</category>
      <category>phpstorm</category>
    </item>
    <item>
      <title>Single sign-on with Simplesamlphp and Drupal 9</title>
      <dc:creator>Esnare Maussa</dc:creator>
      <pubDate>Mon, 20 Jul 2020 07:04:01 +0000</pubDate>
      <link>https://dev.to/esnare/single-sign-on-with-simplesamlphp-and-drupal-9-1h1b</link>
      <guid>https://dev.to/esnare/single-sign-on-with-simplesamlphp-and-drupal-9-1h1b</guid>
      <description>&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/Esnare" rel="noopener noreferrer"&gt;&lt;img src="https://media.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%2F59hg6f818ownf7n0wamz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Authentication is one of the most common features in any web development project. Therefore, Drupal, as one of the most popular CMS out there, has their own implementation and opinions about how authentication should be implemented.&lt;/p&gt;

&lt;p&gt;However, what happens when there are multiple sites under the same domain/subdomain and there is the need for one single login for all them, Do you have to tell your users to create multiple user accounts on each app/website? &lt;/p&gt;

&lt;p&gt;What if the app stack is made with different frameworks or there are other projects linked to your app/website, Does that mean the dev team will have to deal with their own opinionated authentication process as well?&lt;/p&gt;

&lt;p&gt;If you are asking yourself those questions, the answer may be that you need a single sign-on service for your applications.&lt;/p&gt;

&lt;p&gt;There are many services out which will give you all the tools you need to have one single login across all your application stack. Nevertheless, this blog post will focus on describing how to have one single login between two Drupal sites using the SAML open standard.&lt;/p&gt;

&lt;h2&gt;
  
  
  Here is our stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/esnaremaussa/drupal9-sp" rel="noopener noreferrer"&gt;Service Provider (Drupal 9 site)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/esnaremaussa/drupal9-idp" rel="noopener noreferrer"&gt;Identity Provider (Drupal 9 site)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.lando.dev/config/drupal9.html" rel="noopener noreferrer"&gt;Lando&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://simplesamlphp.org/" rel="noopener noreferrer"&gt;Simplesamlphp&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Drupal 9 websites
&lt;/h2&gt;

&lt;p&gt;We will need two Drupal 9 websites, the Identity Provider or IdP and the Service Provider or SP. &lt;/p&gt;

&lt;p&gt;These Drupal sites will be built with the composer &lt;em&gt;Recommended Project&lt;/em&gt; from Drupal:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

composer create-project drupal/recommended-project my_site_name_dir


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;More about Drupal and Composer here: &lt;a href="https://www.drupal.org/docs/develop/using-composer/using-composer-to-install-drupal-and-manage-dependencies" rel="noopener noreferrer"&gt;https://www.drupal.org/docs/develop/using-composer/using-composer-to-install-drupal-and-manage-dependencies&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Lando
&lt;/h2&gt;

&lt;p&gt;This is a great project that uses Docker for creating containers with all the necessary services to run any Drupal application. &lt;/p&gt;

&lt;p&gt;The great thing about Lando and/or Docker is that help us with a dev stack for stateless applications. In other words, we will be able to spin off new versions of the site very easily without having to configure or making complex changes in our OS.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://docs.lando.dev/config/drupal9.html" rel="noopener noreferrer"&gt;Lando documentation for Drupal&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Simplesamlphp
&lt;/h2&gt;

&lt;p&gt;This is the star of the show!&lt;br&gt;
Simplesamlphp is a PHP library that implements the SAML (&lt;strong&gt;S&lt;/strong&gt;ecurity &lt;strong&gt;A&lt;/strong&gt;ssertion &lt;strong&gt;M&lt;/strong&gt;arkup &lt;strong&gt;L&lt;/strong&gt;anguage) open standard. &lt;/p&gt;

&lt;p&gt;We will be looking into more details further down the road, but for now, implementing this library will give us that single login for all the applications in our stack.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://simplesamlphp.org" rel="noopener noreferrer"&gt;Checkout the documentation here&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Last but not least
&lt;/h2&gt;

&lt;p&gt;We will be also using these two fantastic projects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/drupalauth/simplesamlphp-module-drupalauth" rel="noopener noreferrer"&gt;Drupalauth&lt;/a&gt;: This is a module for the Simplesaml library which will connect Simplesaml with the Drupal user table.
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.drupal.org/project/drupalauth4ssp" rel="noopener noreferrer"&gt;DrupalAuth for SimpleSAMLphp&lt;/a&gt;: This is a Drupal module which will handle the connection between Drupal and Simplesaml.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What does IDP and SP even mean?
&lt;/h2&gt;

&lt;p&gt;These two concepts are the key components in a SMAL authentication process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Identity provider
&lt;/h3&gt;

&lt;p&gt;A SAML identity provider is a system entity that issues authentication assertions in conjunction with a single sign-on (SSO) profile of the Security Assertion Markup Language (SAML).&lt;/p&gt;

&lt;p&gt;In the SAML domain model, a SAML authority is any system entity that issues SAML assertions.[OS 1] Two important examples of SAML authorities are the authentication authority and the attribute authority.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Extracted from:  &lt;a href="https://en.wikipedia.org/wiki/Identity_provider_(SAML)" rel="noopener noreferrer"&gt;wikipedia.org&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Service provider
&lt;/h3&gt;

&lt;p&gt;A SAML service provider is a system entity that receives and accepts authentication assertions in conjunction with a single sign-on (SSO) profile of the Security Assertion Markup Language (SAML).&lt;/p&gt;

&lt;p&gt;In the SAML domain model, a SAML relying party is any system entity that receives and accepts information from another system entity.[OS 1] Of particular interest is a SAML relying party that receives and accepts a SAML assertion issued by a SAML authority.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Extracted from: &lt;a href="https://en.wikipedia.org/wiki/Service_provider_(SAML)" rel="noopener noreferrer"&gt;wikipedia.org&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  What does that mean for our project?
&lt;/h3&gt;

&lt;p&gt;In our stack, the IdP will be our main Drupal site where all the usernames and passwords will be stored. In other words, think of this site as the master site where all the other apps will be connected to in other to login.&lt;/p&gt;

&lt;p&gt;On the other hand, we have the SP, another Drupal 9 site, this site won't store any user data and, when users click on login, their login credentials (username and password) will be verified against the IdP.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enough theory, let's do this
&lt;/h2&gt;

&lt;p&gt;I have created two GitHub repositories one for the IDP and another for the SP:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The IDP&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/esnaremaussa/drupal9-idp" rel="noopener noreferrer"&gt;https://github.com/esnaremaussa/drupal9-idp&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;The SP&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/esnaremaussa/drupal9-sp" rel="noopener noreferrer"&gt;https://github.com/esnaremaussa/drupal9-sp&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Those repositories already include a &lt;strong&gt;.lando.yml&lt;/strong&gt; file. Therefore, running &lt;strong&gt;lando start&lt;/strong&gt; will spin off the Docker containers with the LAMP stack and any other fancy configuration for Drupal.&lt;/p&gt;

&lt;p&gt;You will end up with two sites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://idp.lndo.site/" rel="noopener noreferrer"&gt;https://idp.lndo.site/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://sp.lndo.site/" rel="noopener noreferrer"&gt;https://sp.lndo.site/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;NOTE: We will use Lando throughout this blog post, so I recommend to install it if you want to follow along.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Configuring the IdP website
&lt;/h2&gt;

&lt;p&gt;It's the moment for the &lt;a href="https://github.com/drupalauth/simplesamlphp-module-drupalauth" rel="noopener noreferrer"&gt;drupalauth&lt;/a&gt; and &lt;a href="https://www.drupal.org/project/drupalauth4ssp" rel="noopener noreferrer"&gt;DrupalAuth for SimpleSAMLphp&lt;/a&gt; projects to shine.&lt;/p&gt;

&lt;p&gt;As per the Drupalauth project documentation, there are two ways to do this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/drupalauth/simplesamlphp-module-drupalauth#authenticate-against-drupal-but-use-the-simplesamlphp-login-page" rel="noopener noreferrer"&gt;Authenticate against Drupal but use the SimpleSAMLphp login page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/drupalauth/simplesamlphp-module-drupalauth#authenticate-against-drupal-but-use-the-drupal-login-page" rel="noopener noreferrer"&gt;Authenticate against Drupal but use the Drupal login page&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We will be working with the 2nd option.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installing the Simplesamlphp library
&lt;/h3&gt;

&lt;p&gt;We will run the following command on the terminal:&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;# Downloding the drupalauth4ssp module&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;lando composer require drupal/drupalauth4ssp
&lt;span class="c"&gt;# Installing the drupalauth4ssp module&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;lando drush en drupalauth4ssp &lt;span class="nt"&gt;-y&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;With the above command, Composer will download all the third-party libraries we need for this project. Let me explain, the &lt;a href="https://www.drupal.org/project/drupalauth4ssp" rel="noopener noreferrer"&gt;Drupalauth4ssp&lt;/a&gt; module has listed the &lt;a href="https://simplesamlphp.org/download" rel="noopener noreferrer"&gt;Simplesamlphp&lt;/a&gt; library as well as &lt;a href="https://github.com/drupalauth/simplesamlphp-module-drupalauth" rel="noopener noreferrer"&gt;Drupalauth&lt;/a&gt; module as a dependency. Therefore, when Composer is downloading the Drupalauth4ssp, it will also download all the libraries we require to get Simplesaml working on our project. &lt;/p&gt;

&lt;p&gt;On top of that, Composer will take care of versioning. In other words, it will make sure that the right versions are downloaded for this project.&lt;/p&gt;

&lt;p&gt;You got to love composer!&lt;/p&gt;

&lt;p&gt;In order to double-check that everything was installed correctly, go to your vendor folder and look for the simplesamlphp project, then check inside the modules folder, the Drupalauth module should be there too.&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;# Check if the simplesamlphp library is installed&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lha&lt;/span&gt; vendor/simplesamlphp/simplesamlphp
&lt;span class="c"&gt;# Check if the Drupalauth module is installed&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lha&lt;/span&gt; vendor/simplesamlphp/simplesamlphp/modules/drupalauth


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Configuring the simplesamlphp library
&lt;/h3&gt;

&lt;p&gt;At the moment, the Simplesamlphp library is downloaded but we can't access it from the browser. The reason being, Drupal only allows specific folders to be accessible by Apache/Nginx. Let's fix this by creating a symlink from the www folder, inside the simplesamlphp folder, to the web folder.&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;# Connect inside the appserver container&lt;/span&gt;
lando ssh
&lt;span class="c"&gt;# Create the symlink&lt;/span&gt;
&lt;span class="nb"&gt;ln&lt;/span&gt; &lt;span class="nt"&gt;-nfs&lt;/span&gt; /app/vendor/simplesamlphp/simplesamlphp/www web/simplesaml


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  .htaccess configuration
&lt;/h3&gt;

&lt;p&gt;All directories on Drupal are protected by a configuration on the .htaccess file. Therefore, we need to whitelist Simplesmal directories so we can see it on the browser.&lt;/p&gt;

&lt;p&gt;Just after this line:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight apache"&gt;&lt;code&gt;

&lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/core/modules/statistics/statistics.php$


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Add the code:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight apache"&gt;&lt;code&gt;

  &lt;span class="c"&gt;# Allow access to simplesamlphp scripts.&lt;/span&gt;
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/[^/]*\.php$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/admin/[^/]*\.php$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/[^/]*\.php/sanitycheck/[^/]*\.php$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/[^/]*\.php/drupalauth/[^/]*\.php$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/[^/]*\.php/core/idp/[^/]*\.php$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/[^/]*\.php/saml/[^/]*\.php$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/saml2/idp/[^/]*\.php$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/saml2/idp/[^/]*\.php/drupal-userpass$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/[^/]*\.php/saml/sp/[^/]*\.php/default-sp$


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Although You should be able to access the Simplesaml from the browser now, you may be facing an error. This issues will be solved in the next step.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;IMPORTANT: From simplicity, I will be modifying configuration files from the vendor folder. However, this is not recommended and I will encourage you to look for the best way to persist the data for your configuration and deployment process.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Config Files and Metadata
&lt;/h3&gt;

&lt;p&gt;Currently, the IdP website is displaying some errors when accessing the simplesaml library at &lt;a href="https://idp.lndo.site/simplesaml/" rel="noopener noreferrer"&gt;https://idp.lndo.site/simplesaml/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's fix this by copy the configuration files from the config-templates to the config folder:&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;cp&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; vendor/simplesamlphp/simplesamlphp/config-templates/&lt;span class="k"&gt;*&lt;/span&gt; vendor/simplesamlphp/simplesamlphp/config


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;And let's the same for the metadata files&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;cp&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; vendor/simplesamlphp/simplesamlphp/metadata-templates/&lt;span class="k"&gt;*&lt;/span&gt; vendor/simplesamlphp/simplesamlphp/metadata


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Now, let's dive deep into the Simplesamlphp configuration.
&lt;/h3&gt;

&lt;p&gt;look for the config.php file inside the config folder and do the following changes:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;

 &lt;span class="s1"&gt;'secretsalt'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'RANDOM-NUMBER'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Running this command on the terminal will give you a random number for the secret salt:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;LC_CTYPE&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;C &lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'0123456789abcdefghijklmnopqrstuvwxyz'&lt;/span&gt; &amp;lt;/dev/urandom | &lt;span class="nb"&gt;dd &lt;/span&gt;&lt;span class="nv"&gt;bs&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;32 &lt;span class="nv"&gt;count&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1 2&amp;gt;/dev/null&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Master password for the Simplesamlphp backend:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;

 &lt;span class="s1"&gt;'auth.adminpassword'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'MySuperStrongPassword'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;You can use the story type you'd like, for this example, we will use MySQL:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;

 &lt;span class="s1"&gt;'store.type'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'sql'&lt;/span&gt; 
 &lt;span class="s1"&gt;'store.sql.dsn'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'mysql:host=database;dbname=drupal9'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="s1"&gt;'store.sql.username'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'drupal9'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
 &lt;span class="s1"&gt;'store.sql.password'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'drupal9'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Enable the IdP mode:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;

 &lt;span class="s1"&gt;'enable.saml20-idp'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Finally, add this line add the end of the config.php file:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;

 &lt;span class="nv"&gt;$config&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'baseurlpath'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'https://'&lt;/span&gt;&lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="nv"&gt;$_SERVER&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'HTTP_HOST'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="s1"&gt;'/simplesaml/'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Certificates
&lt;/h3&gt;

&lt;p&gt;Simplesaml requires certificates to be generate on the server for more security. A new cert folder will have to be created and generate the certificates there:&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;# Connect inside the appserver container&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;lando ssh
&lt;span class="c"&gt;# Create cert folder&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; vendor/simplesamlphp/simplesamlphp/cert
&lt;span class="c"&gt;# Go to the cert folder&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;vendor/simplesamlphp/simplesamlphp/cert
&lt;span class="c"&gt;# Generate certificates&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;openssl req &lt;span class="nt"&gt;-newkey&lt;/span&gt; rsa:3072 &lt;span class="nt"&gt;-new&lt;/span&gt; &lt;span class="nt"&gt;-x509&lt;/span&gt; &lt;span class="nt"&gt;-days&lt;/span&gt; 3652 &lt;span class="nt"&gt;-nodes&lt;/span&gt; &lt;span class="nt"&gt;-out&lt;/span&gt; server.crt &lt;span class="nt"&gt;-keyout&lt;/span&gt; server.pem


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  simplesamlphp-module-drupalauth configuration
&lt;/h3&gt;

&lt;p&gt;The Drupalauth project is a Simplesamlphp module which connects Simplesamlphp with the IdP website. In addition, it maps the Drupal user credentials in a way that Simplesamlphp can understand.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;NOTE: As stated at the beginning, we will be configuring the IdP site so it &lt;strong&gt;Authenticates against Drupal but use the Drupal login page&lt;/strong&gt;. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the configuration folder, look for the **authsources.php file, then copy and paste the following code:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;

 &lt;span class="s1"&gt;'drupal-userpass'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="s1"&gt;'drupalauth:External'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="c1"&gt;// The filesystem path of the Drupal directory.&lt;/span&gt;
        &lt;span class="s1"&gt;'drupalroot'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'/app/web/'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="c1"&gt;// Whether to turn on debug&lt;/span&gt;
        &lt;span class="s1"&gt;'debug'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="c1"&gt;// the URL of the Drupal logout page&lt;/span&gt;
        &lt;span class="s1"&gt;'drupal_logout_url'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'https://idp.lndo.site/user/logout'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="c1"&gt;// the URL of the Drupal login page&lt;/span&gt;
        &lt;span class="s1"&gt;'drupal_login_url'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'https://idp.lndo.site/user/login'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="c1"&gt;// Which attributes should be retrieved from the Drupal site.&lt;/span&gt;
        &lt;span class="s1"&gt;'attributes'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="k"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'field_name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'uid'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'attribute_name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'uid'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="k"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'field_name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'roles'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'attribute_name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'roles'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'field_property'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'target_id'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="k"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'field_name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'name'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'attribute_name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'cn'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="k"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'field_name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'mail'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'attribute_name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'mail'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="k"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'field_name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'field_first_name'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'attribute_name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'givenName'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="k"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'field_name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'field_last_name'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'attribute_name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'sn'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
            &lt;span class="k"&gt;array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'field_name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'field_organization'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'attribute_name'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'ou'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'field_property'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'target_id'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="p"&gt;],&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Metadata configuration
&lt;/h3&gt;

&lt;p&gt;For this section, we will be modifying the files inside the metadata folder:&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;ls &lt;/span&gt;vendor/simplesamlphp/simplesamlphp/metadata


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;At the moment, we just need to locate the saml20-idp-hosted.php and the drupal-userpass value on the auth key.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;

&lt;span class="s1"&gt;'auth'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'drupal-userpass'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;There will more metadata we need to configure but let's create the SP website first.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Testing your work so far&lt;/strong&gt;&lt;br&gt;
There is a very simple way to know if you have done the steps above properly. First, go to the Simplesamlphp backend, &lt;a href="https://idp.lndo.site/simplesaml" rel="noopener noreferrer"&gt;https://idp.lndo.site/simplesaml&lt;/a&gt;. Then, go to the &lt;em&gt;Test authentication sources&lt;/em&gt; section. Finally, click on the &lt;strong&gt;drupal-userpass&lt;/strong&gt; option listed there.&lt;/p&gt;

&lt;p&gt;After you click it, you should be taken to the Drupal login page. That means you're on track! ;)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Configuring the Service Provider (SP)
&lt;/h3&gt;

&lt;p&gt;Let's move on now and create a consumer website. We'll be using the &lt;a href="https://github.com/esnaremaussa/drupal9-sp" rel="noopener noreferrer"&gt;https://github.com/esnaremaussa/drupal9-sp&lt;/a&gt; repository to build this project.&lt;/p&gt;

&lt;p&gt;Run &lt;strong&gt;lando start&lt;/strong&gt; and you should be running your site at &lt;a href="https://sp.lndo.site" rel="noopener noreferrer"&gt;https://sp.lndo.site&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, download and install &lt;a href="https://www.drupal.org/project/simplesamlphp_auth" rel="noopener noreferrer"&gt;simpleSAMLphp Authentication&lt;/a&gt; module from Drupal.&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;# Download the simplesamlphp_auth Authentication module&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;lando composer require drupal/simplesamlphp_auth 
&lt;span class="c"&gt;# Install the simplesamlphp_auth Authentication module&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;lando drush en simplesamlphp_auth &lt;span class="nt"&gt;-y&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The simplesamlphp_auth has the Simplesamlphp library as a dependency. Therefore, you should be able to find it in your vendor folder after running the composer install command.&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuring the simplesamlphp_auth module
&lt;/h3&gt;

&lt;p&gt;This module is very flexible and offers a good set of configuration for your Drupal site. However, the module is disabled by default. &lt;/p&gt;

&lt;p&gt;For this example, we will make minimal changes to this module. Thus, go to the &lt;em&gt;User info and syncing&lt;/em&gt; tab and add the value &lt;strong&gt;uid&lt;/strong&gt; for the following fields:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SimpleSAMLphp attribute to be used as unique identifier for the user.&lt;/li&gt;
&lt;li&gt;SimpleSAMLphp attribute to be used as username for the user.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fz86vb7t1fqcu3327tzud.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fz86vb7t1fqcu3327tzud.png" alt="SimpleSamlConfiguration Drupal Backend"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuring the Simplesamlphp library for the  SP
&lt;/h3&gt;

&lt;p&gt;The Simplesamlphp library is a dependency for the simplesamlphp_auth module. Therefore, it should be downloaded in the vendor folder.&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;# Check if the simplesamlphp library is installed&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-lha&lt;/span&gt; vendor/simplesamlphp/simplesamlphp


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The configuration steps for the SP are pretty much the same as the IdP. Thus here is a quick summary of the commands for configuring the Simplesamlphp library:&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;# SSH the appserver container&lt;/span&gt;
lando ssh
&lt;span class="c"&gt;# Create the symlink&lt;/span&gt;
&lt;span class="nb"&gt;ln&lt;/span&gt; &lt;span class="nt"&gt;-nfs&lt;/span&gt; /app/vendor/simplesamlphp/simplesamlphp/www web/simplesaml


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;.httaccess configuration&lt;/strong&gt;&lt;br&gt;
Just after this line:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight apache"&gt;&lt;code&gt;

&lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/core/modules/statistics/statistics.php$


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Add the code:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight apache"&gt;&lt;code&gt;

  &lt;span class="c"&gt;# Allow access to simplesamlphp scripts.&lt;/span&gt;
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/[^/]*\.php$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/admin/[^/]*\.php$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/[^/]*\.php/sanitycheck/[^/]*\.php$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/[^/]*\.php/drupalauth/[^/]*\.php$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/[^/]*\.php/core/idp/[^/]*\.php$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/[^/]*\.php/saml/[^/]*\.php$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/saml2/idp/[^/]*\.php$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/saml2/idp/[^/]*\.php/drupal-userpass$
  &lt;span class="nc"&gt;RewriteCond&lt;/span&gt; %{REQUEST_URI} !/simplesaml/[^/]*\.php/saml/sp/[^/]*\.php/default-sp$


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Config Files and Metadata&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Add the code:&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;# Copy configuration template files&lt;/span&gt;
&lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; vendor/simplesamlphp/simplesamlphp/config-templates/&lt;span class="k"&gt;*&lt;/span&gt; vendor/simplesamlphp/simplesamlphp/config
&lt;span class="c"&gt;# Copy metadata template files&lt;/span&gt;
&lt;span class="nb"&gt;cp&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; vendor/simplesamlphp/simplesamlphp/metadata-templates/&lt;span class="k"&gt;*&lt;/span&gt; vendor/simplesamlphp/simplesamlphp/metadata


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Making changes on the config.php file&lt;/strong&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;

&lt;span class="s1"&gt;'secretsalt'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'RANDOM-NUMBER'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="s1"&gt;'auth.adminpassword'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'MySuperStrongPassword'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="s1"&gt;'store.type'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'sql'&lt;/span&gt; 
&lt;span class="s1"&gt;'store.sql.dsn'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'mysql:host=database;dbname=drupal9'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="s1"&gt;'store.sql.username'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'drupal9'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="s1"&gt;'store.sql.password'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'drupal9'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;

&lt;span class="c1"&gt;#Finally, add this line at the end of the config.php file:&lt;/span&gt;
&lt;span class="nv"&gt;$config&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'baseurlpath'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'https://'&lt;/span&gt;&lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="nv"&gt;$_SERVER&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'HTTP_HOST'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="mf"&gt;.&lt;/span&gt; &lt;span class="s1"&gt;'/simplesaml/'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Making changes on the authsources.php file&lt;/strong&gt;&lt;br&gt;
For the SP, we will use the &lt;em&gt;default-sp&lt;/em&gt; authentication source. &lt;/p&gt;

&lt;p&gt;Checkout the code snipped:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;

&lt;span class="s1"&gt;'idp'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'https://idp.lndo.site/simplesaml/saml2/idp/metadata.php'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Certificates&lt;/strong&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;# SSH the appserver container&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;lando ssh
&lt;span class="c"&gt;# Create cert folder&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; vendor/simplesamlphp/simplesamlphp/cert
&lt;span class="c"&gt;# Go to the cert folder&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;vendor/simplesamlphp/simplesamlphp/cert
&lt;span class="c"&gt;# Generate certificates&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;openssl req &lt;span class="nt"&gt;-newkey&lt;/span&gt; rsa:3072 &lt;span class="nt"&gt;-new&lt;/span&gt; &lt;span class="nt"&gt;-x509&lt;/span&gt; &lt;span class="nt"&gt;-days&lt;/span&gt; 3652 &lt;span class="nt"&gt;-nodes&lt;/span&gt; &lt;span class="nt"&gt;-out&lt;/span&gt; server.crt &lt;span class="nt"&gt;-keyout&lt;/span&gt; server.pem


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Metadata SP configuration&lt;/strong&gt;&lt;br&gt;
Open the file saml20-idp-hosted.php, inside the metadata folder and add the following code:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;

&lt;span class="s1"&gt;'auth'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'drupal-userpass'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  Exchanging Metadata between the SP and Idp
&lt;/h3&gt;

&lt;p&gt;This is the final step!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's add the SP metadata on the IdP&lt;/strong&gt;&lt;br&gt;
On your SP Simplesaml website, go to the &lt;em&gt;Federation&lt;/em&gt; tab, look for the &lt;em&gt;SAML 2.0 SP Metadata&lt;/em&gt; section and click on &lt;em&gt;show metadata&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;You should copy the PHP array on the metadata section.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you have been following along, this should be SP metadata URL: &lt;a href="https://sp.lndo.site/simplesaml/module.php/saml/sp/metadata.php/default-sp?output=xhtml" rel="noopener noreferrer"&gt;https://sp.lndo.site/simplesaml/module.php/saml/sp/metadata.php/default-sp?output=xhtml&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then, go to your IdP codebase, look for the metadata folder and locate the &lt;em&gt;saml20-sp-remote.php&lt;/em&gt; file, at the end of that file you should paste the PHP array.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;

&lt;span class="c1"&gt;# This is an example of the first lines of the metadata array.&lt;/span&gt;
&lt;span class="nv"&gt;$metadata&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'https://sp.lndo.site/simplesaml/module.php/saml/sp/metadata.php/default-sp'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;array&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="s1"&gt;'SingleLogoutService'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; 
  &lt;span class="k"&gt;array&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; 
    &lt;span class="k"&gt;array&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="s1"&gt;'Binding'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s1"&gt;'Location'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'https://sp.lndo.site/simplesaml/module.php/saml/sp/saml2-logout.php/default-sp'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="mf"&gt;.&lt;/span&gt;
&lt;span class="mf"&gt;.&lt;/span&gt;
&lt;span class="mf"&gt;.&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Let's add the IdP metadata on the SP&lt;/strong&gt;&lt;br&gt;
On your IdP Simplesaml website, go to the &lt;em&gt;Federation&lt;/em&gt; tab, look for the &lt;em&gt;SAML 2.0 IdP Metadata&lt;/em&gt; section and click on &lt;em&gt;show metadata&lt;/em&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you have been following along, this should be IdP metadata URL: &lt;a href="https://idp.lndo.site/simplesaml/saml2/idp/metadata.php?output=xhtml" rel="noopener noreferrer"&gt;https://idp.lndo.site/simplesaml/saml2/idp/metadata.php?output=xhtml&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then, go to your SP codebase, look for the metadata folder and locate the &lt;em&gt;saml20-idp-remote.php&lt;/em&gt; file, at the end of that file you should paste the PHP array.&lt;/p&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;

&lt;p&gt;&lt;span class="c1"&gt;# This is an example of the first lines of the metadata array.&lt;/span&gt;&lt;br&gt;
&lt;span class="nv"&gt;$metadata&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'&lt;a href="https://idp.lndo.site/simplesaml/saml2/idp/metadata.php" rel="noopener noreferrer"&gt;https://idp.lndo.site/simplesaml/saml2/idp/metadata.php&lt;/a&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;array&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;br&gt;
  &lt;span class="s1"&gt;'metadata-set'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'saml20-idp-remote'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;br&gt;
  &lt;span class="s1"&gt;'entityid'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'&lt;a href="https://idp.lndo.site/simplesaml/saml2/idp/metadata.php" rel="noopener noreferrer"&gt;https://idp.lndo.site/simplesaml/saml2/idp/metadata.php&lt;/a&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;br&gt;
  &lt;span class="s1"&gt;'SingleSignOnService'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;br&gt;
&lt;span class="mf"&gt;.&lt;/span&gt;&lt;br&gt;
&lt;span class="mf"&gt;.&lt;/span&gt;&lt;br&gt;
&lt;span class="mf"&gt;.&lt;/span&gt;&lt;/p&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
&lt;br&gt;
  &lt;br&gt;
  &lt;br&gt;
  Known issues&lt;br&gt;
&lt;/h3&gt;

&lt;p&gt;Currently, there is just one issue with the Drupalauth Simplesamlphp module. The Crypt::hashEquals function is deprecated for Drupal 9 and the hash_equals from PHP should be used instead.&lt;/p&gt;

&lt;p&gt;Have a look here: &lt;a href="https://github.com/drupalauth/simplesamlphp-module-drupalauth/issues/62" rel="noopener noreferrer"&gt;https://github.com/drupalauth/simplesamlphp-module-drupalauth/issues/62&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Wrapping Up
&lt;/h3&gt;

&lt;p&gt;And there you are!&lt;br&gt;
You should have now the Simplesamlphp library up and running on both SP and IdP sites. Also, you should be able to authenticate on the SP with the users registered on the IdP.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Statesless version&lt;/strong&gt;&lt;br&gt;
Lando not only provides the option of spin-off environments for Drupal development. It also allows to run configuration code before/after the services are up and running. This is possible because Lando is a superset of Docker and you should be able to do the same things that you normally do with Docker Compose.&lt;/p&gt;

&lt;p&gt;In other words, all those commands needed for the Simplesamlphp library configuration can be added to the IdP and SP websites before the app services are running, just like a CI/CD system.&lt;/p&gt;

&lt;p&gt;Go to any of these two projects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/esnaremaussa/drupal9-sp" rel="noopener noreferrer"&gt;Service Provider (Drupal 9 site)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/esnaremaussa/drupal9-idp" rel="noopener noreferrer"&gt;Identity Provider (Drupal 9 site)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There should be a branch called &lt;strong&gt;stateless&lt;/strong&gt;. In that branch, all the configuration explained here will be done automatically just by running &lt;strong&gt;lando start&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>drupal9</category>
      <category>sso</category>
      <category>singlesignon</category>
      <category>simplesamlphp</category>
    </item>
    <item>
      <title>Upgrading from Drupal 8 to Drupal 9 with Composer</title>
      <dc:creator>Esnare Maussa</dc:creator>
      <pubDate>Thu, 25 Jun 2020 03:26:43 +0000</pubDate>
      <link>https://dev.to/esnare/upgrading-from-drupal-8-to-drupal-9-with-composer-5639</link>
      <guid>https://dev.to/esnare/upgrading-from-drupal-8-to-drupal-9-with-composer-5639</guid>
      <description>&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/Esnare" rel="noopener noreferrer"&gt;&lt;img src="https://media.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%2Fww9e84kuwvghjsv85jxk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Drupal 9 is the new flagship of the popular Framework which was released on June 3, 2020 and it's ready to be used for Production sites.&lt;/p&gt;

&lt;p&gt;Here are the main Drupal 9 features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Symfony 4.4&lt;/li&gt;
&lt;li&gt;Twig 2&lt;/li&gt;
&lt;li&gt;CKEditor 4&lt;/li&gt;
&lt;li&gt;PHPUnit out of the box.&lt;/li&gt;
&lt;li&gt;Official composer template &lt;a href="https://github.com/drupal/recommended-project" rel="noopener noreferrer"&gt;drupal/recommended-project&lt;/a&gt;. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And many other tools for developers to play with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.drupal.org/docs/understanding-drupal/how-drupal-9-was-made-and-what-is-included" rel="noopener noreferrer"&gt;How Drupal 9 was made and what is included&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.drupal.org/docs/understanding-drupal/how-drupal-9-is-made-and-what-is-included/which-modules-have-been-removed" rel="noopener noreferrer"&gt;Which modules have been removed from Drupal 9?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Drupal 8.9
&lt;/h2&gt;

&lt;p&gt;Drupal 8.9 was released alongside with Drupal 9, this release includes the same features coming in Drupal 9 with the addition of having backward compatibility for public APIs.&lt;/p&gt;

&lt;p&gt;This version is also the end of the Drupal 8 era as there won't be any more updates after this. Therefore, there won't be an 8.10 version coming anytime soon.&lt;/p&gt;

&lt;p&gt;8.9 will be maintained until November 2021 and it's a great place to start the process of moving your current website to Drupal 9. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Upgrading to 8.9 will ensure maximum compatibility and the smallest necessary changes for the Drupal 9 update.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Drupal 9 and Composer
&lt;/h2&gt;

&lt;p&gt;If you have been using composer to build your Drupal 8 website, you have been probably using &lt;a href="https://github.com/drupal-composer/drupal-project" rel="noopener noreferrer"&gt;drupal-composer/drupal-project&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now Drupal 9 comes with an official template called &lt;a href="https://github.com/drupal/recommended-project" rel="noopener noreferrer"&gt;drupal/recommended-project&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;With this, you should be able to spin off new Drupal sites with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer create-project drupal/recommended-project my-project 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Let's start upgrading from D8 to D9
&lt;/h2&gt;

&lt;p&gt;Before attempt to upgrade your site to Drupal 9, you should update your Drupal 8 to the 8.9 version.&lt;/p&gt;

&lt;p&gt;As said before, Upgrading to 8.9 will ensure maximum compatibility and the smallest necessary changes for the Drupal 9 update.&lt;/p&gt;

&lt;h2&gt;
  
  
  Upgrade Status module
&lt;/h2&gt;

&lt;p&gt;This is a module from the community that tells you what modules need to be updated/patch, what line is the issue and - most of the time - hot to fix it.&lt;/p&gt;

&lt;p&gt;This a great module which works for custom and contrib projects.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.drupal.org/project/upgrade_status" rel="noopener noreferrer"&gt;https://www.drupal.org/project/upgrade_status&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This is the step where you will probably spend most of the time as you will have to make sure your current Drupal 8 website is compatible with the Drupal codebase. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Upgrading to Drupal 9 (core) using Composer
&lt;/h2&gt;

&lt;p&gt;Composer is the preferred way of moving forward to work with Drupal 9. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You will have to make sure all the libraries and modules installed on your current site are Drupal 9 compatible. Otherwise, you will get a lot of errors on the terminal thrown by Composer.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Run the following commands to get started with the process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Remove the &lt;strong&gt;drupal/core&lt;/strong&gt; entry in your composer.json file if you have it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Change access permissions for the default folder and the files inside of it:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;777 web/sites/default
find web/sites/default &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"*settings.php"&lt;/span&gt; &lt;span class="nt"&gt;-exec&lt;/span&gt; &lt;span class="nb"&gt;chmod &lt;/span&gt;777 &lt;span class="o"&gt;{}&lt;/span&gt; &lt;span class="se"&gt;\;&lt;/span&gt;
find web/sites/default &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"*services.yml"&lt;/span&gt; &lt;span class="nt"&gt;-exec&lt;/span&gt; &lt;span class="nb"&gt;chmod &lt;/span&gt;777 &lt;span class="o"&gt;{}&lt;/span&gt; &lt;span class="se"&gt;\;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Pull Drupal 9 and dev dependencies packages:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require drupal/core-recommended:^9.0.0 drupal/core-composer-scaffold:^9.0.0 drupal/core-project-message:^9.0.0 &lt;span class="nt"&gt;--update-with-dependencies&lt;/span&gt; &lt;span class="nt"&gt;--no-update&lt;/span&gt;
&lt;span class="c"&gt;# If you have drupal/core-dev installed.&lt;/span&gt;
composer require drupal/core-dev:^9.0.0 &lt;span class="nt"&gt;--dev&lt;/span&gt; &lt;span class="nt"&gt;--update-with-dependencies&lt;/span&gt; &lt;span class="nt"&gt;--no-update&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Update your local code:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Run database updates:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#Drush&lt;/span&gt;
drush updatedb

&lt;span class="c"&gt;#Drupal console&lt;/span&gt;
drupal update:execute
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Restoring default permissions:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;755 web/sites/default
find web/sites/default &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"*settings.php"&lt;/span&gt; &lt;span class="nt"&gt;-exec&lt;/span&gt; &lt;span class="nb"&gt;chmod &lt;/span&gt;644 &lt;span class="o"&gt;{}&lt;/span&gt; &lt;span class="se"&gt;\;&lt;/span&gt;
find web/sites/default &lt;span class="nt"&gt;-name&lt;/span&gt; &lt;span class="s2"&gt;"*services.yml"&lt;/span&gt; &lt;span class="nt"&gt;-exec&lt;/span&gt; &lt;span class="nb"&gt;chmod &lt;/span&gt;644 &lt;span class="o"&gt;{}&lt;/span&gt; &lt;span class="se"&gt;\;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;And voila!
Check that your site is up and running, run your tests - if that is your thing - and any custom functionality you have on your site.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The above steps are coming from the Drupal Community&lt;br&gt;
&lt;a href="https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-to-drupal-9-or-higher" rel="noopener noreferrer"&gt;https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-to-drupal-9-or-higher&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;The Drupal community promised that upgrading to Drupal 9 will be easier &lt;strong&gt;than the previous versions&lt;/strong&gt; and they hold their end of the bargain. Nevertheless, this is only true if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your website has been upgraded to each Drupal minor versions over the years.&lt;/li&gt;
&lt;li&gt;All custom/contrib modules are Drupal 9 compatible.&lt;/li&gt;
&lt;li&gt;Your custom/contrib themes are compatible with Twig 2.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>drupal9</category>
      <category>upgradedrupal</category>
      <category>drupal8todrupal9</category>
      <category>composer</category>
    </item>
    <item>
      <title>Drupal 8 and Deployer.org</title>
      <dc:creator>Esnare Maussa</dc:creator>
      <pubDate>Mon, 25 May 2020 10:31:55 +0000</pubDate>
      <link>https://dev.to/esnare/drupal-8-and-deployer-org-50oj</link>
      <guid>https://dev.to/esnare/drupal-8-and-deployer-org-50oj</guid>
      <description>&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/Esnare"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dO3RU1q---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/caavm58ytlo6gi3oe2zc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Over the years, I have been getting obsessed with Deployment systems, especially for Drupal/Laravel sites which is what I mostly work with.&lt;/p&gt;

&lt;p&gt;Drupal 8 is using composer now to pull the code from core and contrib modules making it easier the process of sending deployments to different environments. &lt;/p&gt;

&lt;p&gt;However, all the deployment systems I was using were custom bash code built by myself or my colleagues and I wanted something that it was built in PHP, after all, these deployment processes will be moving code for PHP frameworks like Drupal 8 and Laravel. Therefore, I just wanted to be consistent with just one programing language.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deployment automation has never been easier
&lt;/h3&gt;

&lt;p&gt;Before we start, here are a few concepts you need to visit first:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Drupal composer template: &lt;a href="https://github.com/drupal-composer/drupal-project"&gt;https://github.com/drupal-composer/drupal-project&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Atomic Deployments: &lt;a href="https://buddy.works/blog/introducing-atomic-deployments"&gt;https://buddy.works/blog/introducing-atomic-deployments&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Deployer (&lt;a href="https://deployer.org"&gt;https://deployer.org&lt;/a&gt;) is an atomic deployment tool built in PHP which supports deployments workflows for popular frameworks out of the box. &lt;/p&gt;

&lt;p&gt;Deployer uses &lt;a href="https://deployer.org/recipes.html"&gt;recipes&lt;/a&gt; to help you out with most of the boilerplate for the most popular frameworks out there. &lt;/p&gt;

&lt;p&gt;We will be using Drupal 8 to show how to implement it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Installation
&lt;/h3&gt;

&lt;p&gt;This will install deployed in your local computer&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-LO&lt;/span&gt; https://deployer.org/deployer.phar
&lt;span class="nb"&gt;mv &lt;/span&gt;deployer.phar /usr/local/bin/dep
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x /usr/local/bin/dep
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Getting Started
&lt;/h3&gt;

&lt;p&gt;With the installation above, you should be able to run the "dep" command. &lt;br&gt;
You could do something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;dep init &lt;span class="nt"&gt;-t&lt;/span&gt; Drupal8
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and create the basic boilerplate on your deploy.php file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting up the deploy.php file
&lt;/h3&gt;

&lt;p&gt;All the Deployer's logic will live in a file called deploy.php, I like to place it in my repository root so I can run Deployer commands directly from the root of my project.&lt;/p&gt;

&lt;p&gt;Let's see the content of the deploy.php file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="kn"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;Deployer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'recipe/drupal8.php'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// You should add server folder where your application lives.&lt;/span&gt;
&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'application'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'PATH TO YOUR SERVER FOLDER'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Add the Git URL from your Project&lt;/span&gt;
&lt;span class="c1"&gt;// TIP: the destination server should have access to clone the repo&lt;/span&gt;
&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'repository'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'GIT URL'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Set up the Share files or Directory&lt;/span&gt;
&lt;span class="c1"&gt;// In this case, we are using the Drupal 8 recepie. Therefore, Deployer will add the Drupal Files folder as a default share folder. &lt;/span&gt;
&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'shared_files'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;
&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'shared_dirs'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

&lt;span class="c1"&gt;// MAX releases you want o keep on your server&lt;/span&gt;
&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'keep_releases'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


&lt;span class="c1"&gt;// Hosts&lt;/span&gt;

&lt;span class="nf"&gt;host&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'IP ADDRESS DESTINATION SERVER'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'USER'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;port&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;identityFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'~/.ssh/id_rsa'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'deploy_path'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'/{{application}}'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Defining tasks
&lt;/h2&gt;

&lt;p&gt;Tasks are one of my Deployer's favourite features. With tasks, you can define instructions after or before one of the built-in Deployer tasks runs.&lt;br&gt;
Here is an example: Before my deployment finish I need to make sure the new files are using the www-data user and group.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Setting up a custom task called permissions:www-data&lt;/span&gt;
&lt;span class="nf"&gt;task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'permissions:www-data'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'chown -R www-data.www-data {{application}}'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Then at the end of my deploy.php file we add:&lt;/span&gt;
&lt;span class="nf"&gt;before&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'deploy:symlink'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'permissions:www-data'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I added a couple more tasks as an example, so here is my final deploy.php file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="kn"&gt;namespace&lt;/span&gt; &lt;span class="nn"&gt;Deployer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;require&lt;/span&gt; &lt;span class="s1"&gt;'recipe/drupal8.php'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// You should add server folder where your application lives.&lt;/span&gt;
&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'application'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'PATH TO YOUR SERVER FOLDER'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Add the Git URL from your Project&lt;/span&gt;
&lt;span class="c1"&gt;// TIP: the destination server should have access to clone the repo&lt;/span&gt;
&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'repository'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'GIT URL'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Set up the Share files or Directory&lt;/span&gt;
&lt;span class="c1"&gt;// In this case, we are using the Drupal 8 recepie. Therefore, Deployer will add the Drupal Files folder as a default share folder. &lt;/span&gt;
&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'shared_files'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;
&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'shared_dirs'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[]);&lt;/span&gt;

&lt;span class="c1"&gt;// MAX releases you want o keep on your server&lt;/span&gt;
&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'keep_releases'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;


&lt;span class="c1"&gt;// Hosts&lt;/span&gt;

&lt;span class="nf"&gt;host&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'IP ADDRESS DESTINATION SERVER'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;user&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'USER'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;port&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;identityFile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'~/.ssh/id_rsa'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'deploy_path'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'/{{application}}'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'permissions:www-data'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'chown -R www-data.www-data {{application}}'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nf"&gt;task&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'permissions:www-data:current-folder'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'chown -R www-data.www-data {{application}}/current'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nf"&gt;before&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'deploy:symlink'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'permissions:www-data'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="nf"&gt;after&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'deploy:symlink'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'permissions:www-data:current-folder'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Well, I guess I have covered the basics here :)&lt;/p&gt;

&lt;p&gt;Here is the docs in case you need more info: &lt;a href="https://deployer.org/docs/getting-started.html"&gt;https://deployer.org/docs/getting-started.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>drupal</category>
      <category>deployer</category>
      <category>atomicdeployment</category>
    </item>
  </channel>
</rss>
