typo3-rector
БесплатноБез исполняемых скриптовНе проверенApplies TYPO3 Rector upgrade patterns for PHP migrations toward TYPO3 v14, including Rector configuration, dry runs, rule sets, ViewFactory, Extbase…
Об этом скилле
TYPO3 Rector Upgrade Patterns
Compatibility: TYPO3 v14.x This skill covers patterns for writing code that works on TYPO3 v14.
TYPO3 API First: Always use TYPO3's built-in APIs, core features, and established conventions before creating custom implementations. Do not reinvent what TYPO3 already provides. Always verify that the APIs and methods you use exist and are not deprecated in TYPO3 v14 by checking the official TYPO3 documentation.
1. Introduction to TYPO3 Rector
Rector is an automated refactoring tool that helps migrate TYPO3 PHP code between major versions. It applies predefined rules to update deprecated code patterns. For non-PHP migrations (FlexForms, TypoScript, Fluid, YAML), use Fractor -- see the typo3-fractor skill.
Installation
composer require --dev ssch/typo3-rector
# or with DDEV:
ddev composer require --dev ssch/typo3-rector
Important: Rector loads your project's autoloader. For TYPO3 v14 projects, Rector must run on PHP 8.2+ because TYPO3 v14 packages use
readonlyclasses and other PHP 8.2 syntax — and webconsulting projects target PHP 8.4+, so run Rector on the same PHP version the project requires. If your local PHP is older, always use DDEV or a container:ddev exec vendor/bin/rector process --dry-run
Always run Rector, never skip it. Manual replacements (e.g.
strpos->str_starts_with) miss edge cases that Rector rules handle correctly. Rector also catches deprecated TYPO3 namespace changes and method signature updates that are hard to find manually.
Basic configuration (TYPO3 v14 target)
Create rector.php in your project root:
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
use Rector\ValueObject\PhpVersion;
use Ssch\TYPO3Rector\Set\Typo3LevelSetList;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/packages',
__DIR__ . '/public/typo3conf/ext',
])
->withSkip([
__DIR__ . '/public/typo3conf/ext/*/Resources/',
__DIR__ . '/public/typo3conf/ext/*/Tests/',
])
->withPhpVersion(PhpVersion::PHP_84)
->withSets([
LevelSetList::UP_TO_PHP_84,
Typo3LevelSetList::UP_TO_TYPO3_14,
])
->withImportNames();
Incremental upgrades: On a very old codebase you may run
UP_TO_TYPO3_13in a dedicated step first, thenUP_TO_TYPO3_14. Published extensions should declaretypo3/cms-core: ^14.3once you ship for v14 — 14.0 through 14.2 no longer receive security updates.
Current state (typo3-rector v3.14, mid-2026)
typo3-rector 3.14 runs on Rector 2.5 and is maintained by Simon Schaufelberger, partly funded through TYPO3 community budgets. Run composer update ssch/typo3-rector before each migration pass so the newest v14 rules apply. Notable in 3.14:
- Migrates TYPO3-bundled Fluid class names to standalone Fluid, which TYPO3 v14 uses
- Migrates
makeCategorizable()registrations - Extends
$GLOBALS['TSFE']->fe_usermigration coverage - Hardens the
HashServiceandMailMessage::send()migrations
2. Running Rector
Dry Run (Preview Changes)
# Show what would be changed
ddev exec vendor/bin/rector process --dry-run
# For specific extension
ddev exec vendor/bin/rector process packages/my_extension --dry-run
Apply Changes
# Apply all changes
ddev exec vendor/bin/rector process
# Apply to specific path
ddev exec vendor/bin/rector process packages/my_extension
Clear Cache After
ddev typo3 cache:flush
ddev composer dump-autoload
3. Version constraints and extra Rector sets
Version constraints
For extensions targeting TYPO3 v14:
<?php
// ext_emconf.php
$EM_CONF[$_EXTKEY] = [
'title' => 'My Extension',
'version' => '2.0.0',
'state' => 'stable',
'constraints' => [
'depends' => [
'typo3' => '14.3.0-14.99.99',
'php' => '8.4.0-8.5.99',
],
'conflicts' => [],
'suggests' => [],
],
];
// composer.json
{
"require": {
"php": "^8.4",
"typo3/cms-core": "^14.3"
}
}
Optional: TYPO3 v14 rule set only
Add explicit v14 rules (in addition to or instead of the level set, depending on your Rector version):
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Ssch\TYPO3Rector\Set\Typo3SetList;
return RectorConfig::configure()
->withPaths([__DIR__ . '/packages'])
->withSets([
Typo3SetList::TYPO3_14,
]);
4. Key Migration Patterns (TYPO3 v14)
Fluid ViewFactory (Replaces StandaloneView)
The ViewFactory approach works on TYPO3 v14:
<?php
declare(strict_types=1);
namespace Vendor\Extension\Service;
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Core\View\ViewFactoryData;
use TYPO3\CMS\Core\View\ViewFactoryInterface;
final class Rendering
Установить typo3-rector в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл typo3-rector?
Applies TYPO3 Rector upgrade patterns for PHP migrations toward TYPO3 v14, including Rector configuration, dry runs, rule sets, ViewFactory, Extbase responses, PSR-14 events, backend modules, TCA, and manual follow-up checks. Use when running Rector, fixing deprecations, upgrading TYPO3 PHP code, or preparing extensions for v14.
Как установить скилл typo3-rector?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл typo3-rector запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic