[FEATURE] Make allowed file extensions configurable for all file processors#341
Closed
chrissonntag wants to merge 5 commits intoandreaswolf:mainfrom
Closed
Conversation
…essor 🌟 Add FluidFormatConfiguration class to manage allowed file extensions. 🔧 Update FluidFileProcessor to utilize FluidFormatConfiguration for file extension handling.
✨ Added 'allowedFileExtensions' to TypoScriptProcessorOption for better file handling. 🔧 Updated TypoScriptFileProcessor to use strict comparison for file extension checks.
✨ Introduced XmlFormatConfiguration for managing allowed file extensions. 🔧 Updated XmlFileProcessor to utilize XmlFormatConfiguration for file extension validation.
…leProcessor ✨ Add YamlFormatConfiguration class for managing allowed file extensions. 🔧 Update YamlFileProcessor to utilize YamlFormatConfiguration for file extension handling.
…tCollectingVisitor
Collaborator
|
Please drop the cleanup commit and then rebase. I have fixed that already. |
Contributor
Author
|
LOL, 3rd time is the charm :D |
Collaborator
|
I wonder what you are doing and why you just can't rebase your PR. |
Contributor
Author
|
I just found it easier to create a new branch and cherry-pick those commits to it. But that's just my confused brain 😂 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 improvementVerification
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: