Skip to content

Conversation

@chrissonntag
Copy link

Introduce ProcessorSkipper for a distinguished processor execution

Summary

This PR adds the ProcessorSkipper class to enable conditional skipping of file processors based on configuration, which addresses issue #209. The feature allows more granular control over which processors are executed, improving flexibility for complex scenarios.

Key Changes

  • ProcessorSkipper: New class to manage processor skipping logic.
  • Integration: ProcessorSkipper is now injected and used in both FractorRunner and AllowedFileExtensionsResolver to skip processors as configured.
  • Configuration: SkipConfiguration and FractorConfigurationBuilder updated to support processor skipping alongside rule/path skipping.

Details

  • Processors can be skipped by specifying their class in the skip configuration.
  • All relevant classes and type annotations have been updated to reflect the new configuration options.
  • No breaking changes; existing skip logic for rules and paths remains supported.

Example

use a9f\FractorFluid\FluidFileProcessor;
use a9f\FractorHtaccess\HtaccessFileProcessor;
use a9f\FractorTypoScript\TypoScriptFileProcessor;
use a9f\FractorXml\XmlFileProcessor;
use a9f\FractorYaml\YamlFileProcessor;

return FractorConfiguration::configure()
    ->withSkip([
        '*/node_modules',
        '*/vendor/*',
        FluidFileProcessor::class,
        HtaccessFileProcessor::class,
        TypoScriptFileProcessor::class,
        XmlFileProcessor::class,
        YamlFileProcessor::class,
    ]);

- ✨ Added ProcessorSkipper class to manage processor skipping logic.
- 🔧 Integrated ProcessorSkipper into FractorRunner and AllowedFileExtensionsResolver to conditionally skip processors based on configuration.
- 📜 Updated SkipConfiguration to support processor skipping configurations.
@simonschaufi
Copy link
Collaborator

Can you let your AI also write some tests for it?

@chrissonntag
Copy link
Author

Sure thing, will do. I'm getting back to it tomorrow

@chrissonntag
Copy link
Author

I'd say, I delay the implementation of any tests until we have decided how to proceed with the whole skipping thing ;-) There is a chance that this PR is already obsolete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants