a9f / typo3-fractor
TYPO3 extension for the File Read-Analyse-Change Tool. Allows modifying XML files
Installs: 8 954
Dependents: 0
Suggesters: 0
Security: 0
Stars: 8
Watchers: 3
Forks: 0
Type:fractor-extension
Requires
- php: ^8.2
- ext-dom: *
- a9f/fractor: ^0.4.2
- a9f/fractor-extension-installer: ^0.4.2
- a9f/fractor-fluid: ^0.4.2
- a9f/fractor-typoscript: ^0.4.2
- a9f/fractor-xml: ^0.4.2
- a9f/fractor-yaml: ^0.4.2
- symplify/rule-doc-generator-contracts: ^11.2
README
Ease your TYPO3 upgrades by also automatically changing TypoScript, YAML and Fluid. An enhancement for TYPO3-Rector.
Warning
❗ Never run this tool on production! Always run it on development environment where code is under version control (e.g. git). Review and test changes before releasing to production. Code migrations could potentially break your website!
Installation
Install TYPO3 Fractor via composer by running the following command in your terminal:
composer require a9f/typo3-fractor --dev
Configuration
Create a PHP configuration file fractor.php
where you define the paths to your files and the rules to apply.
<?php use a9f\Fractor\Configuration\FractorConfiguration; use a9f\Typo3Fractor\Set\Typo3LevelSetList; return FractorConfiguration::configure() ->withPaths([__DIR__ . '/packages/']) ->withSets([ Typo3LevelSetList::UP_TO_TYPO3_13 ]);
Have a look at all available rules: Overview of all rules
Usage
To see the code migrations that Fractor will do, run:
vendor/bin/fractor process --dry-run
and when you want to execute the migrations run:
vendor/bin/fractor process
Fractor will apply the rules specified in the configuration file to the targeted files.
Review the changes to ensure they meet your expectations.
Development
Development happens in the Fractor monorepo on GitHub