Here are some of the key resources I've relied on to build skill and knowledge in developing Drupal 9 applications. I start with some general thoughts and then list out the resources themselves according to that general framework. I highly recommend a subscription to Drupalize.me, and many of the links below will require one.
General approach
- Create a Drupal.org user account!
- Spend some time initially reading up and watching videos on how Drupal 8/9 is different from 7, some of the key features baked into core, and high-level overviews of things like configuration, media, entities, module development, and to some of the basic OOP principals introduced
- Get a local environment set up. I've done so with MAMP, Vagrant, and DDEV, but I really like to do it with Lando. This will give you an introduction to composer, the codebase, the file structure, and drush commands.
- Set up the config sync directory and run
drush cex
in the container / on the server in Lando to export your site's configuration to that directory. Take a look at some of the files that are exported (yaml) and note the difference between this kind of configuration and the active configuration stored in the database. Review the configuration management section, particularly those items related to syncing, splitting, deploying, and overriding configuration. - Practice creating content types, fields, and entity references—especially to paragraphs (which will necessitate at least a cursory look at revisions). Understand entities... and then wrap your head around media management (which is a special subset of file management).
Find a project to work on, or a particular problem to solve. Whatever you do, just don't wait until 3:14am on January 19, 2038.
- Learn some basic PHP.
- Checkout and install a dev version of some module using composer. Make updates to that module's code, export a patch and share with a colleague who will then apply that patch using composer and verify. Try the other way around as well.
- Build a basic module and then learn about things like plugins, services, and events (and event routes and controllers). Read up on the difference between events (OO) and hooks (older, procedural), and get comfortable with the project structure, listing and issues on Drupal.org, and how to get help.
- Finally, dig into decoupling!
Introduction
What's new
- A summary introduction to Drupal 9 and its differences over version 7
- Point history of functionality introduced in 8
- If we were to keep our existing codebase and try upgrading instead of rebuilding in 9
Object-oriented PHP
- Classes and objects
- OOP conventions
- Drupal PHP
- Drupal APIs
- In-depth training/guide for learning OO PHP for Drupal and beyond
- Dependency injection
Getting set up
Other resources
Development resources
Composer
Drush
Devel
Patching and contributing
Configuration management
Overview
- Configuration management at drupal.org
- Drupalize.me guide overview (free)
- An introductory blog post
- Yaml introduction1
Configuration API
- Configuration entities and how they are managed
- Creating, updating, and referencing properties of configuration entities
- Synchronizing configuration across instances/environments, overriding configuration, and configuration deployment workflows
Configuration Management Initiative (CMI) 2
Content modeling and workflows
Entities and revisions
Paragraphs
- Overview
- Container paragraphs
- Module page
- Meta issue for migrating from field collections
- Dependency on entity reference revisions
Content moderation
- Documentation
- Comparison of workflow approaches
- Workflows (core module) documentation
- Workflow (contributed module) documentation
Media management
Core media module
Other/related
Module development
Overview
- Comparison with 7, and basic set up
- Preference order in choosing modules (written for Drupal 7, but still apples)
Hooks and events
- What are hooks
- What are events
- Understanding hooks
- Events versus hooks
- Subscribe to and dispatch events
- Another blog post on event subscribers
Service containers
Plugins
Decoupling
Overview
JSON:API and web services
- Watch through tutorial 12 (JSON:API filters on nested relationships)
- Another way to include relationship data
- JSON:API Extras module
- Authentication
API documentation
Routing
- Decoupled router module for resolving paths as entity routes
- Lullabot's decoupling hard problems series