PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.7.1
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.7.1
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
← All changes | vendor/composer/ClassLoader.php +15 -28 3.10.03.7.1 View file →
@@ -41,11 +41,8 @@
41 41 * @see https://www.php-fig.org/psr/psr-4/
42 42 */
43 43 class ClassLoader
44 44 {
45 - /** @var \Closure(string):void */
46 - private static $includeFile;
47 -
48 45 /** @var ?string */
49 46 private $vendorDir;
50 47
51 48 // PSR-4
@@ -108,9 +105,8 @@
108 105 */
109 106 public function __construct($vendorDir = null)
110 107 {
111 108 $this->vendorDir = $vendorDir;
112 - self::initializeIncludeClosure();
113 109 }
114 110
115 111 /**
116 112 * @return string[]
@@ -152,9 +148,9 @@
152 148 }
153 149
154 150 /**
155 151 * @return string[] Array of classname => path
156 - * @psalm-return array<string, string>
152 + * @psalm-var array<string, string>
157 153 */
158 154 public function getClassMap()
159 155 {
160 156 return $this->classMap;
@@ -428,10 +424,9 @@
428 424 */
429 425 public function loadClass($class)
430 426 {
431 427 if ($file = $this->findFile($class)) {
432 - $includeFile = self::$includeFile;
433 - $includeFile($file);
428 + includeFile($file);
434 429
435 430 return true;
436 431 }
437 432
@@ -559,27 +554,19 @@
559 554 }
560 555
561 556 return false;
562 557 }
558 +}
563 559
564 - /**
565 - * @return void
566 - */
567 - private static function initializeIncludeClosure()
568 - {
569 - if (self::$includeFile !== null) {
570 - return;
571 - }
572 -
573 - /**
574 - * Scope isolated include.
575 - *
576 - * Prevents access to $this/self from included files.
577 - *
578 - * @param string $file
579 - * @return void
580 - */
581 - self::$includeFile = \Closure::bind(static function($file) {
582 - include $file;
583 - }, null, null);
584 - }
560 +/**
561 + * Scope isolated include.
562 + *
563 + * Prevents access to $this/self from included files.
564 + *
565 + * @param string $file
566 + * @return void
567 + * @private
568 + */
569 +function includeFile($file)
570 +{
571 + include $file;
585 572 }