@@ -92,38 +92,30 @@ use Symfony\Component\Console\Helper\ProgressBar;
92
92
require_once $ autoloaderInWorkingDirectory ;
93
93
}
94
94
95
- $ autoloadProjectAutoloaderFile = function (string $ file ) use (&$ composerAutoloaderProjectPaths ): void {
96
- $ path = realpath (dirname (__DIR__ ) . $ file );
97
- if ($ path === false ) {
98
- return ;
99
- }
95
+ $ path = dirname (__DIR__ , 3 ) . '/autoload.php ' ;
96
+ if (!extension_loaded ('phar ' )) {
97
+ if (@is_file ($ path )) {
98
+ $ composerAutoloaderProjectPaths [] = dirname ($ path , 2 );
100
99
101
- if (!extension_loaded ('phar ' )) {
100
+ require_once $ path ;
101
+ }
102
+ } else {
103
+ $ pharPath = \Phar::running (false );
104
+ if ($ pharPath === '' ) {
102
105
if (@is_file ($ path )) {
103
106
$ composerAutoloaderProjectPaths [] = dirname ($ path , 2 );
104
107
105
108
require_once $ path ;
106
109
}
107
110
} else {
108
- $ pharPath = \Phar::running (false );
109
- if ($ pharPath === '' ) {
110
- if (@is_file ($ path )) {
111
- $ composerAutoloaderProjectPaths [] = dirname ($ path , 2 );
112
-
113
- require_once $ path ;
114
- }
115
- } else {
116
- $ path = realpath (dirname ($ pharPath ) . $ file );
117
- if ($ path !== false && @is_file ($ path )) {
118
- $ composerAutoloaderProjectPaths [] = dirname ($ path , 2 );
111
+ $ path = dirname ($ pharPath , 3 ) . '/autoload.php ' ;
112
+ if (@is_file ($ path )) {
113
+ $ composerAutoloaderProjectPaths [] = dirname ($ path , 2 );
119
114
120
- require_once $ path ;
121
- }
115
+ require_once $ path ;
122
116
}
123
117
}
124
- };
125
-
126
- $ autoloadProjectAutoloaderFile ('/../../autoload.php ' );
118
+ }
127
119
128
120
/** @var array<callable>|false $autoloadFunctionsAfter */
129
121
$ autoloadFunctionsAfter = spl_autoload_functions ();
0 commit comments