Skip to content

Allow distinguishing update from delete invalidations - #40

Merged
jdreesen merged 5 commits into
mainfrom
invalidation-event-type
Aug 31, 2026
Merged

Allow distinguishing update from delete invalidations#40
jdreesen merged 5 commits into
mainfrom
invalidation-event-type

Conversation

@jdreesen

@jdreesen jdreesen commented Feb 3, 2026

Copy link
Copy Markdown
Member

ElementInvalidationEvent listeners previously had no way to tell whether the invalidation was triggered by a save or a delete. This adds that information so listeners can react differently to each case.

Changes

  • ElementInvalidationEvent now exposes a type property of the new InvalidationType enum (Update or Delete).
  • InvalidateElementListener passes the correct type when dispatching the event on save/delete.
  • Docs (doc/4-events.md) and tests updated accordingly.

Usage

use Neusta\Pimcore\HttpCacheBundle\Element\ElementInvalidationEvent;
use Neusta\Pimcore\HttpCacheBundle\Element\InvalidationType;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;

#[AsEventListener]
final class MyInvalidationListener
{
    public function __invoke(ElementInvalidationEvent $event): void
    {
        if (InvalidationType::Delete === $event->type) {
            // React differently on delete vs update
        }
    }
}

@coderabbitai

coderabbitai Bot commented Feb 3, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c8d682df-3071-4de8-8493-ffe2ca19e6fe

Walkthrough

Adds a new EventType enum and threads it through element invalidation: ElementInvalidationEvent now stores the event type, InvalidateElementListener passes EventType::Update/EventType::Delete into invalidation and event creation, and tests updated accordingly.

Changes

Cohort / File(s) Summary
Event Type Definition
src/Element/EventType.php
New enum EventType with cases Update and Delete.
Event Structure Updates
src/Element/ElementInvalidationEvent.php
Constructor now accepts and exposes EventType $type; factory fromElement() signature changed to fromElement(ElementInterface $element, EventType $type) and passes the type into the constructor.
Listener Updates
src/Element/InvalidateElementListener.php
invalidateElement() signature updated to accept EventType $type; onUpdate()/onDelete() now pass EventType::Update/EventType::Delete; dispatch uses updated fromElement($element, $type).
Tests
tests/Unit/Element/InvalidateElementListenerTest.php, tests/Unit/Cache/ResponseTagger/TraceableResponseTaggerTest.php
Tests updated to import and assert EventType usage; ElementInvalidationEvent::fromElement() calls changed to include EventType; a test property renamed in TraceableResponseTaggerTest.
Docs & Rules
.claude/..., doc/11-claude-code.md, README.md, CLAUDE.md
Large set of new documentation and style/rule files added (no runtime behavior changes).

Sequence Diagram(s)

sequenceDiagram
    participant Element as Element (Pimcore)
    participant Listener as InvalidateElementListener
    participant Event as ElementInvalidationEvent
    participant Dispatcher as EventDispatcher

    alt Update Operation
        Element->>Listener: onUpdate(event)
        Listener->>Listener: invalidateElement(element, EventType::Update)
    else Delete Operation
        Element->>Listener: onDelete(event)
        Listener->>Listener: invalidateElement(element, EventType::Delete)
    end

    Listener->>Event: ElementInvalidationEvent::fromElement(element, type)
    Event->>Event: __construct(type, element, elementType, cacheTags)
    Listener->>Dispatcher: dispatch(event)
    Dispatcher->>Dispatcher: Event contains type information
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • lukadschaak
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding the ability to distinguish update invalidations from delete invalidations.
✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch invalidation-event-type

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests/Unit/Cache/ResponseTagger/TraceableResponseTaggerTest.php (1)

17-26: ⚠️ Potential issue | 🔴 Critical

Incomplete property rename causes test failures.

The property was renamed to $traceableResponseTagger on line 17, but all usages throughout the file still reference the old name $collectTagsResponseTagger. This includes:

  • Line 25: setUp() assigns to the old property name
  • Lines 33, 41, 55, 65, 71, 74: Test methods use the old property name

The tests will fail or behave unexpectedly because $traceableResponseTagger is never assigned.

🐛 Proposed fix: complete the rename
 protected function setUp(): void
 {
     $this->innerTagger = $this->prophesize(ResponseTagger::class);
-    $this->collectTagsResponseTagger = new TraceableResponseTagger($this->innerTagger->reveal());
+    $this->traceableResponseTagger = new TraceableResponseTagger($this->innerTagger->reveal());
 }

And update all test method usages from $this->collectTagsResponseTagger to $this->traceableResponseTagger:

 public function tag_should_collect_tags(): void
 {
-    $this->collectTagsResponseTagger->tag(
+    $this->traceableResponseTagger->tag(
         new CacheTags(
             CacheTag::fromString('tag1'),
             CacheTag::fromString('tag2'),
         ));

     self::assertSame(
         'tag1,tag2',
-        $this->collectTagsResponseTagger->recordedTags->toString(),
+        $this->traceableResponseTagger->recordedTags->toString(),
     );
 }

Apply the same change to tag_should_forward_tags_to_inner_tagger (line 55) and reset_should_reset_collected_tags (lines 65, 71, 74).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/Unit/Cache/ResponseTagger/TraceableResponseTaggerTest.php` around lines
17 - 26, The property was partially renamed to $traceableResponseTagger but
setUp() and all test methods still reference $collectTagsResponseTagger; update
setUp() to assign $this->traceableResponseTagger = new
TraceableResponseTagger($this->innerTagger->reveal()) and replace every
occurrence of $this->collectTagsResponseTagger in test methods (including
tag_should_forward_tags_to_inner_tagger and reset_should_reset_collected_tags)
with $this->traceableResponseTagger so the instantiated object is used
consistently.
🧹 Nitpick comments (8)
.claude/skills/brainstorm/SKILL.md (1)

52-52: Use “multiple-choice” for consistency and grammar polish.

At Line 52, hyphenating the compound adjective improves readability.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/brainstorm/SKILL.md at line 52, Replace the compound
adjective "multiple choice" with the hyphenated form "multiple-choice" in the
SKILL.md text where the phrase "multiple choice questions" appears; update the
sentence to read "multiple-choice questions" to improve consistency and grammar.
.claude/skills/php-best-practices/rules/modern-enums.md (1)

82-87: Clarify the $tag->type->type property access.

The expression $tag->type->type accesses a nested type property twice, which appears confusing or potentially erroneous. If $tag->type already returns an ElementType, it should be used directly.

📝 Suggested fix
-return match ($tag->type->type) {
+return match ($tag->type) {
     ElementType::Asset => $this->asset->isEnabled($tag),
     ElementType::Document => $this->document->isEnabled($tag),
     ElementType::Object => $this->object->isEnabled($tag),
 };
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/php-best-practices/rules/modern-enums.md around lines 82 -
87, The match expression is using a confusing double property access
`$tag->type->type`; update the code to use the actual ElementType value directly
(e.g. `match ($tag->type)`) or otherwise dereference the correct property so the
match operates on an ElementType enum instance; also add a defensive check or
typehint where `type` is assigned to ensure `$tag->type` is an ElementType
before calling methods like `isEnabled` on `$this->asset`, `$this->document`,
and `$this->object`.
.claude/skills/php-best-practices/rules/solid-interface-segregation.md (2)

68-71: Same undefined $tags issue in the "Good" example.

For consistency and clarity, show where $tags originates.

📝 Suggested fix
     public function onUpdate(): void
     {
+        $tags = $this->collectTags();
         $this->invalidator->invalidate($tags);
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/php-best-practices/rules/solid-interface-segregation.md
around lines 68 - 71, The onUpdate() method in the "Good" example uses an
undefined $tags variable; update onUpdate() so $tags is defined or passed in —
e.g., add a parameter to onUpdate(array $tags): void or obtain $tags from a
known source (like $this->getTags() or a method call) before calling
$this->invalidator->invalidate($tags); ensure the change is applied to the
onUpdate() declaration and any call sites so $tags is clearly sourced.

33-37: Undefined variable $tags in example.

The $tags variable is used but not defined within the onUpdate method scope, which could confuse readers. Consider showing where $tags comes from.

📝 Suggested fix
     public function onUpdate(): void
     {
-        $this->cache->invalidate($tags); // Only uses 1 of 5 methods
+        $tags = $this->collectTags(); // Example: fetch tags from somewhere
+        $this->cache->invalidate($tags); // Only uses 1 of 5 methods
     }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/php-best-practices/rules/solid-interface-segregation.md
around lines 33 - 37, The example's onUpdate method uses an undefined local
variable $tags when calling $this->cache->invalidate($tags); — fix by showing
where $tags comes from: either add a method parameter (public function
onUpdate(array $tags): void) and use that, reference an existing class property
(e.g. $this->tags) initialized elsewhere, or construct/derive $tags inside
onUpdate before calling $this->cache->invalidate; update the example to include
one of these approaches so $tags is clearly defined for the onUpdate method and
matches the CacheInterface::invalidate usage.
.claude/skills/debug/SKILL.md (1)

81-81: Add language specifier to fenced code block.

The fenced code block at line 81 is missing a language identifier, which affects syntax highlighting and rendering.

📝 Suggested fix
-```
+```plaintext
 For EACH component boundary:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/debug/SKILL.md at line 81, The fenced code block containing
the line "For EACH component boundary:" is missing a language specifier; update
the opening fence for that block (the triple backticks before "For EACH
component boundary:") to include a language identifier such as plaintext (e.g.,
change ``` to ```plaintext) so the block is properly labeled for syntax
highlighting and rendering.
.claude/skills/tdd/SKILL.md (1)

49-58: Add language specifiers to fenced code blocks.

Multiple fenced code blocks are missing language identifiers, which affects rendering and syntax highlighting:

  • Line 49: Process flow diagram
  • Line 251: Test output
  • Line 269: Test output
📝 Suggested fixes
-```
+```text
 RED (Write failing test)
-```
+```text
 $ composer tests -- --filter it_rejects_empty_cache_tag
-```
+```text
 $ composer tests -- --filter it_rejects_empty_cache_tag

Also applies to: 251-254, 269-272

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/tdd/SKILL.md around lines 49 - 58, Several fenced code blocks
in .claude/skills/tdd/SKILL.md are missing language specifiers (e.g., the flow
block starting with "RED (Write failing test)" and the test output blocks
containing "$ composer tests -- --filter it_rejects_empty_cache_tag"); update
each triple-backtick fence to include an appropriate language tag such as text
(e.g., ```text) so the process flow and test output blocks render with correct
syntax highlighting and formatting for the blocks containing "RED (Write failing
test)" and the test output lines.
doc/11-claude-code.md (1)

15-38: Consider adding language identifiers to fenced code blocks.

Markdownlint flags several code blocks without language specifiers. For conversation/workflow examples, you can use text or leave them as-is since they represent human-AI dialog rather than executable code. The directory tree at line 15 could benefit from text or plaintext for consistency.

Example fix for the directory structure block
-```
+```text
 CLAUDE.md                          # Project overview, quick reference, conventions
 .claude/
 ├── rules/                         # Always loaded — project conventions

Also applies to: 52-59, 76-82, 88-95, 101-107, 164-167, 171-174

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@doc/11-claude-code.md` around lines 15 - 38, Add language identifiers to the
fenced code blocks in the CLAUDE.md document—at minimum label the directory tree
block that starts with "CLAUDE.md" and ".claude/" as ```text (or ```plaintext)
and similarly tag other example/conversation/workflow blocks (e.g., the
conversation/workflow examples and other unlabeled snippets) so markdownlint
stops flagging them; update the fenced code delimiters throughout the file
(including the directory tree and other example blocks referenced in the review)
to include the chosen language token.
.claude/skills/writing-skills/SKILL.md (1)

209-214: Consider using consistent skill name format in cross-references.

The examples reference skills as "tdd skill" and "debug skill" (lowercase, no hyphens), but the naming convention (line 91) requires "letters, numbers, and hyphens only", and other examples show hyphenated names like "condition-based-waiting" and "root-cause-tracing".

For clarity and consistency, consider using the actual skill names (e.g., if the TDD skill is named test-driven-development, reference it that way).

📝 Example of consistent formatting
-**REQUIRED SUB-SKILL:** Use tdd skill
-**REQUIRED BACKGROUND:** You MUST understand debug skill
+**REQUIRED SUB-SKILL:** Use test-driven-development skill
+**REQUIRED BACKGROUND:** You MUST understand debugging skill

Or if the skill names are simply tdd and debug:

-**REQUIRED SUB-SKILL:** Use tdd skill
-**REQUIRED BACKGROUND:** You MUST understand debug skill
+**REQUIRED SUB-SKILL:** Use tdd
+**REQUIRED BACKGROUND:** You MUST understand debug
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.claude/skills/writing-skills/SKILL.md around lines 209 - 214, Update the
inconsistent cross-reference texts "tdd skill" and "debug skill" to match the
repository naming convention (letters, numbers, and hyphens only) used elsewhere
(see examples "condition-based-waiting" and "root-cause-tracing") — replace "tdd
skill" with the canonical skill name (e.g., "test-driven-development" or "tdd"
as appropriate) and "debug skill" with the canonical "debug" name, and ensure
the "REQUIRED SUB-SKILL" and "REQUIRED BACKGROUND" lines use the exact
hyphenated identifiers instead of plain phrases so cross-references are
consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.claude/skills/brainstorm/SKILL.md:
- Around line 33-42: The fenced code block that begins with "Explore project
context" is missing a language tag (triggers MD040); fix it by adding a language
identifier (e.g., "text") to the opening triple backticks so the block becomes
```text ... ```; update the block in SKILL.md around the "Explore project
context" section to include this tag to satisfy markdownlint.

In @.claude/skills/debug/condition-based-waiting.md:
- Around line 20-27: The "good" example loop using $maxAttempts, $interval,
$result and $cache->get('key') silently exits on timeout; update it to
explicitly handle the timeout after the loop (e.g., check if $result is still
null and then throw an exception, return an error, or log a clear timeout
message) so callers see the failure; apply the same explicit post-loop timeout
handling to the other example using the same variables.

In @.claude/skills/review/SKILL.md:
- Around line 14-19: The two untyped fenced code blocks that start with the
lines "1. SCOPE: Understand what changed and why" and the later block beginning
with "## Review Summary" should include language identifiers to satisfy MD040;
update the first fence to use a language like ```text (or ```markdown) and
update the second fenced block to use ```markdown (or ```text) so both fences
become typed, leaving the inner content unchanged and preserving indentation and
content in the blocks.

---

Outside diff comments:
In `@tests/Unit/Cache/ResponseTagger/TraceableResponseTaggerTest.php`:
- Around line 17-26: The property was partially renamed to
$traceableResponseTagger but setUp() and all test methods still reference
$collectTagsResponseTagger; update setUp() to assign
$this->traceableResponseTagger = new
TraceableResponseTagger($this->innerTagger->reveal()) and replace every
occurrence of $this->collectTagsResponseTagger in test methods (including
tag_should_forward_tags_to_inner_tagger and reset_should_reset_collected_tags)
with $this->traceableResponseTagger so the instantiated object is used
consistently.

---

Nitpick comments:
In @.claude/skills/brainstorm/SKILL.md:
- Line 52: Replace the compound adjective "multiple choice" with the hyphenated
form "multiple-choice" in the SKILL.md text where the phrase "multiple choice
questions" appears; update the sentence to read "multiple-choice questions" to
improve consistency and grammar.

In @.claude/skills/debug/SKILL.md:
- Line 81: The fenced code block containing the line "For EACH component
boundary:" is missing a language specifier; update the opening fence for that
block (the triple backticks before "For EACH component boundary:") to include a
language identifier such as plaintext (e.g., change ``` to ```plaintext) so the
block is properly labeled for syntax highlighting and rendering.

In @.claude/skills/php-best-practices/rules/modern-enums.md:
- Around line 82-87: The match expression is using a confusing double property
access `$tag->type->type`; update the code to use the actual ElementType value
directly (e.g. `match ($tag->type)`) or otherwise dereference the correct
property so the match operates on an ElementType enum instance; also add a
defensive check or typehint where `type` is assigned to ensure `$tag->type` is
an ElementType before calling methods like `isEnabled` on `$this->asset`,
`$this->document`, and `$this->object`.

In @.claude/skills/php-best-practices/rules/solid-interface-segregation.md:
- Around line 68-71: The onUpdate() method in the "Good" example uses an
undefined $tags variable; update onUpdate() so $tags is defined or passed in —
e.g., add a parameter to onUpdate(array $tags): void or obtain $tags from a
known source (like $this->getTags() or a method call) before calling
$this->invalidator->invalidate($tags); ensure the change is applied to the
onUpdate() declaration and any call sites so $tags is clearly sourced.
- Around line 33-37: The example's onUpdate method uses an undefined local
variable $tags when calling $this->cache->invalidate($tags); — fix by showing
where $tags comes from: either add a method parameter (public function
onUpdate(array $tags): void) and use that, reference an existing class property
(e.g. $this->tags) initialized elsewhere, or construct/derive $tags inside
onUpdate before calling $this->cache->invalidate; update the example to include
one of these approaches so $tags is clearly defined for the onUpdate method and
matches the CacheInterface::invalidate usage.

In @.claude/skills/tdd/SKILL.md:
- Around line 49-58: Several fenced code blocks in .claude/skills/tdd/SKILL.md
are missing language specifiers (e.g., the flow block starting with "RED (Write
failing test)" and the test output blocks containing "$ composer tests --
--filter it_rejects_empty_cache_tag"); update each triple-backtick fence to
include an appropriate language tag such as text (e.g., ```text) so the process
flow and test output blocks render with correct syntax highlighting and
formatting for the blocks containing "RED (Write failing test)" and the test
output lines.

In @.claude/skills/writing-skills/SKILL.md:
- Around line 209-214: Update the inconsistent cross-reference texts "tdd skill"
and "debug skill" to match the repository naming convention (letters, numbers,
and hyphens only) used elsewhere (see examples "condition-based-waiting" and
"root-cause-tracing") — replace "tdd skill" with the canonical skill name (e.g.,
"test-driven-development" or "tdd" as appropriate) and "debug skill" with the
canonical "debug" name, and ensure the "REQUIRED SUB-SKILL" and "REQUIRED
BACKGROUND" lines use the exact hyphenated identifiers instead of plain phrases
so cross-references are consistent.

In `@doc/11-claude-code.md`:
- Around line 15-38: Add language identifiers to the fenced code blocks in the
CLAUDE.md document—at minimum label the directory tree block that starts with
"CLAUDE.md" and ".claude/" as ```text (or ```plaintext) and similarly tag other
example/conversation/workflow blocks (e.g., the conversation/workflow examples
and other unlabeled snippets) so markdownlint stops flagging them; update the
fenced code delimiters throughout the file (including the directory tree and
other example blocks referenced in the review) to include the chosen language
token.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c442656 and 0b13633.

📒 Files selected for processing (42)
  • .claude/rules/architecture.md
  • .claude/rules/bundle-usage.md
  • .claude/rules/code-style.md
  • .claude/rules/roles.md
  • .claude/rules/static-analysis.md
  • .claude/rules/testing.md
  • .claude/skills/brainstorm/SKILL.md
  • .claude/skills/code-review/SKILL.md
  • .claude/skills/context7/SKILL.md
  • .claude/skills/debug/SKILL.md
  • .claude/skills/debug/condition-based-waiting.md
  • .claude/skills/debug/defense-in-depth.md
  • .claude/skills/debug/root-cause-tracing.md
  • .claude/skills/humanizer/SKILL.md
  • .claude/skills/php-best-practices/SKILL.md
  • .claude/skills/php-best-practices/rules/error-custom-exceptions.md
  • .claude/skills/php-best-practices/rules/modern-constructor-promotion.md
  • .claude/skills/php-best-practices/rules/modern-enums.md
  • .claude/skills/php-best-practices/rules/modern-first-class-callables.md
  • .claude/skills/php-best-practices/rules/modern-match-expression.md
  • .claude/skills/php-best-practices/rules/modern-readonly-properties.md
  • .claude/skills/php-best-practices/rules/solid-dependency-inversion.md
  • .claude/skills/php-best-practices/rules/solid-interface-segregation.md
  • .claude/skills/php-best-practices/rules/solid-single-responsibility.md
  • .claude/skills/php-best-practices/rules/type-strict-mode.md
  • .claude/skills/php-pro/SKILL.md
  • .claude/skills/php-pro/references/async-patterns.md
  • .claude/skills/php-pro/references/laravel-patterns.md
  • .claude/skills/php-pro/references/modern-php-features.md
  • .claude/skills/php-pro/references/symfony-patterns.md
  • .claude/skills/php-pro/references/testing-quality.md
  • .claude/skills/review/SKILL.md
  • .claude/skills/review/checklist.md
  • .claude/skills/tdd/SKILL.md
  • .claude/skills/web-search/SKILL.md
  • .claude/skills/writing-skills/SKILL.md
  • CLAUDE.md
  • README.md
  • doc/11-claude-code.md
  • src/Element/EventType.php
  • tests/Unit/Cache/ResponseTagger/TraceableResponseTaggerTest.php
  • tests/Unit/Element/InvalidateElementListenerTest.php
✅ Files skipped from review due to trivial changes (7)
  • .claude/skills/debug/defense-in-depth.md
  • .claude/skills/debug/root-cause-tracing.md
  • README.md
  • .claude/skills/php-pro/references/laravel-patterns.md
  • .claude/rules/testing.md
  • .claude/skills/php-pro/references/testing-quality.md
  • .claude/skills/php-best-practices/rules/error-custom-exceptions.md

Comment thread .claude/skills/brainstorm/SKILL.md Outdated
Comment thread .claude/skills/debug/condition-based-waiting.md Outdated
Comment thread .claude/skills/review/SKILL.md Outdated
@jan888adams

Copy link
Copy Markdown
Contributor

I’m not a fan of the MR title. It explains the changes, but it doesn’t clearly describe the feature.

@jan888adams

Copy link
Copy Markdown
Contributor

I created a brach, with testcases and documentation: for this MR:
see: #44

jdreesen and others added 3 commits August 31, 2026 11:01
- Fix blank line after <?php in EventType.php
- Rename $collectTagsResponseTagger to $traceableResponseTagger in TraceableResponseTaggerTest
- Fix broken fromElement() calls in InvalidateElementListenerTest (missing EventType arg)
- Add tests verifying EventType::Update and EventType::Delete are dispatched correctly

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Jan Adams <j.adams@ecodar.de>
@jdreesen
jdreesen force-pushed the invalidation-event-type branch from ab795c9 to 91f8412 Compare August 31, 2026 09:02
Addresses code review feedback: InvalidationType stays unbacked
(unlike ElementType, its value never ends up in a cache tag), and
fromElement()/invalidateElement() now take the type before the
element, consistent with the constructor's parameter order.
@jdreesen jdreesen changed the title Add EventType info to ElementInvalidationEvent Allow distinguishing update from delete invalidations Aug 31, 2026
@jdreesen
jdreesen merged commit 79af1c2 into main Aug 31, 2026
12 checks passed
@jdreesen
jdreesen deleted the invalidation-event-type branch August 31, 2026 17:23
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.

2 participants