Blog https://mglaman.dev/ open source php and drupal developer en What is the deployment identifier in Drupal? https://mglaman.dev/blog/what-deployment-identifier-drupal?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p dir="ltr">Did you know that Drupal has a deployment identifier? This deployment identifier triggers different actions in Drupal and can be used to streamline your Drupal deployments. In this video, I will walk through how the deployment identifier is used and how you set it.</p> <aside><div class="media-oembed-content-wrapper"> <iframe src="/media/oembed?url=https%3A//youtu.be/UL_Q_az_6vk&amp;max_width=0&amp;max_height=0&amp;hash=05ThWa1esRKEQpjDfaYXEDJEGAb7NDD6q6PIJlWdxug" frameborder="0" allowtransparency="" width="200" height="113" class="media-oembed-content" title="What is the deployment identifier in Drupal?"></iframe> </div> </aside> Sun, 06 Jun 2021 22:44:53 -0500 mglaman https://mglaman.dev/blog/what-deployment-identifier-drupal Funding open source development with Profit First methodology https://mglaman.dev/blog/funding-open-source-development-profit-first-methodology?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p>A friend shared the <a href="https://mikemichalowicz.com/profit-first/">Profit First book</a> with me a little after I started <a href="https://bluehorn.digital/">Bluehorn Digital</a>. I have been using it for a few months to allocate profits as legitimate benefits <em>right now</em> instead of at the end of the year when it vanishes and is just some accounting magic. But, what do I do with that profit? What do I do with the profit that is generated by the few subcontractors I have? </p> <p>I could pocket it and have an extravagant dinner. That's actually what the book says you should do every quarter with 50% of the profit you have set aside. The remaining 50% is emergency cash for the business. I have decided on a different approach with <a href="https://bluehorn.digital/">Bluehorn Digital</a>. Instead I am focusing on training materials and funding open source projects that I rely on to do daily business.</p> Mon, 17 May 2021 09:00:59 -0500 mglaman https://mglaman.dev/blog/funding-open-source-development-profit-first-methodology 🥳 phpstan-drupal 0.12.10 out! https://mglaman.dev/blog/phpstan-drupal-01210-out?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p>I just released <a href="https://github.com/mglaman/phpstan-drupal/releases/tag/0.12.10">phpstan-drupal 0.12.10</a>, which includes a major bug fix and major feature.</p> Wed, 12 May 2021 23:39:49 -0500 mglaman https://mglaman.dev/blog/phpstan-drupal-01210-out Hack and Play – a new weekly live stream session https://mglaman.dev/blog/hack-and-play-new-weekly-live-stream-session?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <aside class="align-center"><div> <img src="/sites/default/files/styles/homepage_/public/2021-05/xavi-cabrera-kn-UmDZQDjM-unsplash.jpeg?itok=qFoQO2qh" alt="Legos" /></div> </aside><p>I'm adding a new Wed, 05 May 2021 09:02:45 -0500 mglaman https://mglaman.dev/blog/hack-and-play-new-weekly-live-stream-session Adding CodePen oEmbeds to your Drupal site https://mglaman.dev/blog/adding-codepen-oembeds-your-drupal-site?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <aside class="align-center"><div> <img src="/sites/default/files/styles/homepage_/public/2021-04/Screen%20Shot%202021-04-30%20at%2012.40.44%20AM.png?itok=DmmZnITy"> Fri, 30 Apr 2021 00:40:13 -0500 mglaman https://mglaman.dev/blog/adding-codepen-oembeds-your-drupal-site Formatting time elements to match the current user's locale https://mglaman.dev/blog/formatting-time-elements-match-current-users-locale?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p>I recently created a <a data-entity-substitution="canonical" data-entity-type="node" data-entity-uuid="62c9b172-0081-4564-8268-cdf8d57ab37b" href="/live" title="Live"><strong>Live</strong></a> page to promote my upcoming live coding streams and ways to find my previous ones. I have the times listed. However, times are hard. I first shipped them without specifying the CDT timezone – sorry folks. But still, this is a pain and unfriendly to anyone in a different timezone.</p> <p>Heck, I even have a hard time translating 24h time format from EDT to CDT, let alone UTC. So I wrote some vanilla JavaScript to transform the times into the current user's locale – no dependencies! </p> <p>Drupal outputs its datetime fields in a <code>time</code> element with the <code>datetime</code> attribute, which contains the datetime string. Here's an example:</p> Thu, 29 Apr 2021 00:12:38 -0500 mglaman https://mglaman.dev/blog/formatting-time-elements-match-current-users-locale Migrating to TailwindCSS, iteratively, in your Drupal theme https://mglaman.dev/blog/migrating-tailwindcss-iteratively-your-drupal-theme?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p>I'm a huge fan of <a href="https://tailwindcss.com/">TailwindCSS</a>.&nbsp;After using it, I find writing media queries for responsive interfaces complicated instead of leveraging the responsive variants of Tailwind. Not to mention I can stop fretting over the naming of my classes to ensure I meet my own made-up SMACSS/BEM standard.</p> <p>I am migrating my personal site to use Tailwind.&nbsp;The current version isn't anything fancy, it's mostly vanilla CSS, but I pass it through PostCSS for some cleanup via Gulp.&nbsp;</p> <p><strong>My new setup</strong>: Tailwind&nbsp;with purging compiled via <a href="https://github.com/JeffreyWay/laravel-mix">Laravel Mix</a>.&nbsp;</p> <p>I have some things moved over to Tailwind right now and could preserve the existing styling while ripping some things out.</p> <p>If you find this interesting!</p> Thu, 22 Apr 2021 09:10:06 -0500 mglaman https://mglaman.dev/blog/migrating-tailwindcss-iteratively-your-drupal-theme GitHub Action for setting up Drupal for testing https://mglaman.dev/blog/github-action-setting-drupal-testing?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p>I have written my first GitHub Action – <a href="https://github.com/marketplace/actions/setup-drupal-action">bluehorndigital/setup-drupal</a>. In my phpstan-drupal and drupal-check projects I have various GitHub Actions workflows that build a Drupal project via Composer.</p> Mon, 19 Apr 2021 23:07:15 -0500 mglaman https://mglaman.dev/blog/github-action-setting-drupal-testing Livestream schedule update https://mglaman.dev/note/livestream-schedule-update?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p>Hey all! I've been keeping a steady schedule with my live streaming and wanted to share it:</p> <p>Drupal 10 Readiness Tooling Contributions: <span>Wednesdays at 2:00 PM / 7:00PM UTC</span></p> <p><span>Simplytest.me Development: Sundays at 10:00 AM CDT / 3:00 PM UTC</span></p> <p>Tune in on Twitch, follow to get notified when I go live!</p> Fri, 16 Apr 2021 20:29:22 -0500 mglaman https://mglaman.dev/note/livestream-schedule-update Watch: Nightwatch testing training to help get Olivero stable for Drupal 9.2! https://mglaman.dev/blog/watch-nightwatch-testing-training-help-get-olivero-stable-drupal-92?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p>I am a little late getting this blog published. The end of March and early part of April just blew right past. However, I wanted to share the recordings from the Nightwatch.js training I gave at MidCamp on March 25th. I showed folks how to run Drupal's <a href="https://nightwatchjs.org/">Nightwatch.js</a> test suite locally, with <a href="https://www.ddev.com/ddev-local/">DDEV</a> and <a href="https://lando.dev/">Lando</a>.</p> <p>The workshop code is available on the Bluehorn Digital GitHub organization, with documentation. I plan to develop this for all future testing workshops and keep it open for folks to learn from outside of paid workshops. In fact, the repo runs GitHub Actions to test the various setups and executes Drupal tests – the tests run tests to test that the tests can be tested! 😵</p> Fri, 09 Apr 2021 21:39:29 -0500 mglaman https://mglaman.dev/blog/watch-nightwatch-testing-training-help-get-olivero-stable-drupal-92 MidCamp is here! https://mglaman.dev/note/midcamp-here?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p>MidCamp is here! And they have got <a href="https://gather.town/app/yOKkaWaSoHfJ1Rft/midcamp">Gather.town</a> setup! Register for the conference and <a href="https://www.midcamp.org/2021/article/register-midcamp-and-win">have a change to win some sweet prizes</a>. Check out today's schedule: <a href="https://www.midcamp.org/2021/get-started-drupal">https://www.midcamp.org/2021/get-started-drupal</a></p> Tue, 23 Mar 2021 23:18:38 -0500 mglaman https://mglaman.dev/note/midcamp-here Come hack with me as we get Drupal Rector automation prepared https://mglaman.dev/blog/come-hack-me-we-get-drupal-rector-automation-prepared?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <aside class="align-center"><div> <img src="/sites/default/files/styles/homepage_/public/2021-03/christopher-burns-8KfCR12oeUM-unsplash.jpeg?itok=K12DrypV" alt="Constriction" /></div> Mon, 22 Mar 2021 16:53:17 -0500 mglaman https://mglaman.dev/blog/come-hack-me-we-get-drupal-rector-automation-prepared Simplytest live stream March 20th https://mglaman.dev/note/simplytest-live-stream-march-20th?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p>Woah! I forgot to remind folks: I'll be doing another live Simplytest development sprint this Sunday at 10AM CDT on my YouTube channel</p> <p>I'll be tackling semantic versions in projects with core computability for the sandbox launch form</p> <p><a href="https://youtube.com/watch?v=3zp2CSwYY4k">https://youtube.com/watch?v=3zp2CSwYY4k</a></p> Fri, 19 Mar 2021 21:55:46 -0500 mglaman https://mglaman.dev/note/simplytest-live-stream-march-20th drupal-check and phpstan-drupal are Drupal 9 and PHP 8 ready https://mglaman.dev/blog/drupal-check-and-phpstan-drupal-are-drupal-9-and-php-8-ready?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p>I am happy to announce that <a href="https://github.com/mglaman/phpstan-drupal">phpstan-drupal</a> and <a href="https://github.com/mglaman/drupal-check">drupal-check</a> are Drupal 9 and PHP 8 ready! Both projects have CI pipelines running tests and analysis to make sure they're compatible as we start the journey for Drupal 10 (😱 already? I know!)</p> <p>Florida DrupalCamp <a data-entity-substitution="canonical" data-entity-type="node" data-entity-uuid="0e84c816-7810-4e48-8f8b-828ebda718eb" href="/blog/florida-drupalcamp-funding-d9-and-php-8-support-phpstan-drupal" title="Florida DrupalCamp is funding D9, and PHP 8 support for phpstan-drupal">sponsored 20 hours of development</a>. Since my funding is from the community, I have been working on these projects via a live stream on <a href="https://www.twitch.tv/mglaman">Twitch</a> every Wednesday.</p> Fri, 19 Mar 2021 09:03:21 -0500 mglaman https://mglaman.dev/blog/drupal-check-and-phpstan-drupal-are-drupal-9-and-php-8-ready It's almost time for MidCamp! Are you going (because you should!) https://mglaman.dev/blog/its-almost-time-midcamp-are-you-going-because-you-should?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <aside class="align-center"><div> <img src="/sites/default/files/styles/homepage_/public/2021-03/Screen%20Shot%202021-03-10%20at%2011.45.10%20AM.png?itok=5RPGRaZ6"> Wed, 10 Mar 2021 12:06:37 -0600 mglaman https://mglaman.dev/blog/its-almost-time-midcamp-are-you-going-because-you-should Getting phpstan-drupal PHP 8 ready starts, now! https://mglaman.dev/blog/getting-phpstan-drupal-php-8-ready-starts-now?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p>This week I will be kicking off development for phpstan-drupal after <a href="https://mglaman.dev/blog/florida-drupalcamp-funding-d9-and-php-8-support-phpstan-drupal">Florida DrupalCamp astoundingly&nbsp;met my funding goals</a>. Since this open source work and I am being funded publicly, I plan to do as much development over live streams as possible. I really enjoy live coding, and I hope it helps teach folks some tricks.</p> <p>I have been using <a href="https://www.youtube.com/channel/UCFntxnFeNN9DXNNrPi4s4Hg">YouTube</a> for my scheduled live streams, but I plan on giving Twitch a try. If you'd like to pop in and watch along as I work on the testing matrix for phpstan-drupal, follow me and get notified when I go live:&nbsp;<a href="https://www.twitch.tv/mglaman">https://www.twitch.tv/mglaman</a>. I plan on going live&nbsp;<em>at least</em>&nbsp;every Wednesday at 1 PM CST (7 PM UTC) for two hours.</p> Mon, 08 Mar 2021 09:41:41 -0600 mglaman https://mglaman.dev/blog/getting-phpstan-drupal-php-8-ready-starts-now SimplyTest live coding March 7th https://mglaman.dev/note/simplytest-live-coding-march-7th?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p>Before I kick off renewed phpstan-drupal development next week, I'm going to do another live coding session while working on SimplyTest this Sunday (March 7th) at 10 AM CST / 4 PM UTC. We are getting closer and closer to launching the new version!</p> <p>Visit the stream placeholder and set a reminder for when I kick-off:&nbsp;<a href="https://www.youtube.com/watch?v=L823Zd0-dac">https://www.youtube.com/watch?v=L823Zd0-dac</a></p> Thu, 04 Mar 2021 12:46:16 -0600 mglaman https://mglaman.dev/note/simplytest-live-coding-march-7th Florida DrupalCamp is funding D9, and PHP 8 support for phpstan-drupal https://mglaman.dev/blog/florida-drupalcamp-funding-d9-and-php-8-support-phpstan-drupal?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <aside class="align-center"><div> <img src="/sites/default/files/styles/homepage_/public/2021-03/Screen%20Shot%202021-03-03%20at%202.05.48%20PM.png?itok=5gYnUiPv" alt="FLDC"> Wed, 03 Mar 2021 16:07:46 -0600 mglaman https://mglaman.dev/blog/florida-drupalcamp-funding-d9-and-php-8-support-phpstan-drupal Generating sustainable development funding for phpstan-drupal https://mglaman.dev/blog/generating-sustainable-development-funding-phpstan-drupal?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <aside class="align-center"><div> <img src="/sites/default/files/styles/homepage_/public/2021-03/abby-anaday-Nnn2Dc6niVU-unsplash.jpg?itok=ikvPVai3" alt="Windmills and sustainable funding" /></div> </aside>&lt; Wed, 03 Mar 2021 08:00:14 -0600 mglaman https://mglaman.dev/blog/generating-sustainable-development-funding-phpstan-drupal drupal-check and phpstan-drupal on indefinite development hiatus https://mglaman.dev/blog/drupal-check-and-phpstan-drupal-indefinite-development-hiatus?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <aside class="align-center"><div> <img src="/sites/default/files/styles/homepage_/public/2021-02/jens-johnsson-hUqt9UQM_5Q-unsplash.jpg?itok=LFOcD2AH" alt="crossroads" /></div> </aside><p><strong>ANN Sun, 28 Feb 2021 16:17:36 -0600 mglaman https://mglaman.dev/blog/drupal-check-and-phpstan-drupal-indefinite-development-hiatus Wait, don't (immediately) send that email! https://mglaman.dev/blog/wait-dont-immediately-send-email?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p>There is a truth in modern life no one wants to admit – we are addicted to email. We hate it, yet we absolutely love it. The long list of things to read and process, to decide what is important or not. The rush we get as we finally tackle a few of those emails. The dopamine surge when a new batch arrives. The desire to hit <strong>Inbox Zero</strong>.</p> Sat, 20 Feb 2021 12:17:10 -0600 mglaman https://mglaman.dev/blog/wait-dont-immediately-send-email JSON:API Resources is Drupal 9.1 compatible https://mglaman.dev/blog/jsonapi-resources-drupal-91-compatible?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p><a href="https://www.drupal.org/project/jsonapi_resources">JSON:API Resources</a> is now Drupal 9.0 <strong>and </strong>9.1 compatible with the <a href="https://www.drupal.org/project/jsonapi_resources/releases/8.x-1.0-beta4">8.x-1.0-beta4 release</a>! If you are not familiar with this module, it is essentially the sandbox contributed project for building the extensibility layer for Drupal's JSON:API implementation. That is a fancy way of saying it lets you define custom endpoints that leverage the JSON:API specification.</p> <p>We shipped the module with a requirement of <code>drupal/core:^8.8@alpha</code> as we required some code that would ship in Drupal 8.8.0. Howevever, we never released the fix for the <code>composer.json</code> file to allow installation of th module with Drupal 9!</p> Tue, 22 Dec 2020 23:24:26 -0600 mglaman https://mglaman.dev/blog/jsonapi-resources-drupal-91-compatible PHPStan Drupal 0.12.7 released, latest PHPStan now supported! https://mglaman.dev/blog/phpstan-drupal-0127-released-latest-phpstan-now-supported?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p><a href="https://github.com/mglaman/phpstan-drupal/releases/tag/0.12.7">PHPStan Drupal 0.12.7</a> was released this morning, with only one fix. But it's an important one. This post acts as a retrospective for diving into an obscure issue that took a few months to determine. It turns out that the Rector project <a href="https://github.com/rectorphp/rector/issues/4556">had been facing this bug for weeks, as well</a>.</p> Mon, 21 Dec 2020 12:21:31 -0600 mglaman https://mglaman.dev/blog/phpstan-drupal-0127-released-latest-phpstan-now-supported GitHub Actions has made continuous integration seamless https://mglaman.dev/blog/github-actions-has-made-continuous-integration-seamless?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <p><a href="https://github.com/features/actions">GitHub Actions</a> has made continuous integration seamless. Not because it is a superior product – I am by and far a huge fan of <a href="https://circleci.com/">CircleCI</a> – but because of its ease in integration. <a href="https://travis-ci.org/">TravisCI</a> was a huge breakthrough in continuous integration for open source projects. Instead of running a private Jenkins server, you could connect your GitHub repo to TravisCI and start building on each commit. However, both TravisCI, CircleCI, and other continuous integration tools require a multi-step setup. GitHub Actions (for better or worse) bypasses this.</p> <p>Normally you need to commit your pipeline configuration files – <code>.travis.yml</code>, <code>.circleci/config.yaml</code>, etc. – and then go to that service and turn on builds. Or, vice versa and the service would say, "Great, waiting for that new commit which has your pipeline definition!"</p> Sun, 15 Nov 2020 20:51:42 -0600 mglaman https://mglaman.dev/blog/github-actions-has-made-continuous-integration-seamless Moving on to something new https://mglaman.dev/blog/moving-something-new?utm_source=Front&utm_medium=feed&utm_campaign=RSS Feed <aside class="align-center"><div> <img src="/sites/default/files/styles/homepage_/public/2020-09/15642918561_89c89b5201_k.jpg?itok=6gIJL23T" alt="Road" /></div> </aside><p>Five years and two months ago, I joined Commerce Guys, which was pr Fri, 13 Nov 2020 12:41:54 -0600 mglaman https://mglaman.dev/blog/moving-something-new