Skip to content

Explicitly listed types supported by Response Tagger#3109

Open
mnocon wants to merge 7 commits into5.0from
response-tagget
Open

Explicitly listed types supported by Response Tagger#3109
mnocon wants to merge 7 commits into5.0from
response-tagget

Conversation

@mnocon
Copy link
Copy Markdown
Contributor

@mnocon mnocon commented Mar 30, 2026

As mentioned on the community Slack, the doc should list the available types to make this less confusing.

If an experienced Symfony developer who reads the doc still make mistakes when using the API, then it must be confusing.

In addition, I think we should consider improving the DX by making changes directly in the ibexa/http-cache package, for example by:

  • in dev mode, throwing an exception on unsupported types
  • in prod, logging that the type does not have any supported taggers
  • adding a Content (or ContentAwareInterface) tagger to support Content out of the box

Report:
Screenshot 2026-03-30 at 12 19 47

Answer:

Screenshot 2026-03-30 at 12 20 15

Feedback:
Screenshot 2026-03-30 at 12 20 30

@github-actions
Copy link
Copy Markdown

Preview of modified files

Preview of modified Markdown:

@mnocon mnocon changed the title Expliciltly listed types supported by Response Tagger Explicitly listed types supported by Response Tagger Mar 30, 2026
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

code_samples/ change report

Before (on target branch)After (in current PR)

code_samples/cache/http_cache/src/response_tagging.php


code_samples/cache/http_cache/src/response_tagging.php

docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md@166:``` php hl_lines="3 6 9"
docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md@167:[[= include_file('code_samples/cache/http_cache/src/response_tagging.php', 2, 11) =]]
docs/infrastructure_and_maintenance/cache/http_cache/content_aware_cache.md@168:```

001⫶/** @var \Ibexa\Contracts\HttpCache\ResponseTagger\ResponseTagger $responseTagger */
002⫶/** @var \Ibexa\Core\MVC\Symfony\View\ContentValueView|\Ibexa\Core\MVC\Symfony\View\LocationValueView $view */
003❇️$responseTagger->tag($view); // When working with a view
004⫶
005⫶/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Content $content */
006❇️$responseTagger->tag($content->getContentInfo()); // When working with a content item
007⫶
008⫶/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Location $location */
009❇️$responseTagger->tag($location); // When working with a location

Download colorized diff

@mnocon mnocon marked this pull request as ready for review March 30, 2026 10:18
@mnocon mnocon requested a review from a team March 30, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant