ssch/typo3-rector
TYPO3 Rector applies instant upgrades and refactoring to TYPO3 website and extension code, easing migrations between releases and removing deprecations. Extending Rector, it supports PHP 5.3+ and requires PHP 7.4+. Always run on development environments under version control, never production.
GeneralUtility::makeInstance() → constructor injection), but the package’s rules target TYPO3 APIs (t3lib_div, TYPO3_CONF_VARS, ext_emconf.php) that are irrelevant to Laravel core logic. v3.16.0 does not change this — all four changes are TYPO3-domain rules.RenameClassTYPO3CMS_Extbase_AnnotationToAttributeRector migrates Extbase docblock annotations to PHP 8 attributes. This is the same conceptual shift Laravel/Symfony ecosystems are making (Symfony #[Autowire], #[Autoconfigure]; Laravel 11 #[AsCommand]). It strengthens the case for a custom laravel-rector set modelled on these rules, but the shipped rule itself operates on TYPO3\CMS\Extbase\Annotation and cannot be applied to Laravel classes.AddAsNonSchedulableCommandAttributeRector adds a TYPO3 console attribute. The Laravel analogue is Artisan command registration/scheduling (#[AsCommand], Schedule::command()->withoutOverlapping()), which is not covered by this package. Useful as a reference pattern, not a usable rule.structarmed ^0.17 bump enables the CodeQuality preset by default. This is the most architecturally meaningful change for a TPM: it widens rule scope beyond TYPO3 version migrations into generic code-quality refactors, increasing the chance of diffs in shared/hybrid code that are not TYPO3-related.TYPO3\CMS\Core\Utility\GeneralUtility).App::make()).MigrateLabelReferenceToDomainSyntaxRector bugfix marginally improves reliability for teams already running this rule on TYPO3 modules.structarmed ^0.17 floor — verify it resolves against your pinned rector/rector and PHP-CS-Fixer versions before upgrading.^3.| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| False Positives | High | Run --dry-run; exclude Laravel paths in .rector.php. |
| Broken Refactoring | Critical | Test in staging with Git; one rule per commit. |
| Preset Scope Creep | High | New: CodeQuality preset is on by default in v3.16.0 — explicitly disable or narrow it in config if you only want TYPO3 migration rules. |
| Dependency Conflicts | Medium | Isolate as a dev dependency; verify structarmed ^0.17 against pinned rector/rector. |
| Rule Misapplication | High | Disable TYPO3-specific rules outside designated paths. |
| Version Drift | Medium | New: pin an exact tag (e.g. 3.16.0) rather than ^3.16; minors ship weekly. |
| Performance Overhead | Low | Run in parallel; restrict withPaths(). |
App::make() → app(), #[AsCommand]) borrowing this pattern?structarmed ^0.17 been validated against our pinned Rector version and CI PHP matrix?MigrateLabelReferenceToDomainSyntaxRector fix improves confidence in the TYPO3 side..rector.php:
{
"scripts": {
"typo3:rector": "vendor/bin/rector process --paths=typo3-extensions --dry-run"
}
}
return static::configure()
->withPaths([__DIR__ . '/typo3-extensions'])
->withExcludedPaths([__DIR__ . '/app', __DIR__ . '/vendor']);
New: explicitly set the rule/preset list rather than inheriting defaults, since v3.16.0 turns on CodeQuality.TYPO3\CMS\*, t3lib_*) and confirm a real TYPO3 surface area exists.3.16.0, run composer update --with-dependencies in a branch.RemoveTypo3VersionChecksRector); add annotation→attribute migration as a discrete, reviewable changeset (high diff volume, PHP 8 requirement).| Component | Compatibility | Notes |
|---|---|---|
| PHP Version | High | PHP 7.4–8.x; attribute rules require PHP 8.0+ target code. |
| Composer | High | Dev dependency. |
| Rector Core | High | PHP-Parser based; verify against pinned Rector version. |
| structarmed | Medium | New: requires ^0.17; check transitive resolution. |
| TYPO3 Classes | Low | Fails/no-ops if Laravel code references TYPO3\CMS\*. |
| Symfony DI | Medium | Autoconfigure/attribute rules may collide with Laravel attributes. |
| Laravel Facades | None | No rules for Cache::remember(), Auth::user(), etc. |
.rector.php with excluded paths and explicit rule lists (do not rely on the new default preset).--dry-run on TYPO3 modules; review git diff; separate CodeQuality-driven changes from migration-driven ones.vendor/ (Rector + TYPO3 rules). No change.ssch/typo3-rector now depends on structarmed ^0.17; a transitive major bump is the most likely upgrade blocker.@simonschaufi authored 3 of 4 PRs) — bus factor risk. Escalation path is GitHub issues only.structarmed ^0.17 conflicting with pinned tooling blocks CI mid-sprint.3.16.0, gate upgrades behind a dry-run review, and do not invest in it as a Laravel modernization tool.How can I help you explore Laravel packages today?