27 Nov 2026
Drupal.org aggregator
Omega8.cc: Built to Order
A Drupal 11 platform was built on a test server in sixteen seconds in the small hours of 27 November, and nobody opened a shell for it: it was ordered on the Add platform form of the Ægir control panel, which can build a codebase itself from a package published on Packagist, from a Git repository of your own with Composer, or from a Git repository as it stands. We wrote one field wrong on purpose so you see what a failed build leaves behind: Composer's own sentence in the log and nothing on the disk. Then a small shop's repository built at its tag, and the task which makes the next platform from the same recipe, Build newer version: it keeps what it built only when that is a newer version of the same codebase, and it turned ours down once, for one line which a project born on an older template must add to composer.json before it moves to Drupal 11.4. With four real pictures, and what still wants somebody technical. Ægir is the panel of BOA, the hosting stack we publish as open source.
27 Nov 2026 2:53am GMT
Omega8.cc: On the Rolling Road
On the evening of 26 November we put the same Drupal demo site on four releases of Drupal 11 on one test server, installed from the Ægir control panel, and counted what one page build costs there: database statements, cache commands, seconds. The Drop Times had written that day, from the counts Drupal core's own tests expect, that Drupal 11.3 and 11.4 already hold much of the speed people await from Drupal 12, and that they had run nothing themselves. So we did. A cold front page cost 317 statements on 11.2 and 171 on 11.4, a cool one 111 and 53, one below what core expects for the cool page and somewhat lower for the cold one. The seconds did not follow the counts, and the post says why. An upgraded copy of the 11.2 site kept most of the gain, and on plain sites the Drupal 12 beta ran the same number of statements as the 11.5 beta, to the last one. BOA is our open source hosting stack with Ægir as its control panel.
27 Nov 2026 12:02am GMT
26 Nov 2026
Drupal.org aggregator
Droptica: Feeds and syndication of content and data from Drupal
Keep product pages and syndicated data aligned. Learn how to build a Drupal product feed from shared entities, refresh it after publishing, and catch failures before stale records spread.
26 Nov 2026 6:48pm GMT
Omega8.cc: One Car at a Time
Five small Drupal 10 sites on one platform of a test server were told to move to Drupal 11 together on 26 November by a single task of the Ægir control panel, Upgrade all sites, and we had broken one of them on purpose to see what the task does about it. Before anything is queued a table gives every site a verdict: ready, with the kind of step, not ready, with what is missing, or not allowed, where a line in the site's control file, drupal_upgrade_modes, says no (ours took nothing larger than a minor update). Then the platform is locked and the sites go one at a time, each keeping a complete copy of itself to go back to. Ours stopped at the site whose database update failed: it was put back on its old platform, the site waiting behind it was cancelled untouched, and the run's last row said who went, who failed and who was left out. We mended the module, unlocked the platform and ran it again. BOA is the open source stack we host on, and Ægir is its control panel.
26 Nov 2026 5:31pm GMT
The Drop Times: Drupal 11 Already Delivers Major Performance Gains Ahead of Drupal 12
For organisations planning their next Drupal upgrade, performance alone may not determine when to move to a new major version.
26 Nov 2026 4:50pm GMT
25 Nov 2026
Drupal.org aggregator
Omega8.cc: The Spare Comes First
On the evening of 25 November a small Drupal 10 site on a test server of ours moved to Drupal 11 in about three minutes and a few minutes later moved back, each trip one task in the Ægir control panel. Drupal 10 is supported until 9 December, so here is the route as the panel showed it, with the pictures: the newer platform somebody technical builds first, the Drupal updates line which says whether it is ready and what kind of step it is, the page which tells what will happen and what it costs, and the task's own log, from the copy made first to the two pages asked before and after the move. Then the way back: the site page tells the age of the kept copy and its size on disk, and Go back puts it in the site's place while the upgraded site waits beside it, switched off. Also what the two checks do not look at, and why an upgrade which matters is still tried on a clone first. BOA is our open source hosting stack with Ægir as its control panel.
25 Nov 2026 10:26pm GMT
Omega8.cc: Synchromesh, at Last
It took seventy lines to give Ægir its Migrate command. Adrian Rossouw committed them on 3 February 2009, noted that Ægir had, theoretically, both major and minor version upgrades, and left step eight of the file's list as a TODO: a diagnostic to test that everything is ok. Both lasted almost eighteen years: an upgrade was a Clone, a Migrate, another Clone, another Migrate and some prayers, and until this month database updates which broke off in the middle of a Migrate left a warning in the log and the site on the new code. BOA, the open source stack which carries Ægir as its control panel, spent those years on the installer, the platforms and the armour. Its new Upgrade task for Drupal 10 and newer sites keeps a full copy as the way back and undoes a move whose updates break off or whose home and login pages no longer answer as they did, and Go back gives that copy the site's name again. With Drupal 10 at its end of life on 9 December, this is how an old gearbox got its synchromesh.
25 Nov 2026 9:08pm GMT
Security advisories: Drupal core - Highly critical - Access bypass - SA-CORE-2026-019
drupalDrupal core ships with an install.php file for installing Drupal core.
If you have already secured the installer, you are not vulnerable.
SA-CORE-2026-017 recently fixed several vulnerabilities within the Drupal core installer. However, certain sites in unusual or incomplete install states remain vulnerable to site takeover following that advisory, including production sites. It is not apparent in the user interface if a site is in the affected vulnerable state, and sites that are already compromised may no longer be in the vulnerable state.
This is being exploited in the wild. Any site that left its installer remotely accessible following SA-CORE-2026-017 may still have been compromised.
-
Check your site logs for unauthorized access, especially unexpected changes to or by the user 1 account.
-
Ensure the user 1 email address is set to something you control, and consider resetting user 1's password.
-
If it appears your site may have been compromised based on the above, review Your Drupal site got hacked. Now what?.
Drupal Steward information:
This issue and SA-CORE-2026-017 are both being protected by Drupal Steward. Sites and platforms that use Drupal Steward's recommended mitigations are already protected from known attack vectors, but sites should upgrade in the near future in case additional attack vectors are discovered.
-
Install the latest version:
Drupal 11
- If you use Drupal 11.4.x, update to Drupal 11.4.14.
- If you use Drupal 11.3.x, update to Drupal 11.3.23.
- Drupal 11.2.x and below are end-of-life and do not receive security coverage.
Drupal 10
- If you use Drupal 10.6.x, update to Drupal 10.6.23.
- Drupal 10.5.x and below are end-of-life and do not receive security coverage.
-
Run
update.php. An update hook must run to fix existing production sites in this state. -
Strongly recommended: Follow the instructions for securing the Drupal installer on all new and existing sites.
- Andrew Berry (deviantintegral)
- Tim Hestenes Lehnen (hestenet)
- Dave Long (longwave) of the Drupal Security Team
- James Sherwin (very_random_man)
- Cathy Theys (yesct) of the Drupal Security Team
- Alex Pott (alexpott) of the Drupal Security Team
- catch (catch) of the Drupal Security Team
- Andrew Berry (deviantintegral)
- Dave Long (longwave) of the Drupal Security Team
- Mohit Aghera (mohit_aghera), provisional member of the Drupal Security Team
- Jess (xjm) of the Drupal Security Team
- Bram Driesen (bramdriesen) of the Drupal Security Team
- catch (catch) of the Drupal Security Team
- Greg Knaddison (greggles) of the Drupal Security Team
- Tim Hestenes Lehnen (hestenet)
- Lee Rowlands (larowlan) of the Drupal Security Team
- Dave Long (longwave) of the Drupal Security Team
- Juraj Nemec (poker10) of the Drupal Security Team
- Pierre Rudloff (prudloff) of the Drupal Security Team
- Jess (xjm) of the Drupal Security Team
25 Nov 2026 5:04pm GMT
Drupal AI Initiative: Your AI content is causing trouble, and you don't even know it
Someone on your marketing team asks AI for a blog post. The draft that comes back doesn't sound like your organization, and it promises something nobody approved. It gets posted on your website before anyone realizes.
And the next post lands with the same issues. Your organization's voice and rules live in a few people's heads, or in well-maintained brand guidelines that people rarely refer to.
Generative AI means it's easy to create content. The hard part is providing AI with the information it requires to generate content that accurately reflects your organization. That's how AI knows how you talk, who you're talking to and what it's never allowed to make up.
Why AI content drifts
One person on the team is using ChatGPT. The other person on the team is using Claude. They have different instructions, different information. Maybe they don't even have any writing examples. The voice is not the same.
If you don't provide this information, AI will happily guess, and it'll usually guess wrong, potentially resulting in sloppy content. AI likes to tweak names, too. If your offer has one, write it down exactly the way you say it.
And describing how you write only goes so far. The examples show it.
Someone using their own AI at work could cause trouble for the team.
What's at stake
It could be anything, from an embarrassing moment to a fine, because someone used AI to quickly generate some content that stated something they weren't supposed to state.
Who catches it? Usually somebody outside the organization. A customer, maybe. Maybe the boss, but rarely. Maybe the marketing people, but maybe not.
As an example, in 2022, the chatbot on Air Canada's website told a customer they could apply for a bereavement discount after their flight. The airline's actual policy didn't allow that. Air Canada argued it wasn't responsible for what its chatbot said. In 2024, a Canadian tribunal disagreed and ordered the airline to pay damages.
Start with what governs the prompt
Start with the information that should govern the prompt, instead of the prompt itself. When it lives in one place, everyone on the team uses the same information, and every kind of content follows it. A landing page, a press release, a product description.
In Drupal AI, that one place is the Context Control Center. Editors and marketers manage what the AI knows the same way they manage the rest of the site's content, with drafts, approvals, scheduling and version history.
Different pages, different rules
Investor guides have to follow certain rules and guidelines, as do health providers, universities and many other types of organizations.
In finance, FINRA, the US regulator for brokerage firms, has reminded firms that its rules for communicating with the public apply to AI-written content the same way they apply to anything a person writes. In health, the US Federal Trade Commission expects health claims in marketing to be backed by competent and reliable scientific evidence. And many universities now publish their own rules for AI in marketing. Purdue's says, "AI-generated text must be revised for brand voice, edited and approved by an accountable human before publication."
On a casual blog post, rules like these are easy to forget. You can't use broad rules for everything. Certain pages might need other rules.
In the Context Control Center, rules can apply to the whole site, or only to one section, language, topic or page. The investor page gets the investor rules, and the blog gets the blog rules.
Rules within the Context Control Center are well structured and can apply globally or be specifically targeted.
Put someone in charge of the context
There should be somebody in charge of the context, approving changes to it. One main lead on that, or a team that leads it, all in sync and in agreement with each other.
Maintain a single source of truth, a single document or collection of documents, that accurately reflects the information about your organization that AI should be aware of when generating and checking content on your website. If those documents already exist, the Context Control Center can import common files like Word documents, PDFs and spreadsheets.
Usually, when AI content goes wrong, there's no tracking or record of what was given to the AI or what context was even used.

Slide from Context Control Center: Bringing AI Context Natively to Drupal CMS
With the Context Control Center, there is. If you're a marketing lead, you can look back and see exactly what somebody used and what rules were applied. You know exactly what they did, and whether they were using the correct rules. If not, you have the ability to update the Context Control Center to ensure the same issues don't occur again.
A person never leaves the loop. A person writes the request. A person reads every word. A person decides whether it's approved. And nothing publishes on its own.
Try Context Control Center now!
You can try Context Control Center for free as part of the official Drupal AI Demo. No set up required.
Frequently asked questions
Is it okay for my team to use their own AI tools?
No. Set an AI policy, guidelines for everyone, so they only use the sanctioned AI and office tools made available to them.
Who's responsible when AI gets something wrong?
There should always be a person behind what goes out, a final check. When AI gets something wrong, the organization can be held liable, and so can the individual people involved, especially if they didn't follow the rules. In 2023, a US judge fined two lawyers and their law firm for filing a brief with court cases ChatGPT made up.
Do I need a developer to manage the Context Control Center?
No, you don't. Editors and marketers can set up and manage the context themselves, the same way they manage the rest of the site's content, through a user interface, without writing code.
Can we start with the brand documents we already have?
Absolutely, that's where you should start. Begin with your brand documents, your brand voice and examples of your own writing, like emails, documents and articles, anything that shows your voice. From there, add things like your editorial guide, audience personas, product and service lists, FAQs, compliance rules, legal disclaimers and anything else that applies to your organization.
Learn more about Context Control Centre
Watch our presentation on Context Control Centre from DrupalCon Rotterdam 2026 which goes into more detail.

The session covers how to:
- Replace scattered files with one central hub: Learn how Context Control Center acts as Drupal CMS's native context layer, bringing rogue prompts, PDFs, and wikis into a single governed library.
- Keep responses on-topic with context scopes: Discover how to route the right information to the right request using language, site section, and use case-ensuring support answers never accidentally bleed into marketing copy.
- Build a clean, maintainable library: Pick up practical rules for sizing entries, knowing when to split or merge content, eliminating duplicates, and assigning clear ownership.
- Keep content fresh and secure: See how dynamic and remote context keeps information up to date, and how Context Control Center complements-rather than replaces-Drupal's existing AI safety and monitoring tools.
Webinar on how to introduce good AI governance in your organization
Our upcoming webinar is a practical conversation with the authors of From Policy to Deployment: AI Governance for Institutional Websites. Learn how to assess an AI use on your website, decide what safeguards it needs and know when it's ready to launch.
25 Nov 2026 3:15pm GMT
The Drop Times: What Drupal Teams Need Beyond Faster Development
A clickable prototype can expose disagreements before development begins, while an unanswered AI query can reveal a content problem after launch. Drupal practitioners share ways to improve decisions at different stages of a website's lifecycle.
25 Nov 2026 1:19pm GMT
BloomIdea: Views Board for Drupal: your own Trello-style project board, with a Gantt chart and a dependency map, in the site you already run
The work already lives in Drupal. Articles move from idea to draft to scheduled, tasks from to do to done, requests from new to answered, and each of them has a status field someone changes by opening the edit form, changing one select and saving. Seeing the whole picture means a table with a status column, or copying everything into a board in another tool and keeping the two in step by hand until they drift apart.
What the team wanted was the board itself: the same items, in columns, moved with the mouse or the keyboard, and saved where they already are.
Views Board adds three formats to Views: Board, which draws the rows of any view as cards in columns, one column per value of a field, optionally split into lanes by a second one; Gantt, which draws the same rows as bars on a time axis; and Dependencies, which sets them out in waves of what waits for what. The Gantt and Dependencies formats are submodules, as are a Dependency field and two tools that hand the board to AI agents, MCP servers and Drush. It is free software under GPL-2.0-or-later, and 1.0.0, released on 24 November, is its first stable release.
Your own Trello, in the site you already run
A Trello-style board takes no code. Create a Task content type with a list field for its state, a reference to the person doing it and a due date. Build a view of tasks, choose Board as its format, and make the state the columns and the person the lanes. Add the Dependency field and a second display in the Gantt format, and the same tasks become a plan that shows what blocks what.
There is no limit on boards, because a board is a display of a view. One view can carry a board, a Gantt and a map of dependencies over the same tasks, and a contextual filter turns one display into a board per project, per client or per person, each at its own address.
With the Group module, each project or client is a group with its own members and roles, and a contextual filter on the group gives every group its own board from that one view. Group decides who may see and edit each task, and Views Board asks the same question before a card moves: a member allowed to edit the group's tasks moves its cards, a member who may only read sees the board without handles, and someone outside the group sees none of its tasks.
The tasks stay where the rest of the site is: the same accounts, the same groups and permissions, and references to the content, clients and contracts they are about. We run our own projects this way. Our intranet keeps each client's work in a group, with a board per group in lanes by person, and the waves and the Gantt for plans that have milestones and dependencies. Most of the module was first something we needed there.
It is not Jira, and it does not try to be. There are no sprints, no burndown or velocity charts, the Gantt does not compute a critical path or move dates by itself, and the module sends no notifications. A move is a normal save, so whatever the site already does on save still runs, and an ECA rule or a few lines of code send the email. A rule such as "the person a task is assigned to may move it without the right to edit it" takes a small event subscriber, which is how our intranet does it.
What you can build with it
- An editorial board where articles move from Ideas to Scheduled, split into one lane per writer, with a work-in-progress limit on Editing and the word count of each column added up in its head.
- A task board with a switch above it to see the same cards by person, by section or with no lanes at all.
- Cards that say "Overdue: 22 Nov" or "Due today" in words, and column heads that count what is late.
- A launch plan set out in waves, where each step sits one column after the furthest step it waits for and the filters pick out what can start today.
- A Gantt chart of the same plan, with a bar for each task, arrows for what blocks it and a zoom from days to months. Dragging a bar, or either of its ends, changes its dates.
- An assistant that answers "what has been in Doing for a month?" and then puts those cards on hold, with no more rights than the account it runs as.
The board
The board is a Views format, so everything a view already does still applies. Filters, contextual filters and exposed forms decide which cards appear, which is how one view becomes a board per group, per project or per person. Any entity stored in SQL works: content, users, taxonomy terms. The columns are the values of a single-value field, a list, a taxonomy reference, a boolean or a workflow state, in the order the field gives them.
Each column can be shown, collapsed to a narrow strip that still accepts cards, coloured, marked as finished, and given a work-in-progress limit, which warns without refusing. A lane field splits the board by person, section or any other field, and the reader can switch between the lane fields you offer, or none, from links above the board. Lanes that stand for something with a date, a milestone or a sprint, can follow that date instead of the alphabet.
What a card shows is a view mode, so it is set in Manage display like any other. For long boards, the column heads can stay at the top of the window while the page scrolls, with a line naming the lane underneath, and a Full screen button gives the board, its filters included, the whole screen.
Moving cards, with the mouse or the keyboard
Drag and drop works with a mouse, a pen or a finger. Every card the person may move also has a Move… menu, which lists the columns, the lanes and the top or bottom of the column, and works from the keyboard: arrow keys, Enter to choose, Escape to close. That follows Atlassian's guidance for accessible drag and drop, visible controls rather than dragging by keyboard.
Every move is announced to screen readers, focus returns to the card, and the confirmation at the bottom of the window has an Undo. Colour is never the only signal: an overdue card says so in words, and a column keeps its name next to its colour dot. The board uses core's SortableJS library and nothing else: no jQuery, no Bootstrap.
What waits for what
A board can say what blocks each card. Point it at an entity reference field and each card lists the items it waits for, each one pending, met or in conflict, read from the column the other item is in. A task finished before what it waited for shows the conflict in red.
The Dependency field submodule adds a field made for this: a reference that also records how one item waits for another, with the four link types of a Gantt chart (finish to start, start to start, finish to finish, start to finish), and that refuses to save a cycle.
The Dependencies format sets the same cards out in waves. The first wave waits for nothing on the page, the second comes after the first, and every arrow points right, so the shape of the work shows without any dates: which chains are long, what many things wait on, what is free to start once one thing is done. Filters pick out what can start, what is waiting, what is blocking others and what is in conflict, and hovering or focusing a card follows its chain both ways.
The Gantt
The Gantt format draws the same view on a time axis: a bar per item, coloured by its column and grouped by its lane, with weekends shaded, a line for today, a diamond for the date of each lane that stands for a milestone, and what blocks each item drawn as arrows between the ends its link type names. A bar can start at a start date, at the due date less a duration such as an estimate in hours, or, on a site that keeps a history of its items, on the day work on it began, and an item with a due date alone is a marker on that day. A zoom switches between days, weeks and months.
Dragging a bar moves it in time, and dragging either end moves that end. A Change dates dialog does the same from the keyboard or on a touch screen. It needs no chart library: the bars are laid out by CSS from dates the server writes, so the chart shows even without JavaScript.
For AI agents, MCP servers and Drush
The Views Board Tools submodule turns a board into two tools of the Tool API: one reads a board and one moves a card. A tool is written once and reaches three kinds of caller: the agents and assistants of the AI module, MCP servers built on Tool API, and Drush. The read is the board as that account sees it, with the view's filters and access, so an agent asked what is overdue in Editing gets the cards the person would see, with their column, lane, due state and what they wait for.
A move is an edit, and it is checked like one
Views Board adds no permissions of its own. Who sees a board is the view's access, and who moves a card is the entity's update access and the edit access of every field the move changes: the column, the lane, the order. A card the person cannot move shows no handle and no Move… button. A move the server refuses puts the card back where it was and says why in plain text.
Every move is saved through the entity's normal save, so validation, revisions and anything a site does on save all run. A module can veto a move before it happens, act after it (send an email when a task reaches Review, say), or let people move cards they may not edit, such as the person a task is assigned to. Reordering a card within its column is not treated as an edit: it creates no revision and does not make the card look just changed.
The Gantt and the tools take the same route. A dragged bar is checked as a moved card is, and an agent's move goes through the same service as a drag in the browser, adding no check and removing none. An agent can only do what the account it runs as could do on the page.
Get it
composer require drupal/views_board
drush en views_board
Then create or edit a view, choose Board as its format, and pick the column field. It requires Drupal 10.3 or later, or Drupal 11, and stable releases are covered by Drupal's security advisory policy. The waves, the Gantt, the dependency field and the AI tools are submodules, enabled separately; the tools need Tool API.
The README starts with a quick start that builds a board of articles from a standard Drupal site, and covers theming, the events and the move endpoint. If your board needs something it does not do yet, tell us in the issue queue.
25 Nov 2026 10:08am GMT
Gspikes: Higher Education CMS Census: What 1,800 US College Websites Run
Higher education CMS census of 2,764 US colleges: WordPress runs 37% of readable sites, Modern Campus leads public colleges, Drupal leads R1s.
25 Nov 2026 7:00am GMT
The Drop Times: How Drupal Grounds AI Answers in a Site's Own Content
A question box can answer from a site's pages and cite each claim. Some of its safeguards are enforced in code; others are only requested of the model.
25 Nov 2026 6:08am GMT
The Drop Times: How to Connect an AI Assistant to Drupal Through a User's Own Account
What can an AI assistant discover when Drupal refuses access to unpublished content? A local test reveals both the restrictions and the information still exposed.
25 Nov 2026 6:00am GMT
Specbee: One self-hosted QA tool for visual, Figma, and accessibility checks: Truframe
Truframe checks visual regression, Figma conformance, WCAG 2.2 accessibility, and site health, and helps QA teams decide which changes matter.
25 Nov 2026 4:01am GMT
Tag1 Insights: Inside the Pyramid: Guiding Principles for a Faster Drupal Test Suite
Getting in Shape
If I did a good job so far, you are now supposed to be all fired up and looking forward to a bright future of pyramids and skyscrapers, which brings us to the how. It won't be easy or effortless but, of course, I think it can be done, through the following steps:
- Define clear guidelines for both production and test code, updating AI best practices accordingly.
- Improve Unit testability across core, focusing especially on the entity system.
- Add new core test tools letting us implement lightweight Integration tests relying on
UnitTestCase. - Push down existing core test coverage towards the base as much as possible.
- Make core, contrib, and custom code adopt the guidelines at the same time: no need to wait for core to be done before starting.
Some of these steps can be worked on in parallel, but coming up with guidelines is the key one, so that is what I will focus on here.
The first step in coming up with valid guidelines is to identify the core principles behind them. Aside from what we already discussed, I am going to propose a few ideas, heavily inspired by, or taken verbatim from, a very influential source: Growing Object-Oriented Software, Guided by Tests (GOOS), the manifesto of the Mockist TDD school.
Listen to the Tests
As I mentioned in the first post , one of the main reasons why currently many Unit tests need to be implemented via KernelTestBase is that the Entity objects have so many intertwined dependencies that instantiating one forces you to instantiate a significant portion of the Entity and Field systems. Trying to use test doubles does not help either for the same reason. In fact, one of GOOS' core principles says that if a test is hard to set up, that is design feedback: it is a signal that you should refactor the class to ensure its dependencies are more manageable and, hopefully, the resulting relationships more sensible.
After all, entities most often serve as data carriers between layers of a Drupal application and usually this kind of object is not supposed to get test doubles, since there is no interesting behavior to stub or mock, which brings us to the second principle.
Don't Mock What You Don't Own
This is also one of GOOS' core principles: you are only supposed to mock interfaces you own, that is, belonging to code you can change. A mock is a specific type of test double encoding expectations about which method invocations it will receive, with the related returned values, if any.
Following the previous principle, if mocking an item in your code is hard, this should be treated as design feedback, implying, again, that you should refactor your code to make the relationships between its parts saner. Of course, that is not an option when you are dealing with code you do not own.
Moreover (and this is the deal breaker), a mock object encodes your assumptions about its behavior. This is fine for a class you own and whose behavior you control, but doing this with a class you do not own is dangerous, because its internal behavior may change without you noticing, which would cause your test to keep passing when in fact it should start failing.
Stub It Instead
A related case is when an interface you do not own is so narrow and self-documenting that there is basically no risk involved in stubbing it. For instance, the TimeInterface::getCurrentTime method is so straightforward that the risk of using a mocking API to stub it is close to zero: the contract is so well defined that returning a valid value is trivial and it is all we need to do to ensure the test will behave correctly.
Speak Your Own Language
Of course, from the perspective of a module author, the Entity Field API should be seen as framework code, similar to a third-party library, not something available for refactoring. Thus, attempting to create test doubles out of its interfaces is misguided, because they are not supposed to be stubbed (no interesting behavior there), let alone mocked.
From this, one could conclude that the only correct way to deal with entities within tests is to instantiate the real objects, which forces you to rely on KernelTestBase. However, my claim is that a module developer should not need to care about how hard it is to instantiate an entity: entities are generic domain-less data carriers, while a module is all about some specific domain logic, thus its code should be structured so that entities are hidden away as much as possible, treated as an implementation detail. This makes the module code more expressive and more easily Unit-testable at the same time.
Likewise, any other framework "jargon" should be banned from module code as much as possible: any reference to persistence, network connections, file system access, or a Drupal core subsystem should be treated as an implementation detail and hidden behind a thin adapter layer or confined to equally thin integration points, typically hook implementations and event listeners.
What about module code "extending" the framework, for instance by defining a formatter? Plugin classes are integration points too, so the same approach applies: if the module includes domain logic, extract it into classes speaking the module's own language, and keep the plugin class as a thin adapter, covered by an Integration test. If there is no domain logic at all, the plugin is just wiring and an Integration test is all it needs. Things get trickier when the framework is the domain, as in the case of a new field type. There is not much left to hide, and here the rule of thumb is simple: the more a class's code is about the framework's own contract, the higher in the Pyramid its tests legitimately sit. In that case, the burden of Unit testability shifts from the module author to the framework, through test tooling - for instance, a fake implementation.
An Imperfect World
What about Deuteros? What is its place in this picture? The way I see it, Deuteros fulfills the need for an easy-to-instantiate data carrier object, same idea as the
TestArticleclass we are going to look at in the next post. In an ideal world, in the rare cases in which it is appropriate to instantiate an entity and not something domain-specific (it might be overkill sometimes), we should not be forced to give up onUnitTestCasetests. In the future we will hopefully be able to instantiate entity objects more easily; in the meantime, you can rely on Deuteros, which you can think of as a fake implementation of the Entity Field API's parts defining a data-carrying system, backed by contract tests: those ensure that the behavior does not diverge from the original one, while giving you easy-to-instantiate objects. This is particularly useful in existing codebases, when refactoring is not available as a strategy, but you still would like to rely on fast Unit testing.
Widen the Base
As I touched on before, our goal should be to widen the Skyscraper's base, which means leveraging UnitTestCase as much as possible, regardless of the scope of our tests. This translates into a two-question rule of thumb:
- Level: what is the scope of the test? Unit, Integration or End-To-End?
- Type: what is the lightest available tool to implement it?
The default choice would be a vanilla UnitTestCase, possibly paired with lightweight helper traits, for almost everything. Of course, we won't always manage that, but we should only go to upper stories when absolutely required, because every story costs the Drupal Association money and puts more CO2 in the atmosphere. Not to mention our precious time.
Up Next
In the next post, I put these principles to work on a small newsroom module, showing how to hide entities from domain code so it can be Unit-tested.
Want a faster, leaner test suite for your Drupal project? Talk to our team.
25 Nov 2026 12:00am GMT