<?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: Christophe Jossart</title>
    <description>The latest articles on DEV Community by Christophe Jossart (@colorfield).</description>
    <link>https://dev.to/colorfield</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%2F162663%2F58b5494a-6fe9-4e38-b787-211c91531174.png</url>
      <title>DEV Community: Christophe Jossart</title>
      <link>https://dev.to/colorfield</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/colorfield"/>
    <language>en</language>
    <item>
      <title>Drupal, Gatsby, Next and friends</title>
      <dc:creator>Christophe Jossart</dc:creator>
      <pubDate>Tue, 20 Apr 2021 19:33:53 +0000</pubDate>
      <link>https://dev.to/colorfield/drupal-gatsby-next-and-friends-idh</link>
      <guid>https://dev.to/colorfield/drupal-gatsby-next-and-friends-idh</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally posted on &lt;a href="https://colorfield.be/blog/drupal-gatsby-next-and-friends"&gt;colorfield.be&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Gatsby and Next are both based on React and become more and more adopted, far beyond the Drupal sphere.&lt;br&gt;&lt;br&gt;
Choosing a decoupled solution comes with a resource cost though (budget, team-wise), and might not be the right fit for every project.&lt;/p&gt;

&lt;p&gt;We will not go too much into technical details here, and briefly cover these topics: why not just Drupal Twig and jQuery, when to use a Drupal backend or frontend, and how can we integrate it with Gatsby or Next today.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Why Gatsby or Next and not Drupal Twig with jQuery
&lt;/h2&gt;

&lt;p&gt;What brings decoupled solutions that Drupal could not offer?&lt;/p&gt;

&lt;p&gt;Modern JS frameworks are fast and secure by design especially while using SSG (Static Site Generator). No matter the rendering method, the Drupal API can be accessed by a reverse proxy to increase security and reduce the load on the backend.&lt;/p&gt;

&lt;p&gt;It opens the possibility to outsource frontend hosting to rather cheap platforms. There is a large variety nowadays like Gatsby Cloud, Vercel, Netlify, or GitHub pages that offer out-of-the-box a deployment pipeline, and most of the time a CDN. It will reduce server provisioning, maintenance, and security risks.&lt;/p&gt;

&lt;p&gt;Static generation removes caching complexity as Drupal frontend caching can be ignored in this case. Cache tags/contexts for invalidation can be rather complex for common cases like progressive decoupling or a site that has per region and language content. Also, Varnish is not a must-have when using SSG, so it can simplify the infrastructure.&lt;/p&gt;

&lt;p&gt;Some considerations, among others:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  A way better DX: jQuery in 2021 is not so awesome when we have EcmaScript 6+ and TypeScript available for the whole frontend stack&lt;/li&gt;
&lt;li&gt;  Schema stitching is quite powerful when multiple sources are needed&lt;/li&gt;
&lt;li&gt;  React / Node stack is popular, so a larger developer base can join the project and team&lt;/li&gt;
&lt;li&gt;  Drupal might not even be needed for smaller projects: decoupled content services like Prismic, Contentful, Cosmic, Sanity, or Wordpress can perfectly fit. Some platforms are also providing their own CMS (e.g. Netlify)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With CMS as a service, how can Drupal stay relevant compared to fully decoupled SaaS solutions with excellent developer and adopter experience?&lt;/p&gt;

&lt;h2&gt;
  
  
  2. When shall we use a Drupal backend (instead of any other decoupled CMS)
&lt;/h2&gt;

&lt;p&gt;The following non exhaustive cases could lead to the use of Drupal for the backend:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  A rather complex content model&lt;/li&gt;
&lt;li&gt;  A requirement for workflows (content moderation) or workspaces&lt;/li&gt;
&lt;li&gt;  Translation systems

&lt;ul&gt;
&lt;li&gt;  Drupal 8 and 9 are coming with a mature translation system for content, locale, and configuration&lt;/li&gt;
&lt;li&gt;  The &lt;a href="https://www.drupal.org/project/tmgmt"&gt;TMGMT&lt;/a&gt; module integrates with many translation providers (e.g. DeepL, Google or Supertext)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;  Media management: Drupal is powerful when it is about extending / exposing / searching internal or external media&lt;/li&gt;
&lt;li&gt;  When a high level of backend customization is needed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also, I've heard so many times that Drupal editor experience was far below solutions like Wordpress.&lt;br&gt;&lt;br&gt;
Well, Wordpress is aimed to stay simple, so no multilingual and content modeling (e.g. field builder) features out of the box means also less to expose on the UI.&lt;br&gt;&lt;br&gt;
My opinion could be biased, but the Media Library is there for a while now, and with the rise of Claro, &lt;a href="https://www.drupal.org/project/gin"&gt;Gin&lt;/a&gt;, and &lt;a href="https://www.drupal.org/project/gutenberg"&gt;Gutenberg&lt;/a&gt;, Drupal might be one of the best in class open source CMS regarding editorial experience.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CIxdVVYw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nndrd6quwe5x9c2bz6di.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CIxdVVYw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nndrd6quwe5x9c2bz6di.png" alt="Drupal Gutenberg editor"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3b2qCRKD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vfztcq95pc8yqhtrggvy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3b2qCRKD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vfztcq95pc8yqhtrggvy.png" alt="Gin Drupal admin theme"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. When shall we use a Drupal frontend
&lt;/h2&gt;

&lt;p&gt;The project size shouldn't matter here, it's perfectly valid to build a decoupled blog, portfolio or just keep it as a standalone Drupal solution (or also use progressive/soft decoupling).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Obviously, when the team is familiar with Drupal frontend specificities like template suggestions or preprocess hooks, and the stack is not already including a decoupled framework&lt;/li&gt;
&lt;li&gt;  When Drupal caching/performance solutions (page cache, big pipe, Varnish) can be used in production&lt;/li&gt;
&lt;li&gt;  When using many Webforms. It's possible to solve this with e.g. &lt;a href="https://www.drupal.org/project/webform_jsonschema"&gt;Webform JSON schema&lt;/a&gt; but can be rather complex for smaller projects&lt;/li&gt;
&lt;li&gt;  If the application exposes many content edit forms. In this case, Drupal also provides the heavy lifting out of the box. A possible way to go is to do the MVP or proof of concept in Drupal then progressively adopt a decoupled solution if it is needed&lt;/li&gt;
&lt;li&gt;  If the application already relies on many views&lt;/li&gt;
&lt;li&gt;  Some integrations are harder to implement, as the menu system or translations&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. React and Vue
&lt;/h2&gt;

&lt;p&gt;Why not Vue and &lt;a href="https://gridsome.org/"&gt;Gridsome&lt;/a&gt;?&lt;/p&gt;

&lt;p&gt;It could be a matter of preference. The React ecosystem has more integration for really common use cases. Just to name the most wanted: Multilingual and &lt;a href="https://stackshare.io/stackups/formik-vs-vue-formulate"&gt;Forms&lt;/a&gt; systems are both getting a larger support and documentation of common libraries.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Gatsby and Next
&lt;/h2&gt;

&lt;p&gt;Also, can be a matter of preference, but should not be chosen based on the backend, as both can source content from basically any backend. Next is still simpler for the routing system and shines when it comes to having SSR and SSG in the same project.&lt;/p&gt;

&lt;p&gt;There are plenty of resources that are comparing both, here are a few of them:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://www.gatsbyjs.com/features/jamstack/gatsby-vs-nextjs"&gt;Comparison of Gatsby vs Next.js (Gatsby)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.solutelabs.com/blog/gatsby-js-vs-next-js-which-one-to-choose-when"&gt;Gatsby.JS vs Next.JS — Which one to choose when?&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://blog.logrocket.com/next-js-vs-gatsbyjs-a-developers-perspective/"&gt;Next.js vs. GatsbyJS: comparing two React frameworks&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  6. SSR and SSG
&lt;/h2&gt;

&lt;p&gt;As mentioned above, it can make sense to mix SSR with SSG. Both &lt;a href="https://www.gatsbyjs.com/docs/reference/config-files/gatsby-ssr/"&gt;Gatsby&lt;/a&gt; and &lt;a href="https://nextjs.org/docs/basic-features/typescript#static-generation-and-server-side-rendering"&gt;Next&lt;/a&gt; have SSG and SSR, but Gatsby is mostly used with SSG.&lt;/p&gt;

&lt;h4&gt;
  
  
  SSR (Server Side Rendering)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  Lower level of entry, less boilerplate code&lt;/li&gt;
&lt;li&gt;  Pain points: rehydration, isomorphism, caching - see &lt;a href="https://addyosmani.com/blog/rehydration/"&gt;The Cost Of Client-side Rehydration (Addy Osmany)&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  The time to first byte is slower&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  SSG (Static Site Generation)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  It's static, so blazing fast&lt;/li&gt;
&lt;li&gt;  Pain points could be: &lt;a href="https://www.gatsbyjs.com/blog/gatsby-v3/"&gt;incremental builds&lt;/a&gt; time&lt;/li&gt;
&lt;li&gt;  Pagination and multilingual routes are generated at build time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Read more on &lt;a href="https://www.netlify.com/blog/2020/12/02/next.js-should-i-use-ssr-or-ssg/"&gt;Next.js: Should I use SSR or SSG?&lt;/a&gt; by Cassidy Williams&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Integration of Gatsby and Next with Drupal
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Gatsby
&lt;/h3&gt;

&lt;p&gt;The &lt;a href="https://www.drupal.org/project/gatsby"&gt;Gatsby module&lt;/a&gt; leverages preview and integration with incremental builds.&lt;/p&gt;

&lt;p&gt;To source content, both JSON:API and GraphQL modules will end up in a GraphQL API on Gatsby. See &lt;a href="https://www.gatsbyjs.com/docs/how-to/sourcing-data/sourcing-from-drupal/"&gt;Sourcing from Drupal&lt;/a&gt; and &lt;a href="https://www.gatsbyjs.com/plugins/gatsby-source-drupal-graphql/?=gatsby-source"&gt;Gatsby source plugins&lt;/a&gt; for other sources than Drupal.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4FvyZ-rg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jppoavl8c0dii0qs8lp9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4FvyZ-rg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jppoavl8c0dii0qs8lp9.png" alt="GraphiQL Gatsby"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are 2 ways to source content from Drupal:&lt;/p&gt;

&lt;h4&gt;
  
  
  JSON:API
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  In core, can be completed with &lt;a href="https://www.drupal.org/project/jsonapi_extras"&gt;JSON:API extras&lt;/a&gt; and &lt;a href="https://www.drupal.org/project/consumer_image_styles"&gt;Consumer Image Styles&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  Integrates with &lt;a href="https://www.gatsbyjs.com/plugins/gatsby-source-drupal/"&gt;Gatsby source plugin for JSON:API&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  GraphQL
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;  Is a &lt;a href="https://www.drupal.org/project/graphql"&gt;contributed module&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  GraphQL v3 is a bit like JSON:API regarding the setup, and aims to be a zero-config, with schema out of the box. It exposes everything, Drupalisms included. Persisted queries can bring some limitation (e.g. remove the permission to execute arbitrary queries)&lt;/li&gt;
&lt;li&gt;  GraphQL v4 requires you to write your own schema. The advantages are a more readable, predictable API for frontenders that might not know about Drupal. Also, it opens more possibilities regarding processing.&lt;/li&gt;
&lt;li&gt;  Integrates with &lt;a href="https://www.gatsbyjs.com/plugins/gatsby-source-drupal-graphql/"&gt;Gatsby source plugin for GraphQL&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Next
&lt;/h3&gt;

&lt;p&gt;The person that is behind the &lt;a href="https://www.drupal.org/project/next"&gt;Next Drupal module&lt;/a&gt; also provides a demo hosted on Vercel, with some &lt;a href="https://github.com/arshad/next-drupal/tree/master/examples"&gt;examples&lt;/a&gt;. Resources regarding the integration of Drupal with Next can be found on &lt;a href="https://next-drupal.org/"&gt;https://next-drupal.org/&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Learning resources
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Wes Bos courses
&lt;/h3&gt;

&lt;p&gt;Perhaps the fastest way to have good coverage of the full stack.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://advancedreact.com/"&gt;Advanced React and GraphQL&lt;/a&gt; covers Next with SSR, with Keystone.js for the backend&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://mastergatsby.com/"&gt;Master Gatsby&lt;/a&gt; with Sanity.io for the backend&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Support, discuss: Drupal Slack
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://drupal.slack.com/archives/CDQC1MDU6"&gt;#gatsby&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://drupal.slack.com/archives/C6LMJ0ZAT"&gt;#graphql&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://drupal.slack.com/archives/C01E36BMU72"&gt;#nextjs&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Examples
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://github.com/gatsbyjs/gatsby/tree/master/examples/using-drupal"&gt;Gatsby with Drupal&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/vercel/next.js/tree/canary/examples"&gt;Next integration&lt;/a&gt; (includes various decoupled CMS)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Decoupled solutions are out there for a few years now and become more and more mature. If they do not find a direct match in your projects,  just like learning a new language every year, they are opening perspectives and remain time well invested, even if this just opens new ways to think in Drupal.  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Photo by &lt;a href="https://unsplash.com/@guanju223?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Ju Guan&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/astronaut?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>drupal</category>
      <category>gatsby</category>
      <category>nextjs</category>
      <category>decoupled</category>
    </item>
    <item>
      <title>A minimal Drupal 9 local development environment</title>
      <dc:creator>Christophe Jossart</dc:creator>
      <pubDate>Sun, 28 Feb 2021 09:20:19 +0000</pubDate>
      <link>https://dev.to/colorfield/a-minimal-drupal-9-local-development-environment-2dm9</link>
      <guid>https://dev.to/colorfield/a-minimal-drupal-9-local-development-environment-2dm9</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally posted on &lt;a href="https://colorfield.be/blog/minimal-drupal-9-local-development-environment" rel="noopener noreferrer"&gt;colorfield.be&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We will see how to get a minimal and fast Drupal 9 setup in 3 commands.&lt;br&gt;&lt;br&gt;
It just relies on a PHP built-in server, so no Docker here, the only requirements are &lt;a href="https://getcomposer.org/download/" rel="noopener noreferrer"&gt;Composer&lt;/a&gt; and PHP.&lt;br&gt;&lt;br&gt;
Then, we will do a recap of the available tools for developers.&lt;/p&gt;

&lt;p&gt;The setup is not suitable for production, but is fine to evaluate a new version of Drupal locally, start a proof of concept, do some quick debugging on a vanilla setup, ...&lt;/p&gt;
&lt;h2&gt;
  
  
  Get Drupal and install it
&lt;/h2&gt;

&lt;p&gt;This command will get the last stable version (9.1.x at the time of writing).&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-directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install then the standard profile with the core install script, using SQLite.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;my-project-directory
php web/core/scripts/drupal &lt;span class="nb"&gt;install &lt;/span&gt;standard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it with the PHP built-in server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;web
php &lt;span class="nt"&gt;-S&lt;/span&gt; 127.0.0.1:8888
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And done :) your fresh Drupal site is now available: &lt;a href="http://127.0.0.1:8888" rel="noopener noreferrer"&gt;http://127.0.0.1:8888&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Notes
&lt;/h3&gt;

&lt;p&gt;To require a specific version, e.g. 8.9 or 9.2.x-dev&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:^9.2.x-dev my-project-directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To update the Drupal core, it is slightly different than the &lt;a href="https://github.com/drupal-composer/drupal-project" rel="noopener noreferrer"&gt;Composer template for Drupal projects&lt;/a&gt; way to go, if you are used to it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer update drupal/core &lt;span class="s1"&gt;'drupal/core-*'&lt;/span&gt; &lt;span class="nt"&gt;--with-all-dependencies&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Get common development tools
&lt;/h2&gt;

&lt;h3&gt;
  
  
  CLI utility
&lt;/h3&gt;

&lt;p&gt;Install Drush as a development dependency.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require &lt;span class="nt"&gt;--dev&lt;/span&gt; drush/drush
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the site status and list Drush commands.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;web
../vendor/bin/drush status
../vendor/bin/drush list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With Drush installed, it can be used to (re-)install your site, e.g. from the configuration, instead of the core script installation.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;../vendor/bin/drush si &lt;span class="nt"&gt;-y&lt;/span&gt; standard &lt;span class="nt"&gt;--sites-subdir&lt;/span&gt; default &lt;span class="nt"&gt;--account-name&lt;/span&gt; admin &lt;span class="nt"&gt;--account-pass&lt;/span&gt; admin &lt;span class="nt"&gt;--existing-config&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or to serve it, as a replacement of php -S&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;../vendor/bin/drush serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Code scaffolding
&lt;/h3&gt;

&lt;p&gt;For Drupal 9, you might be looking for Drupal Console, but &lt;a href="https://www.drupal.org/forum/general/general-discussion/2020-09-30/drupal-console-195-for-drupal-9" rel="noopener noreferrer"&gt;there is no current support for it&lt;/a&gt;.&lt;br&gt;&lt;br&gt;
Console was taking care of several other helpers (like &lt;em&gt;site:mode dev&lt;/em&gt;), but to scaffold code, you can find a replacement with the &lt;a href="https://www.drupal.org/project/module_builder" rel="noopener noreferrer"&gt;Module Builder&lt;/a&gt; project. Require then enable it (drush en module_builder) and visit &lt;a href="http://127.0.0.1:8888/admin/config/development/module_builder" rel="noopener noreferrer"&gt;http://127.0.0.1:8888/admin/config/development/module_builder&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require &lt;span class="nt"&gt;--dev&lt;/span&gt; drupal/module_builder
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Developer module
&lt;/h3&gt;

&lt;p&gt;Install &lt;a href="https://gitlab.com/drupalspoons/devel#introduction" rel="noopener noreferrer"&gt;Devel&lt;/a&gt;, it provides extra developer helpers like admin UI tools and Drush commands, var dumper, web profiler, content generation, ...&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require &lt;span class="nt"&gt;--dev&lt;/span&gt; drupal/devel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The var dumper can be a lightweight replacement of the xdebug one. Out of the box, the Symfony var dumper is available, but I like to use Kint in this case, which is more readable and now allows to search for expressions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;composer require &lt;span class="nt"&gt;--dev&lt;/span&gt; kint-php/kint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then configure Devel to use Kint, and use &lt;em&gt;kint()&lt;/em&gt;, &lt;em&gt;ksm()&lt;/em&gt; or &lt;em&gt;dpm()&lt;/em&gt; in your code.&lt;/p&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%2Fcolorfield.be%2Fsites%2Fdefault%2Ffiles%2Finline-images%2Fdevel-kint-variables-dumper.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%2Fcolorfield.be%2Fsites%2Fdefault%2Ffiles%2Finline-images%2Fdevel-kint-variables-dumper.png" alt="Devel Kint variables dumper configuration"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Examples
&lt;/h3&gt;

&lt;p&gt;For more than 10 years, the &lt;a href="https://www.drupal.org/project/examples" rel="noopener noreferrer"&gt;Examples for Developers&lt;/a&gt; module provides up-to-date and best practices code for most of the custom development tasks, and it is available for Drupal 9.&lt;/p&gt;

&lt;h3&gt;
  
  
  Update code from Drupal 8
&lt;/h3&gt;

&lt;p&gt;Reports and fixes deprecated code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://www.drupal.org/project/upgrade_rector" rel="noopener noreferrer"&gt;Upgrade Rector&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.drupal.org/project/upgrade_status" rel="noopener noreferrer"&gt;Upgrade Status&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Unit tests
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://www.drupal.org/docs/develop/using-composer/starting-a-site-using-drupal-composer-project-templates#s-adding-drupalcore-dev" rel="noopener noreferrer"&gt;Add Drupal core-dev&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.drupal.org/docs/automated-testing/phpunit-in-drupal/running-phpunit-tests" rel="noopener noreferrer"&gt;Run PHPUnit tests&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.drupal.org/project/cypress" rel="noopener noreferrer"&gt;Cypress E2E tests&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Code quality
&lt;/h3&gt;

&lt;p&gt;Most of them are not specific to Drupal, but can have Drupal support.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://github.com/mglaman/phpstan-drupal" rel="noopener noreferrer"&gt;PHPStan for Drupal&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://www.drupal.org/docs/contributed-modules/code-review-module/php-codesniffer-command-line-usage" rel="noopener noreferrer"&gt;PHP Code Sniffer&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/phan/phan" rel="noopener noreferrer"&gt;Phan&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://phpmd.org/" rel="noopener noreferrer"&gt;PHPMD&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/phpro/grumphp" rel="noopener noreferrer"&gt;GrumPHP&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;a href="https://www.drupal.org/docs/develop/using-composer/using-composer-to-install-drupal-and-manage-dependencies" rel="noopener noreferrer"&gt;Using Composer to Install Drupal and Manage Dependencies&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;  &lt;a href="https://github.com/shivammathur/homebrew-php" rel="noopener noreferrer"&gt;Homebrew PHP (Shivam Mathur)&lt;/a&gt; to switch local PHP version on Mac OS&lt;/li&gt;
&lt;/ul&gt;

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