-
-
Notifications
You must be signed in to change notification settings - Fork 100
/
scoper.inc.php
50 lines (44 loc) · 1.39 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
<?php
declare(strict_types=1);
/*
* This file is part of the box project.
*
* (c) Kevin Herrera <[email protected]>
* Théo Fidry <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
use Isolated\Symfony\Component\Finder\Finder as IsolatedFinder;
$jetBrainStubs = (require __DIR__.'/vendor/humbug/php-scoper/res/get-scoper-phpstorm-stubs.php')(
__DIR__.'/vendor/jetbrains/phpstorm-stubs',
);
$jetBrainStubsPatcher = (require __DIR__.'/vendor/humbug/php-scoper/res/create-scoper-phpstorm-stubs-map-patcher.php')(
stubsMapPath: __DIR__.'/vendor/jetbrains/phpstorm-stubs/PhpStormStubsMap.php',
);
return [
'exclude-files' => $jetBrainStubs,
'exclude-classes' => [
IsolatedFinder::class,
],
'exclude-constants' => [
// Symfony global constants
'/^SYMFONY\_[\p{L}_]+$/',
],
'exclude-functions' => [
// https://github.com/humbug/php-scoper/pull/894
'uv_poll_init_socket',
'uv_signal_init',
'uv_signal_start',
],
'expose-classes' => [
\Composer\Autoload\ClassLoader::class,
\KevinGH\Box\Compactor\Compactor::class,
\KevinGH\Box\Compactor\Json::class,
\KevinGH\Box\Compactor\Php::class,
\KevinGH\Box\Compactor\PhpScoper::class,
],
'patchers' => [
$jetBrainStubsPatcher,
]
];