File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed
src/Symfony/Bundle/FrameworkBundle/Test Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 9292
9393 # Create local composer packages for each patched components and reference them in composer.json files when cross-testing components
9494 if [[ ! "${{ matrix.mode }}" = *-deps ]]; then
95- php .github/build-packages.php HEAD^ $SYMFONY_VERSION src/Symfony/Bridge/PhpUnit
95+ php .github/build-packages.php HEAD^ $SYMFONY_VERSION src/Symfony/Bridge/PhpUnit
9696 else
9797 echo SYMFONY_DEPRECATIONS_HELPER=weak >> $GITHUB_ENV
9898 cp composer.json composer.json.orig
Original file line number Diff line number Diff line change 1111
1212namespace Symfony \Bundle \FrameworkBundle \Test ;
1313
14- use PHPUnit \Framework \Attributes \AfterClass ;
1514use PHPUnit \Framework \TestCase ;
1615use Symfony \Component \DependencyInjection \Container ;
1716use Symfony \Component \DependencyInjection \Exception \ServiceNotFoundException ;
@@ -40,6 +39,14 @@ protected function tearDown(): void
4039 static ::$ booted = false ;
4140 }
4241
42+ public static function tearDownAfterClass (): void
43+ {
44+ static ::ensureKernelShutdown ();
45+ static ::$ class = null ;
46+ static ::$ kernel = null ;
47+ static ::$ booted = false ;
48+ }
49+
4350 /**
4451 * @throws \RuntimeException
4552 * @throws \LogicException
@@ -113,11 +120,8 @@ protected static function createKernel(array $options = []): KernelInterface
113120
114121 /**
115122 * Shuts the kernel down if it was used in the test - called by the tearDown method by default.
116- *
117- * @afterClass
118123 */
119- #[AfterClass]
120- public static function ensureKernelShutdown ()
124+ protected static function ensureKernelShutdown ()
121125 {
122126 if (null !== static ::$ kernel ) {
123127 static ::$ kernel ->boot ();
You can’t perform that action at this time.
0 commit comments