Skip to content

feat: [Filters] enables a filter to run more than once with different arguments #8977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jun 24, 2024

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Jun 20, 2024

Description
Fixes #8973

  • enables a filter to run more than once with the different arguments
  • changes array structure of Filters::$filters and $filtersClasses
  • Filters::$arguments and $argumentsClass are no longer used
  • does not instantiate the same filter class more than once
  • spark routes and filter:check show filter arguments

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added bug Verified issues on the current code behavior or pull requests that will fix them enhancement PRs that improve existing functionalities breaking change Pull requests that may break existing functionalities 4.6 docs needed Pull requests needing documentation write-ups and/or revisions. labels Jun 20, 2024
@kenjis kenjis force-pushed the fix-same-filter-more-than-once branch from 94d8096 to 5a3ad95 Compare June 20, 2024 06:57
@tangix
Copy link
Contributor

tangix commented Jun 20, 2024

spark routes and filter:check show filter arguments

❤️

Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@kenjis kenjis force-pushed the fix-same-filter-more-than-once branch from 5a3ad95 to 3499a12 Compare June 21, 2024 00:09
@kenjis kenjis force-pushed the fix-same-filter-more-than-once branch from c0b1d8a to 6bf2c09 Compare June 21, 2024 00:58
@kenjis kenjis removed the docs needed Pull requests needing documentation write-ups and/or revisions. label Jun 21, 2024
@kenjis kenjis changed the title fix: [Filters] nested $routes->group() with same filter name doesn't work feat: [Filters] enables a filter to run more than once with the different arguments Jun 21, 2024
@kenjis
Copy link
Member Author

kenjis commented Jun 21, 2024

Added docs.

@kenjis kenjis changed the title feat: [Filters] enables a filter to run more than once with the different arguments feat: [Filters] enables a filter to run more than once with different arguments Jun 21, 2024
@kenjis kenjis removed the bug Verified issues on the current code behavior or pull requests that will fix them label Jun 24, 2024
@kenjis kenjis merged commit 773751e into codeigniter4:4.6 Jun 24, 2024
42 checks passed
@kenjis kenjis deleted the fix-same-filter-more-than-once branch June 24, 2024 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Pull requests that may break existing functionalities enhancement PRs that improve existing functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants