Skip to content

Commit c41d908

Browse files
committed
fix: psalm autoload
1 parent 8e17a72 commit c41d908

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

psalm-autoload.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
];
2020

2121
foreach ($directories as $directory) {
22+
$filesToLoad = [];
23+
2224
$iterator = new RecursiveIteratorIterator(
2325
new RecursiveDirectoryIterator(
2426
$directory,
@@ -45,6 +47,13 @@
4547
continue;
4648
}
4749

48-
require_once $file->getPathname();
50+
$filesToLoad[] = $file->getPathname();
51+
}
52+
53+
// Sort files to ensure consistent loading order across operating systems
54+
sort($filesToLoad);
55+
56+
foreach ($filesToLoad as $file) {
57+
require_once $file;
4958
}
5059
}

0 commit comments

Comments
 (0)