@@ -68,6 +68,9 @@ public function testWithSubNamespaceReturnsNamespacedAdapter(): void
6868 }
6969
7070 $ decoratedAdapter = new TagAwareAdapter (new ArrayAdapter (), new ArrayAdapter ());
71+ if (!\method_exists ($ decoratedAdapter , 'withSubNamespace ' )) {
72+ $ this ->markTestSkipped ('TagAwareAdapter::withSubNamespace() is not available in this Symfony version. ' );
73+ }
7174 $ namespacedAdapter = $ decoratedAdapter ->withSubNamespace ('foo ' );
7275
7376 $ adapter = new TraceableTagAwareCacheAdapterForV3WithNamespace ($ this ->hub , $ decoratedAdapter );
@@ -97,6 +100,9 @@ public function testNamespaceIsAddedToSpanData(): void
97100 ->willReturn ($ transaction );
98101
99102 $ decoratedAdapter = new TagAwareAdapter (new ArrayAdapter (), new ArrayAdapter ());
103+ if (!\method_exists ($ decoratedAdapter , 'withSubNamespace ' )) {
104+ $ this ->markTestSkipped ('TagAwareAdapter::withSubNamespace() is not available in this Symfony version. ' );
105+ }
100106 $ adapter = new TraceableTagAwareCacheAdapterForV3WithNamespace ($ this ->hub , $ decoratedAdapter );
101107
102108 $ namespaced = $ adapter ->withSubNamespace ('foo ' )->withSubNamespace ('bar ' );
@@ -125,6 +131,9 @@ public function testSingleNamespaceIsAddedToSpanData(): void
125131 ->willReturn ($ transaction );
126132
127133 $ decoratedAdapter = new TagAwareAdapter (new ArrayAdapter (), new ArrayAdapter ());
134+ if (!\method_exists ($ decoratedAdapter , 'withSubNamespace ' )) {
135+ $ this ->markTestSkipped ('TagAwareAdapter::withSubNamespace() is not available in this Symfony version. ' );
136+ }
128137 $ adapter = new TraceableTagAwareCacheAdapterForV3WithNamespace ($ this ->hub , $ decoratedAdapter );
129138
130139 $ namespaced = $ adapter ->withSubNamespace ('foo ' );
0 commit comments