We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b6ca1b commit 8bbb015Copy full SHA for 8bbb015
1 file changed
bootstrap.php
@@ -1,6 +1,7 @@
1
<?php declare(strict_types = 1);
2
3
spl_autoload_register(function (string $class): void {
4
+ static $composerAutoloader;
5
if (!extension_loaded('phar') || defined('__PHPSTAN_RUNNING__')) {
6
return;
7
}
@@ -10,7 +11,9 @@
10
11
throw new \Exception('Phar wrapper is not registered. Please review your php.ini settings.');
12
13
- $composerAutoloader = require 'phar://' . __DIR__ . '/phpstan.phar/vendor/autoload.php';
14
+ if ($composerAutoloader === null) {
15
+ $composerAutoloader = require 'phar://' . __DIR__ . '/phpstan.phar/vendor/autoload.php';
16
+ }
17
$composerAutoloader->loadClass($class);
18
19
0 commit comments