Blocks
TopicA block is a reusable widget that is placed inside regions (layout containers) of your theme. Blocks can be used by site administrators on the Block layout admin page or provided by a module using the Plugin API.
Testing in Drupal
TopicDrupal includes the PHPUnit testing framework. This enables us to write unit and functional tests to attempt to minimize the number of bugs in our application.
Deployment Workflows
TopicTools and workflows for deploying code and configuration changes from one environment to another with Drupal-specific considerations.
Drupal manages information and access for all visitors to your site, called users, through a system of roles and permissions.
Contributing to Drupal
TopicAs an open source project, Drupal depends on community contributions in many forms including documentation, code, translation, speaking, organizing events, mentoring others, and even donating money.
The process for keeping Drupal core and contributed modules and themes up to date with the latest security and minor version releases.
In order to run a Drupal site, the web server you are using must meet minimum technical requirements.
Taxonomy
TopicTaxonomy in Drupal provides a way to classify your site’s content. Taxonomy vocabularies are created with terms within those vocabularies.
Patches are used to describe modifications made to one or more code files, and can be used to share those changes.
Entities are the fundamental building blocks that make up any Drupal site. Having a good understanding of the Entity system is an important part of ensuring the data model of your Drupal site is set up properly.
Modules are bundles of primarily PHP code that extend Drupal in order to add new features or alter existing functionality.
Every Composer project is made up of a few standard files and directories. This tutorial provides an overview of the anatomy of a Composer project, and the essential files and directories used by Composer, including:
- What are composer.json and composer.lock files?
- What is in a composer.json file?
- What is the /vendor directory?
By the end of this tutorial you should be able to recognize the standard files and directories in a Composer project and know what they are each used for.
This tutorial demonstrates the value of using Composer. This demonstration will employ the most basic use case of using Composer to create a new, non-Drupal application that writes a message to the system log. It will encompass the fundamental concepts of Composer installation, requiring (installing) a new dependency, autoloading it, and implementing it.
In this tutorial we'll:
- Install Composer
- Use Composer to start a new project
- Use Composer to require a 3rd party dependency
- Use the required code in an example application
By the end of this tutorial you should be able to explain the value of Composer, and have Composer installed and working on your local machine.
This tutorial provides an overview of the concept of an "artifact" and provides step-by-step instructions for deploying a Composer-managed Drupal application to a hosting environment.
In this tutorial we'll:
- Define what an "artifact" is
- Look at how to use Composer and a build process to create and deploy an artifact
- Talk about the benefits of this approach
By the end of this tutorial you should have a general understanding of the steps required in order to deploy a Composer-managed project into production.
You will inevitably encounter Composer issues that require troubleshooting. This tutorial aims to provide some general troubleshooting advice for common Composer issues.
In this tutorial we'll look at:
- Common issues you'll encounter when using Composer
- Solutions to these common issues
By the end of this tutorial you should have some ideas of how to solve common issues that you might encounter when using Composer to manager your application's dependencies.
Composer packages use semantic versioning to allow you to differentiate among different releases of a project. Knowing how this works, and how to specify a version constraint when requiring a Composer package are an important part of using Composer.
In this tutorial we'll:
- Get an overview of semantic versioning
- Look at how Composer version constraints work and related best practices
- Learn how to define Composer package requirements such that you can quickly update all of your application's dependencies without breaking existing functionality
By the end of this tutorial, you should understand how semantic versioning relates to Composer, and how to specify version constraints for packages in your Composer project.
What Is Composer?
FreeComposer is the preferred dependency management solution for PHP. List your project's dependencies in a composer.json file and, after issuing a few commands in the CLI, Composer will automatically download your project's dependencies and set up autoloading for you. Composer is analogous to NPM in the Node.js world, or Bundler in the Ruby world.
Drupal core uses Composer to manage non-Drupal dependencies like Guzzle and PHPUnit. An increasing number of contributed modules also use Composer to integrate third party PHP libraries into Drupal.
This series provides guidance for Drupal developers and site builders who would like to learn to use Composer to build and maintain a Drupal application.
It covers high-level concepts about Composer and walks you step-by-step through creating a new application, downloading PHP libraries, and implementing them using Composer!
It also covers Drupal-specific Composer configuration and provides guidance for accomplishing common Drupal tasks like updating core and installing a new module.
In this tutorial we'll:
- Familiarize ourselves with the general concepts of dependency management
- Learn about Composer and the role it plays in a PHP/Drupal project
- Learn about some advantages and disadvantages of using Composer
By the end of this tutorial you should be able to explain what Composer is, what it's used for, and make the case for using it in your own projects.
There's been a lot written about API design, it's probably not surprising there are several books written about the subject. It also seems like nearly every cloud-based service provides an API to allow access to your data. In this tutorial, we'll attempt to condense this information and answer the following questions:
- Are there different types of API paradigms?
- What kinds of considerations do we need to make when building an API for our decoupled site?
- And, what's this REST thing everyone is talking about?
Let's dig into those questions one at a time.