File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
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 Twig \ Profiler \ Profile ;
13
+ use Symfony \ Bundle \ TwigBundle \ TwigBundle ;
14
14
15
15
final class TwigTracingExtensionTest extends TestCase
16
16
{
@@ -24,6 +24,13 @@ final class TwigTracingExtensionTest extends TestCase
24
24
*/
25
25
private $ listener ;
26
26
27
+ public static function setUpBeforeClass (): void
28
+ {
29
+ if (!self ::isTwigBundlePackageInstalled ()) {
30
+ self ::markTestSkipped ('This test requires the "symfony/twig-bundle" Composer package to be installed. ' );
31
+ }
32
+ }
33
+
27
34
protected function setUp (): void
28
35
{
29
36
$ this ->hub = $ this ->createMock (HubInterface::class);
@@ -113,4 +120,9 @@ public function testLeaveDoesNothingIfSpanDoesNotExistsForProfile(): void
113
120
114
121
$ this ->listener ->leave (new Profile ('main ' , Profile::TEMPLATE ));
115
122
}
123
+
124
+ private static function isTwigBundlePackageInstalled (): bool
125
+ {
126
+ return class_exists (TwigBundle::class);
127
+ }
116
128
}
You can’t perform that action at this time.
0 commit comments