1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
| | From 4b7c29c3e98aa55ea7567a3d496595e539f30cdb Mon Sep 17 00:00:00 2001
From: Nicolas Graves <ngraves@ngraves.fr>
Date: Sun, 22 Oct 2023 16:31:40 +0200
Subject: [PATCH] Deprecation.php: Do not check for composer in getVendors.
---
DeprecationErrorHandler/Deprecation.php | 23 ++---------------------
1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/DeprecationErrorHandler/Deprecation.php b/DeprecationErrorHandler/Deprecation.php
index 79cfa0c..b7074f7 100644
--- a/DeprecationErrorHandler/Deprecation.php
+++ b/DeprecationErrorHandler/Deprecation.php
@@ -365,27 +365,8 @@ class Deprecation
if (class_exists(DebugClassLoader::class, false)) {
self::$vendors[] = \dirname((new \ReflectionClass(DebugClassLoader::class))->getFileName());
}
- foreach (get_declared_classes() as $class) {
- if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) {
- $r = new \ReflectionClass($class);
- $v = \dirname($r->getFileName(), 2);
- if (file_exists($v.'/composer/installed.json')) {
- self::$vendors[] = $v;
- $loader = require $v.'/autoload.php';
- $paths = self::addSourcePathsFromPrefixes(
- array_merge($loader->getPrefixes(), $loader->getPrefixesPsr4()),
- $paths
- );
- }
- }
- }
- foreach ($paths as $path) {
- foreach (self::$vendors as $vendor) {
- if (0 !== strpos($path, $vendor)) {
- self::$internalPaths[] = $path;
- }
- }
- }
+ self::$vendors[] = $v;
+ self::$internalPaths[] = $paths;
}
return self::$vendors;
--
2.41.0
|