File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1212namespace Symfony \Bridge \PhpUnit \Legacy ;
1313
1414use PHPUnit \TextUI \Command as BaseCommand ;
15- use PHPUnit \TextUI \Configuration \Configuration ;
15+ use PHPUnit \TextUI \Configuration \Configuration as LegacyConfiguration ;
1616use PHPUnit \TextUI \Configuration \Registry ;
1717use PHPUnit \TextUI \TestRunner as BaseRunner ;
18+ use PHPUnit \TextUI \XmlConfiguration \Configuration ;
19+ use PHPUnit \TextUI \XmlConfiguration \Loader ;
1820use Symfony \Bridge \PhpUnit \SymfonyTestsListener ;
1921
2022/**
@@ -43,9 +45,13 @@ protected function createRunner(): BaseRunner
4345
4446 if (isset ($ this ->arguments ['configuration ' ])) {
4547 $ configuration = $ this ->arguments ['configuration ' ];
46- if (!$ configuration instanceof Configuration) {
48+
49+ if (!class_exists (Configuration::class) && !$ configuration instanceof LegacyConfiguration) {
4750 $ configuration = Registry::getInstance ()->get ($ this ->arguments ['configuration ' ]);
51+ } elseif (class_exists (Configuration::class) && !$ configuration instanceof Configuration) {
52+ $ configuration = (new Loader ())->load ($ this ->arguments ['configuration ' ]);
4853 }
54+
4955 foreach ($ configuration ->listeners () as $ registeredListener ) {
5056 if ('Symfony\Bridge\PhpUnit\SymfonyTestsListener ' === ltrim ($ registeredListener ->className (), '\\' )) {
5157 $ registeredLocally = true ;
You can’t perform that action at this time.
0 commit comments