Skip to content
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

feat: Filter Arguments with $filters in Config\Filters #7159

Merged
merged 17 commits into from
Feb 2, 2023

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Jan 21, 2023

Description

  • add Filter Arguments with $filters in Config\Filters
    • the route filter's arguments take precedence.
    • If the arguments are already defined, throws an exception.

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 enhancement PRs that improve existing functionalities 4.4 labels Jan 21, 2023
@kenjis kenjis marked this pull request as draft January 21, 2023 11:21
@kenjis
Copy link
Member Author

kenjis commented Jan 21, 2023

If both the Route filter and Config filter are applied, should the Route filter's arguments take precedence?
Or, when multiple Config filters are applied, only one is actually executed, what is the arguments in that case?

→ The route filter's arguments take precedence.
If the arguments are already defined, throws an exception.

@kenjis kenjis marked this pull request as ready for review January 23, 2023 03:27
Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

Awesome! Long-requested feature.

system/Filters/Filters.php Outdated Show resolved Hide resolved
system/Filters/Filters.php Show resolved Hide resolved
@kenjis kenjis force-pushed the feat-config-filter-arguments branch from 5433406 to 5c46faa Compare January 31, 2023 08:02
@kenjis kenjis force-pushed the feat-config-filter-arguments branch from 481d5a3 to 472562d Compare January 31, 2023 08:38
Copy link
Contributor

@datamweb datamweb left a comment

Choose a reason for hiding this comment

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

Very good.
I like this PR 💯 .

@kenjis kenjis requested a review from MGatner February 2, 2023 01:13
Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

LGTM!

@kenjis kenjis merged commit d32d17c into codeigniter4:4.4 Feb 2, 2023
@kenjis kenjis deleted the feat-config-filter-arguments branch February 2, 2023 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.4 enhancement PRs that improve existing functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants