@@ -51,7 +51,8 @@ public static function provideRegistry(): iterable
5151
5252 $loader = require_once __DIR__.'/autoload.php';
5353 // Ensure InstalledVersions is available
54- require_once __DIR__.'/composer/InstalledVersions.php';
54+ $installedVersionsPath = __DIR__.'/composer/InstalledVersions.php';
55+ if (file_exists($installedVersionsPath)) require_once $installedVersionsPath;
5556
5657 // Restore the backup
5758 if (isset($existingComposerAutoloadFiles)) {
@@ -85,7 +86,8 @@ public static function provideRegistry(): iterable
8586
8687 $loader = require_once __DIR__.'/autoload.php';
8788 // Ensure InstalledVersions is available
88- require_once __DIR__.'/composer/InstalledVersions.php';
89+ $installedVersionsPath = __DIR__.'/composer/InstalledVersions.php';
90+ if (file_exists($installedVersionsPath)) require_once $installedVersionsPath;
8991
9092 // Restore the backup
9193 if (isset($existingComposerAutoloadFiles)) {
@@ -124,7 +126,8 @@ public static function provideRegistry(): iterable
124126
125127 $loader = require_once __DIR__.'/autoload.php';
126128 // Ensure InstalledVersions is available
127- require_once __DIR__.'/composer/InstalledVersions.php';
129+ $installedVersionsPath = __DIR__.'/composer/InstalledVersions.php';
130+ if (file_exists($installedVersionsPath)) require_once $installedVersionsPath;
128131
129132 // Restore the backup
130133 if (isset($existingComposerAutoloadFiles)) {
@@ -165,7 +168,8 @@ public static function provideRegistry(): iterable
165168
166169 $loader = require_once __DIR__.'/autoload.php';
167170 // Ensure InstalledVersions is available
168- require_once __DIR__.'/composer/InstalledVersions.php';
171+ $installedVersionsPath = __DIR__.'/composer/InstalledVersions.php';
172+ if (file_exists($installedVersionsPath)) require_once $installedVersionsPath;
169173
170174 // Restore the backup
171175 if (isset($existingComposerAutoloadFiles)) {
@@ -215,7 +219,8 @@ public static function provideRegistry(): iterable
215219
216220 $loader = require_once __DIR__.'/autoload.php';
217221 // Ensure InstalledVersions is available
218- require_once __DIR__.'/composer/InstalledVersions.php';
222+ $installedVersionsPath = __DIR__.'/composer/InstalledVersions.php';
223+ if (file_exists($installedVersionsPath)) require_once $installedVersionsPath;
219224
220225 // Restore the backup
221226 if (isset($existingComposerAutoloadFiles)) {
@@ -262,7 +267,8 @@ public static function provideRegistry(): iterable
262267
263268 $loader = require_once __DIR__.'/autoload.php';
264269 // Ensure InstalledVersions is available
265- require_once __DIR__.'/composer/InstalledVersions.php';
270+ $installedVersionsPath = __DIR__.'/composer/InstalledVersions.php';
271+ if (file_exists($installedVersionsPath)) require_once $installedVersionsPath;
266272
267273 // Restore the backup
268274 if (isset($existingComposerAutoloadFiles)) {
@@ -305,7 +311,8 @@ function humbug_phpscoper_expose_class(string $exposed, string $prefixed): void
305311
306312 $loader = require_once __DIR__.'/autoload.php';
307313 // Ensure InstalledVersions is available
308- require_once __DIR__.'/composer/InstalledVersions.php';
314+ $installedVersionsPath = __DIR__.'/composer/InstalledVersions.php';
315+ if (file_exists($installedVersionsPath)) require_once $installedVersionsPath;
309316
310317 // Restore the backup
311318 if (isset($existingComposerAutoloadFiles)) {
@@ -355,7 +362,8 @@ function humbug_phpscoper_expose_class(string $exposed, string $prefixed): void
355362
356363 $loader = require_once __DIR__.'/autoload.php';
357364 // Ensure InstalledVersions is available
358- require_once __DIR__.'/composer/InstalledVersions.php';
365+ $installedVersionsPath = __DIR__.'/composer/InstalledVersions.php';
366+ if (file_exists($installedVersionsPath)) require_once $installedVersionsPath;
359367
360368 // Restore the backup
361369 if (isset($existingComposerAutoloadFiles)) {
@@ -419,7 +427,8 @@ function humbug_phpscoper_expose_class(string $exposed, string $prefixed): void
419427
420428 $loader = require_once __DIR__.'/autoload.php';
421429 // Ensure InstalledVersions is available
422- require_once __DIR__.'/composer/InstalledVersions.php';
430+ $installedVersionsPath = __DIR__.'/composer/InstalledVersions.php';
431+ if (file_exists($installedVersionsPath)) require_once $installedVersionsPath;
423432
424433 // Restore the backup
425434 if (isset($existingComposerAutoloadFiles)) {
@@ -459,7 +468,8 @@ function humbug_phpscoper_expose_class(string $exposed, string $prefixed): void
459468
460469 $loader = require_once __DIR__.'/autoload.php';
461470 // Ensure InstalledVersions is available
462- require_once __DIR__.'/composer/InstalledVersions.php';
471+ $installedVersionsPath = __DIR__.'/composer/InstalledVersions.php';
472+ if (file_exists($installedVersionsPath)) require_once $installedVersionsPath;
463473
464474 // Restore the backup
465475 if (isset($existingComposerAutoloadFiles)) {
0 commit comments