File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ jobs:
104
104
restore-keys : ${{ runner.os }}-${{ matrix.php }}-composer-${{ matrix.dependencies }}-
105
105
106
106
- name : Remove optional packages
107
- run : composer remove doctrine/dbal doctrine/doctrine-bundle symfony/messenger --dev --no-update
107
+ run : composer remove doctrine/dbal doctrine/doctrine-bundle symfony/messenger symfony/twig-bundle --dev --no-update
108
108
109
109
- name : Install highest dependencies
110
110
run : composer update --no-progress --no-interaction --prefer-dist
Original file line number Diff line number Diff line change 10
10
use Sentry \State \HubInterface ;
11
11
use Sentry \Tracing \Transaction ;
12
12
use Sentry \Tracing \TransactionContext ;
13
+ use Symfony \Bundle \TwigBundle \TwigBundle ;
13
14
use Twig \Profiler \Profile ;
14
15
15
16
final class TwigTracingExtensionTest extends TestCase
@@ -24,6 +25,13 @@ final class TwigTracingExtensionTest extends TestCase
24
25
*/
25
26
private $ listener ;
26
27
28
+ public static function setUpBeforeClass (): void
29
+ {
30
+ if (!self ::isTwigBundlePackageInstalled ()) {
31
+ self ::markTestSkipped ('This test requires the "symfony/twig-bundle" Composer package to be installed. ' );
32
+ }
33
+ }
34
+
27
35
protected function setUp (): void
28
36
{
29
37
$ this ->hub = $ this ->createMock (HubInterface::class);
@@ -113,4 +121,9 @@ public function testLeaveDoesNothingIfSpanDoesNotExistsForProfile(): void
113
121
114
122
$ this ->listener ->leave (new Profile ('main ' , Profile::TEMPLATE ));
115
123
}
124
+
125
+ private static function isTwigBundlePackageInstalled (): bool
126
+ {
127
+ return class_exists (TwigBundle::class);
128
+ }
116
129
}
You can’t perform that action at this time.
0 commit comments