From b34bba0dfb855385f55d8af6e1b87044b0580568 Mon Sep 17 00:00:00 2001 From: tinect Date: Wed, 29 Jan 2025 15:46:15 +0100 Subject: [PATCH] chore: ignore deprecated class CacheDecorator --- phpstan.neon.dist | 9 +++++++++ src/Components/CacheAdapter.php | 1 + 2 files changed, 10 insertions(+) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 81c2d44..639f77e 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -7,3 +7,12 @@ parameters: - message: "#^Out of .* possible param types, only .* %% actually have it\\. Add more param types to get over .* %%$#" reportUnmatched: false + + - + message: """ + #^Fetching class constant class of deprecated class Shopware\\\\Core\\\\Framework\\\\Adapter\\\\Cache\\\\CacheDecorator\\: + tag\\:v6\\.7\\.0 \\- reason\\:decoration\\-will\\-be\\-removed \\- Will be removed$# + """ + reportUnmatched: false + count: 1 + path: src/Components/CacheAdapter.php diff --git a/src/Components/CacheAdapter.php b/src/Components/CacheAdapter.php index 202ab6d..be17d82 100644 --- a/src/Components/CacheAdapter.php +++ b/src/Components/CacheAdapter.php @@ -112,6 +112,7 @@ public function getType(): string private function getCacheAdapter(AdapterInterface $adapter): AdapterInterface { + // will be removed in Shopware 6.7 if ($adapter instanceof CacheDecorator) { // Do not declare function as static $func = \Closure::bind(fn() => $adapter->decorated, $adapter, $adapter::class);