close
Skip to content

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

Merged
kenjis merged 17 commits into
codeigniter4:4.4from
kenjis:feat-config-filter-arguments
Feb 2, 2023
Merged

feat: Filter Arguments with $filters in Config\Filters#7159
kenjis merged 17 commits into
codeigniter4:4.4from
kenjis:feat-config-filter-arguments

Conversation

@kenjis

@kenjis kenjis commented Jan 21, 2023

Copy link
Copy Markdown
Member

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

kenjis commented Jan 21, 2023

Copy link
Copy Markdown
Member Author

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

@MGatner MGatner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Awesome! Long-requested feature.

Comment thread system/Filters/Filters.php Outdated
Comment thread system/Filters/Filters.php
@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

@datamweb datamweb left a comment

Copy link
Copy Markdown
Contributor

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

@MGatner MGatner left a comment

Copy link
Copy Markdown
Member

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

enhancement PRs that improve existing functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants