How to Create and Use Drupal 8+ Services: A Detailed Guide with Practical Code

Drupal, the open-source content management system, has come a long way since its inception. With the release of Drupal 8, we saw a massive shift in the underlying architecture: the adoption of a more object-oriented programming approach using Symfony components. One notable component that was introduced in Drupal 8 is the service container, which has […]
How to Efficiently Render HTML Markup in WordPress: A Practical Guide for Developers

Discover the power of template parts in WordPress and learn how to render HTML markup efficiently with our step-by-step tutorial. This comprehensive guide explores the benefits of using template parts, including modular code structure, reusability, and improved readability. Whether you’re a seasoned developer or just getting started with WordPress, this tutorial will provide you with practical insights and examples to enhance your development workflow and create more maintainable and customizable themes and plugins.
What are the benefits of PHP 8.1 and the Commands to upgrade from an older version on Nginx?

PHP 8.1 is the latest version of the popular server-side scripting language, and it brings a host of new features and improvements that make it a compelling choice for developers. In this article, we’ll highlight some of the key benefits of upgrading to PHP 8.1.
How to add the logged-in user’s roles as classes in the body element in WordPress

To add the user roles to the body of your WordPress pages, you can use the body_class hook. This hook allows you to add custom classes to the <body> element of your pages. Example of body_class hook to add classes to the body element Here’s an example of how you can use this hook to […]
Drupal 10, a quick overview

Drupal 10 is the latest version of the popular open-source content management system (CMS) Drupal, released on December 14th, 2022. It marks the culmination of over two years of development and brings with it numerous new features and improvements. One of the key features of Drupal 10 is its support for modern web development practices. […]
How to step debug PHP code with Xdebug and PhpStorm on a DDEV setup

What is debugging? Per wikipedia: “In computer programming and software development, debugging is the process of finding and resolving bugs (defects or problems that prevent correct operation) within computer programs, software, or systems.” Per Internet: “Debugging is like being the detective in a crime movie where you are also the murderer.” – Filipe Fortes What […]
How to switch between PHP versions on Mac OS X using homebrew

I use docker for all the projects, but the other day I needed to run a composer command in my host machine to install a Drupal distribution which is not compatible with PHP 8.0, so I needed to switch the PHP version. And the steps to do so are: Install homebrew: https://docs.brew.sh/Installation Install the Brew […]