Skip to content

Commit b609e36

Browse files
committed
Fixed issue with dependency analysis where empty autoloader paths get unrecognised
1 parent 41ece9f commit b609e36

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

bin/analyse-dependencies

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ validate_dependency()
5050
{
5151
local dependency=${1}
5252
local whitelist_root=${2}
53-
53+
5454
local src_paths=$(get_autoload_paths "${dependency}")
5555

5656
local code=$(echo ${dependency}|sed 's/\//-/g')
@@ -130,10 +130,18 @@ get_autoload_paths()
130130
);
131131
132132
if (isset(\$config['autoload']['psr-4'])) {
133+
foreach (\$config['autoload']['psr-4'] as \$alias => \$path) {
134+
\$config['autoload']['psr-4'][\$alias] = \$path ? \$path : './';
135+
}
136+
133137
echo implode(\PHP_EOL, \$config['autoload']['psr-4']);
134138
}
135139
136140
if (isset(\$config['autoload']['psr-0'])) {
141+
foreach (\$config['autoload']['psr-0'] as \$alias => \$path) {
142+
\$config['autoload']['psr-0'][\$alias] = \$path ? \$path : './';
143+
}
144+
137145
echo implode(\PHP_EOL, \$config['autoload']['psr-0']);
138146
}
139147
SCRIPT

0 commit comments

Comments
 (0)