Skip to content

Feat/filter types#20

Open
ericges wants to merge 8 commits into
mainfrom
feat/filter-types
Open

Feat/filter types#20
ericges wants to merge 8 commits into
mainfrom
feat/filter-types

Conversation

@ericges
Copy link
Copy Markdown
Contributor

@ericges ericges commented May 1, 2026

This pull request introduces a significant refactor of the filter system, focusing on renaming and replacing the FilterDefinition concept with ConfiguredFilter, and removing the custom filter invoker attribute/registration system. It also cleans up configuration and code style, and removes now-unnecessary files related to filter invoker registration.

Key changes:

Filter System Refactor

  • Replaced all uses of FilterDefinition with ConfiguredFilter throughout the codebase, including type hints, method signatures, and documentation. The collection class was renamed from FilterDefinitionCollection to ConfiguredFilterCollection, with corresponding updates to methods and type annotations. (src/Collection/ConfiguredFilterCollection.php, [1] [2] [3] [4] [5] [6]; src/Contract/FilterElement/HydrateFormContract.php, [7]; src/Contract/FilterElement/IntrinsicValueContract.php, [8] [9]; src/Contract/FilterElement/RuntimeValueContract.php, [10] [11]; src/DataContainer/FilterContainer.php, [12] [13] [14] [15]

  • Removed the AsFilterInvoker attribute and the compiler pass RegisterFilterInvokersPass, effectively eliminating custom filter invoker registration via attributes. Related service configuration and autoconfiguration were also cleaned up. (src/DependencyInjection/Attribute/AsFilterInvoker.php, [1]; src/DependencyInjection/Compiler/RegisterFilterInvokersPass.php, [2]; config/services.yaml, [3]; src/DependencyInjection/HeimrichHannotFlareExtension.php, [4] [5]

Configuration and Code Style

  • Updated mago.toml to only include the src/ directory in the source paths and added a rule for assertion style. (mago.toml, [1] [2]

  • Minor code cleanup, such as removing unnecessary comments and ignoring obsolete PHPStan directives. (src/DependencyInjection/Configuration.php, src/DependencyInjection/Configuration.phpL17)


These changes modernize and streamline the filter system, making it more consistent and easier to maintain by relying on the new ConfiguredFilter model and removing legacy invoker registration code.

@ericges ericges force-pushed the feat/filter-types branch from bc68fe1 to 5122442 Compare May 1, 2026 18:00
@ericges ericges force-pushed the feat/filter-types branch from 374d0e0 to 43c7da1 Compare May 28, 2026 14:14
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.

1 participant