[FEATURE] Make allowed file extensions configurable for all file processors #338
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make allowed file extensions configurable for all file processors
Description
This pull request addresses the issue #337 "Feature Request: Make allowed file extensions configurable". By introducing configurable allowed file extensions, users can now customize which file extensions each processor handles without modifying source code.
The previous defined, hardcoded file extensions serve as default values, but can now be customized to the user's extend.
Changes
Fluid Processor
FluidProcessorOptionwithALLOWED_FILE_EXTENSIONSconstantFluidFormatConfigurationclassFluidFileProcessorto read from configurationTypoScript Processor
ALLOWED_FILE_EXTENSIONSconstant toTypoScriptProcessorOptionTypoScriptPrettyPrinterFormatConfigurationto accept and manage allowed file extensionsTypoScriptFileProcessorto use strict comparison and read from configurationYaml Processor
YamlProcessorOptionwithALLOWED_FILE_EXTENSIONSconstantYamlFormatConfigurationclass for managing allowed extensionsYamlFileProcessorto use the new configuration classXml Processor
ALLOWED_FILE_EXTENSIONSconstant toXmlProcessorOptionXmlFormatConfigurationclassXmlFileProcessorto use configuration and strict comparisonCommits
[FEATURE] Introduce FluidFormatConfiguration and update FluidFileProcessor- Adds configuration for Fluid processor[FEATURE] Add XmlFormatConfiguration and integrate into XmlFileProcessor- Adds configuration for Xml processor[FEATURE] Implement YamlFormatConfiguration and integrate into YamlFileProcessor- Adds configuration for Yaml processor[FEATURE] Enhance TypoScript configuration options- Adds configuration for TypoScript processor[CLEANUP] Apply rector rule NarrowTooWideReturnTypeRector to StatementCollectingVisitor- Cosmetic code improvement[TASK] Bump tivie/htaccess-parser from ^0.3.0 to ^0.4.0- Dependency update due tocomposer local:contributeThe last two commits are cosmetic changes required to maintain code quality standards.
Verification
To verify the changes:
composer local:contributeto ensure all code quality checks passExample
A simplified example configuration regarding the new configuration options might look like the following: