[FEATURE] Make allowed file extensions configurable for all file processors#338
Closed
chrissonntag wants to merge 6 commits intoandreaswolf:mainfrom
Closed
Conversation
…essor 🌟 Add FluidFormatConfiguration class to manage allowed file extensions. 🔧 Update FluidFileProcessor to utilize FluidFormatConfiguration for file extension handling.
✨ 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.
✨ Added 'allowedFileExtensions' to TypoScriptProcessorOption for better file handling. 🔧 Updated TypoScriptFileProcessor to use strict comparison for file extension checks.
…tCollectingVisitor
... due to local:contribute
Collaborator
|
Thank you for this amazing pull request! That is really the quality that I would expect! One small wish would be to extract the bump commit into a separate PR. Could you do that please? Then I can merge that independently. |
Contributor
Author
|
Thanks and you welcome. We are using Fractor regularly since a couple months now and are delighted by it and to contribute to it. |
Contributor
Author
|
Succeeded by #341 and therefore closed |
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 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: