A Claude Code hook that blocks DB writes without a fresh dump
During my TYPO3 migration the agent could run commands that change the database. A PreToolUse hook makes it take a dump first. The script, the registration and how I test it.
Senior TYPO3 Developer at jweiland.net, TYPO3 CMS Certified Developer. I write about TYPO3 upgrades, extension development, PHP and AI-assisted engineering with Claude Code.
During my TYPO3 migration the agent could run commands that change the database. A PreToolUse hook makes it take a dump first. The script, the registration and how I test it.
Module registration in ext_tables.php is gone. A small backend module for TYPO3 v13 and v14 with Modules.php, #[AsController], ModuleTemplateFactory and editor access.
One big Rector run over an extension gives a diff nobody can review. My workflow: one target version, one set per run, one commit per set, and a clear list of manual work.
TYPO3 v14 ships Fluid 5. Stricter ViewHelper arguments, reserved underscore variables and new CDATA handling break templates that worked in v13. How to find and fix them.
My old TYPO3 7.6 site got its URLs from realurl. Here is how I moved them to site configuration, slugs and sys_redirect records in TYPO3 14, and checked every URL with curl.
The real upgrade behind hoja.in/blog: backup, plugin audit, WP-CLI core and database update, and the PHP 8 fatal error from a child theme that passed a callback as a bare constant.
Most LCP and layout shift problems on TYPO3 pages come from oversized images, late fonts and blocking CSS. Fixes with f:image, srcset, preload and font-display, and how to measure.
Enums for TCA select values, readonly classes for events, constructor promotion with DI, first-class callables, typed constants and #[Override] in TYPO3 extensions.
AI-written PHP looks plausible, which is the problem. One Composer script runs lint, PHP-CS-Fixer, PHPStan and PHPUnit, and a Stop hook keeps the agent working while it is red.
Stop repeating your TYPO3 conventions in every prompt. A SKILL.md with a description that triggers, short rules and reference files that load only when needed.