-
Notifications
You must be signed in to change notification settings - Fork 6
/
scoper.inc.php
53 lines (49 loc) · 1.74 KB
/
scoper.inc.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
declare(strict_types=1);
return [
'expose-global-functions' => false,
// 'exclude-functions' => ['app'],
'patchers' => [
function (string $filePath, string $prefix, string $content): string {
if (\str_contains($content, $prefix . '\\app')) {
$content = \preg_replace(
'/' . $prefix . '[\\\\]+app' . '/',
'app',
$content
);
}
if (\str_starts_with($filePath, 'src/Tasks/')) {
$content = \str_replace(
$prefix . '\\\\Illuminate\\\\',
'Illuminate\\\\',
$content
);
$content = \str_replace(
$prefix . '\\\\App\\\\',
'App\\\\',
$content
);
$content = \str_replace(
$prefix . '\\\\PHPUnit\\\\Framework\\\\',
'PHPUnit\\\\Framework\\\\',
$content
);
}
return $content;
},
],
'exclude-files' => [
'vendor/symfony/polyfill-php80/bootstrap.php',
'vendor/symfony/polyfill-ctype/bootstrap80.php',
'vendor/symfony/polyfill-ctype/bootstrap.php',
'vendor/symfony/polyfill-intl-normalizer/bootstrap80.php',
'vendor/symfony/polyfill-intl-normalizer/bootstrap.php',
'vendor/symfony/polyfill-mbstring/bootstrap80.php',
'vendor/symfony/polyfill-mbstring/bootstrap.php',
'vendor/symfony/polyfill-intl-grapheme/bootstrap80.php',
'vendor/symfony/polyfill-intl-grapheme/bootstrap.php',
],
'exclude-namespaces' => [
'Symfony\Polyfill\*',
],
];