-
Notifications
You must be signed in to change notification settings - Fork 6
IBX-11826: Cleaned up http-cache ResponseTagger deprecations #82
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
base: 6.0
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,20 +21,15 @@ public function __construct(private iterable $taggers = []) | |
| { | ||
| } | ||
|
|
||
| public function supports(mixed $value): bool | ||
| { | ||
| return true; | ||
| } | ||
|
|
||
| public function tag(mixed $value): void | ||
| { | ||
| foreach ($this->taggers as $tagger) { | ||
| if (method_exists($tagger, 'supports')) { | ||
| if ($tagger->supports($value)) { | ||
| $tagger->tag($value); | ||
| } | ||
| } else { | ||
| trigger_deprecation( | ||
| 'ibexa/http-cache', | ||
| '5.0.7', | ||
| '%s does not implement supports(). This will be required in 6.0, supports() will be a part of ResponseTagger interface', | ||
| get_debug_type($tagger), | ||
| ); | ||
| if ($tagger->supports($value)) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Going back the initial idea that pushed us towards these changes - maybe we throw an exception* if there's no tagger supporting given value? As this must be a mistake. The origial report said that if you pass a *or log a warning, or log a warning in |
||
| $tagger->tag($value); | ||
| } | ||
| } | ||
|
|
||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.