Download the PHP package pluswerk/typoscript-auto-fixer without Composer
On this page you can find all versions of the php package pluswerk/typoscript-auto-fixer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pluswerk/typoscript-auto-fixer
More information about pluswerk/typoscript-auto-fixer
Files in pluswerk/typoscript-auto-fixer
Package typoscript-auto-fixer
Short Description Provides an auto fixer based on the TypoScript linter from Martin Helmich
License GPL-3.0-or-later
Informations about the package typoscript-auto-fixer
typoscript-auto-fixer
This is an auto fixer for TYPO3 TypoScript code style based on martin-helmich/typo3-typoscript-lint of Martin Helmich.
Quick guide
Composer
composer require --dev pluswerk/typoscript-auto-fixer
There is a default configuration, so no configuration must be given.
Usage
Basic usage
Options
Option | Description |
---|---|
-t, --typoscript-linter-configuration | Use typoscript-lint.yml file |
-g, --grumphp-configuration | Use grumphp.yml file |
-c, --configuration-file | For both options (-t, -g) a different file path can be given. |
Example
Configuration
The fixes are done based on the typoscript linter configuration. Only if a sniffer class is configured the corresponding fixer is executed.
The configuration is the same as martin-helmich/typo3-typoscript-lint.
If grumphp is used the configuration is done as here: pluswerk/grumphp-typoscript-task.
Fixers exist for following sniffer classes
- EmptySection
- OperatorWhitespace
- Indentation
- NestingConsistency
For details see What is fixed section
What is fixed
Line breaks
Multiple empty lines are reduced to one empty line.
Example
fixed:
Operator whitespaces (configuration class: OperatorWhitespace)
Example
fixed:
Indentation (configuration class: Indentation)
Depending on configuration the indentation is fixed. Possible characters:
- spaces
- tabs
Also the amount of characters can be set. See martin-helmich/typo3-typoscript-lint for details.
Example
- character: space
- indentPerLevel: 2
fixed:
Empty section (configuration class: EmptySection)
Empty sections are removed.
Example
fixed:
Nesting consistency (configuration class: NestingConsistency)
Nesting consistency is built if paths can be merged in a file. Indentation is used like described above in indentation fixer.
Example
fixed:
All versions of typoscript-auto-fixer with dependencies
helmich/typo3-typoscript-lint Version ^2.0
pluswerk/grumphp-typoscript-task Version ^0.0.4
symfony/yaml Version ~2.7|~3.0|~4.0
symfony/console Version ~2.7|~3.0|~4.0