Complex Configuration in Drupal

Benji Fisher

Introduction

About me

Yellow Pig 

Usability group, Migration subsystem, Security team

Follow along

QR code for https://slides.benjifisher.info 

Vaporware Alert

Status 2025-03-10

  • Discussions at Florida Drupal Camp 2025-02-03
  • Discussions in Slack (#eca, #migration, …)
  • BoF scheduled for DrupalCon Atlanta
  • That’s All, Folks!

Migrations for the Ambitious Site Builder

Import CSV Recipe

https://www.drupal.org/project/import_csv

Import from CSV files:

  • Users
  • Taxonomy Terms
  • Nodes

Built on

How It Works

  1. With Migrate Plus, migrations are defined by config entities migrate_plus.migration.*.
  2. A recipe can install configuration.

Screenshot

Admin UI for importing CSV files with Migrate Source UI 

The Missing Piece

How can the Ambitious Site Builder

  • Create a new migration
  • Tweak an existing migration

Config Export/Import (1 of 2)

Admin UI for exporting a single migration as YAML - Part 1: the export form 

Config Export/Import (2 of 2)

Admin UI for exporting a single migration as YAML - Part 2: the exported YAML 

More Vaporware

Migrate AI

Show me your Drupal 7 database and I will create migrations for you

– Migrate AI module (vaporware)

Better than one-click AI migration:

  • Use AI to parse the data.
  • Create migrations (structured data).
  • Audit and tweak them.
  • Migrate the site.
  • Iterate.

The Missing Piece (again)

How can the Ambitious Site Builder

  • Inspect the migrations
  • Tweak the migrations

Not Vaporware

The ECA Module

Try the ECA module. It is like Rules, but better!

@jurgenhaas

We love it!

– Just about everyone

ECA: Back End

  • Events (Symfony)
    • Node created
    • User logged in
  • Conditions (ECA)
  • Actions (Drupal)
    • Publish/Unpublish
    • Assign a user role

ECA: Front End

Example of an ECA model in BPMN.io 

Source: https://ecaguide.org/resources/tutorials/mherchel-2

Even More Vaporware

Other uses

Why can’t we have nice things?

– Migrate API maintainers

AI modules (citation needed)

An Innocent Question

The eca_ui module, along with bpmn_io, creates a config entity for eca, right? (And also a file that BPMN.io can read.)

How hard would it be to write a similar module for another config entity type?

@benjifisher, #eca Slack channel 2025-02-22

Wanted: The Modeler API module

  • “How hard …?” Answer: harder than I had hoped
  • Bad news: Making it easy requires
    • restructuring the ECA module
    • creating the new Modeler API module.
  • Good news: @jurgenhaas is on board.

Modeler API module (plan)

Proposed structure of the Modeler API module 

@jurgenhaas, #eca Slack channel 2025-03-08

Modeler API module (BoF)

What ECA has demonstrated successfully in combination with bpmn_io should be opened up for other modules like Migrate, AI Agents, or others to also leverage modeler UIs like bpmn_io or others to do similar things without having to have parallel and similar implementations. Can we do that once and for all?

https://events.drupal.org/atlanta2025/bofs/all

Be Careful What You Wish For

Am I tempting the Fates if I utter the phrase “next gen Views UI”?

@benjifisher, #drupal-cms-development Slack channel 2025-03-08

I would certainly recommend against awakening the Ancient Ones by uttering such a thing

@phenaproxima, reply

Wrap Up

References

Copyleft

Creative Commons License
This slide deck by Benji Fisher is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Based on a work at https://gitlab.com/benjifisher/slide-decks.