Skip to content

Conversation

@chrissonntag
Copy link
Contributor

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,
    ]);

@simonschaufi
Copy link
Collaborator

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

@chrissonntag
Copy link
Contributor Author

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

@chrissonntag
Copy link
Contributor 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.

@simonschaufi
Copy link
Collaborator

please rebase this PR and resolve the conflict

- ✨ 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.
@chrissonntag chrissonntag force-pushed the feature/allow-skipping-file-processors branch from d058ac2 to c8949e5 Compare January 4, 2026 08:36
@chrissonntag
Copy link
Contributor Author

please rebase this PR and resolve the conflict

Done, should be good to go to merge.

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