You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->logger->warning("Failed to read file content during class discovery: {$file->getPathname()}", [
335
+
'exception' => $e->getMessage(),
336
+
]);
340
337
341
338
returnnull;
342
339
}
343
340
344
-
try {
345
-
$content = file_get_contents($filePath);
346
-
if (false === $content) {
347
-
$this->logger->warning('Failed to read file content.', ['file' => $filePath]);
348
-
349
-
returnnull;
350
-
}
351
-
if (\strlen($content) > 500 * 1024) {
352
-
$this->logger->debug('Skipping large file during class discovery.', ['file' => $filePath]);
341
+
if (\strlen($content) > 500 * 1024) {
342
+
$this->logger->warning('Skipping large file during class discovery.', ['file' => $file->getPathname()]);
353
343
354
-
returnnull;
355
-
}
344
+
returnnull;
345
+
}
356
346
347
+
try {
357
348
$tokens = token_get_all($content);
358
349
} catch (\Throwable$e) {
359
-
$this->logger->warning("Failed to read or tokenize file during class discovery: {$filePath}", ['exception' => $e->getMessage()]);
350
+
$this->logger->warning("Failed to tokenize file during class discovery: {$file->getPathname()}", [
351
+
'exception' => $e->getMessage(),
352
+
]);
360
353
361
354
returnnull;
362
355
}
@@ -427,7 +420,7 @@ private function getClassFromFile(string $filePath): ?string
427
420
428
421
if (!empty($potentialClasses)) {
429
422
if (!class_exists($potentialClasses[0], false)) {
430
-
$this->logger->debug('getClassFromFile returning potential non-class type. Are you sure this class has been autoloaded?', ['file' => $filePath, 'type' => $potentialClasses[0]]);
423
+
$this->logger->debug('getClassFromFile returning potential non-class type. Are you sure this class has been autoloaded?', ['file' => $file->getPathname(), 'type' => $potentialClasses[0]]);
0 commit comments