[FEATURE] Make allowed file extensions configurable for all file processors #343
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
FluidProcessorOption
withALLOWED_FILE_EXTENSIONS
constantFluidFormatConfiguration
classFluidFileProcessor
to read from configurationTypoScript Processor
ALLOWED_FILE_EXTENSIONS
constant toTypoScriptProcessorOption
TypoScriptPrettyPrinterFormatConfiguration
to accept and manage allowed file extensionsTypoScriptFileProcessor
to use strict comparison and read from configurationYaml Processor
YamlProcessorOption
withALLOWED_FILE_EXTENSIONS
constantYamlFormatConfiguration
class for managing allowed extensionsYamlFileProcessor
to use the new configuration classXml Processor
ALLOWED_FILE_EXTENSIONS
constant toXmlProcessorOption
XmlFormatConfiguration
classXmlFileProcessor
to 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 processorVerification
To verify the changes:
composer local:contribute
to ensure all code quality checks passExample
A simplified example configuration regarding the new configuration options might look like the following: