File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
src/Symfony/Bridge/PhpUnit Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ class DeprecationErrorHandler
25
25
26
26
private static $ isRegistered = false ;
27
27
28
+ /** @var string[] absolute paths to vendor directories */
29
+ private static $ vendors ;
30
+
28
31
/**
29
32
* Registers and configures the deprecation handler.
30
33
*
@@ -294,23 +297,20 @@ private static function getPackage(string $path): string
294
297
295
298
private static function getVendors (): array
296
299
{
297
- /** @var string[] absolute paths to vendor directories */
298
- static $ vendors ;
299
-
300
- if (null === $ vendors ) {
301
- $ vendors = array ();
300
+ if (null === self ::$ vendors ) {
301
+ self ::$ vendors = array ();
302
302
foreach (get_declared_classes () as $ class ) {
303
303
if ('C ' === $ class [0 ] && 0 === strpos ($ class , 'ComposerAutoloaderInit ' )) {
304
304
$ r = new \ReflectionClass ($ class );
305
305
$ v = dirname (dirname ($ r ->getFileName ()));
306
306
if (file_exists ($ v .'/composer/installed.json ' )) {
307
- $ vendors [] = $ v ;
307
+ self :: $ vendors [] = $ v ;
308
308
}
309
309
}
310
310
}
311
311
}
312
312
313
- return $ vendors ;
313
+ return self :: $ vendors ;
314
314
}
315
315
316
316
private static function inVendors (string $ path ): bool
You can’t perform that action at this time.
0 commit comments