-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnamespacer.config.php
More file actions
22 lines (20 loc) · 992 Bytes
/
namespacer.config.php
File metadata and controls
22 lines (20 loc) · 992 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
return [
"prepare" => [
function(string $package, array $config, string $path, string $namespacePrefix) {
// ValueWrapper.php defines a class named with the Unicode replacement character (U+FFFD).
// ClassMapGenerator in Docker cannot scan it via is_file(), so move it from classmap to
// files (always-required) so it is still loaded but never scanned for class names.
if ($package === 'symfony/cache' && isset($config['autoload']['classmap'])) {
$entry = 'Traits/ValueWrapper.php';
$key = array_search($entry, $config['autoload']['classmap']);
if ($key !== false) {
unset($config['autoload']['classmap'][$key]);
$config['autoload']['classmap'] = array_values($config['autoload']['classmap']);
$config['autoload']['files'][] = $entry;
}
}
return $config;
}
],
];