Skip to content

Add documentation about AndCondtion and OrCondition filters#441

Merged
alexander-schranz merged 1 commit intoPHP-CMSIG:0.6from
alexander-schranz:enhancement/doc-and-or-conditions
Oct 10, 2024
Merged

Add documentation about AndCondtion and OrCondition filters#441
alexander-schranz merged 1 commit intoPHP-CMSIG:0.6from
alexander-schranz:enhancement/doc-and-or-conditions

Conversation

@alexander-schranz
Copy link
Copy Markdown
Member

@alexander-schranz alexander-schranz commented Oct 10, 2024

This add missing docs about the newly added AndCondition and OrCondition from #433 .

fix #317

@alexander-schranz alexander-schranz added documentation Improvements or additions to documentation DX Improves the developer experience labels Oct 10, 2024
@alexander-schranz alexander-schranz force-pushed the enhancement/doc-and-or-conditions branch 2 times, most recently from b0d4dea to 62cb1c4 Compare October 10, 2024 15:56
@alexander-schranz alexander-schranz force-pushed the enhancement/doc-and-or-conditions branch from 62cb1c4 to 8a08f60 Compare October 10, 2024 15:59
@alexander-schranz alexander-schranz merged commit 672a2b2 into PHP-CMSIG:0.6 Oct 10, 2024
@alexander-schranz alexander-schranz deleted the enhancement/doc-and-or-conditions branch October 10, 2024 16:06
~~~~~~~~~~~~

The ``AndCondition`` is used to combine two or multiple conditions where all conditions need to match.
As by default all conditions are ``AND``` connected it only make sense to use ``AndCondition`` in
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.

Think the textual explanation can be improved a bit:

  1. There's a trailing backtick too much in ``AND```.
  2. Think grammatically the second sentence is a bit off:
    1. I'm reading the text "As by default all conditions are ``AND``` connected it only make sense..." as one single sentence, even though I think there's supposed to be a comma here (after "connected").
    2. Think "...it only makes sense" is correct (the additional s).
    3. Think you can omit "an" (singular) in "...with an OrCondition filters.". Thus "...with OrCondition filters." seems better.

Overall, I would rephrase the second sentence more like this:

By default, all conditions are connected with AND, so it only makes sense to use an AndCondition in combination with OrCondition filters.


It seems very (very) nitpicky to be honest, and while I'm willing to create a PR for it, I'm not sure if it's of any worth. Maybe next time the docs are updated this can be updated as well. It's totally up to you 🙂

Overall the examples are clear and that's what matters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation DX Improves the developer experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Core] Add support for Nested Conditions Filters via AndCondition and OrCondition

2 participants