-
Notifications
You must be signed in to change notification settings - Fork 0
/
scoper.inc.php
60 lines (55 loc) · 1.77 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
54
55
56
57
58
59
60
<?php
/**
* PHP-Scoper is a tool which essentially moves any body of code, including all
* dependencies such as vendor directories, to a new and distinct namespace.
*
* @package PluginWP
*/
use Isolated\Symfony\Component\Finder\Finder;
// You can do your own things here, e.g. collecting symbols to expose dynamically
// or files to exclude.
// However beware that this file is executed by PHP-Scoper, hence if you are using
// the PHAR it will be loaded by the PHAR. So it is highly recommended to avoid
// to auto-load any code here: it can result in a conflict or even corrupt
// the PHP-Scoper analysis.
return array(
// The prefix configuration. If a non-null value is used, a random prefix
// will be generated instead.
//
// For more see: https://github.com/humbug/php-scoper/blob/master/docs/configuration.md#prefix.
'prefix' => 'PluginWP\Dependencies',
// The base output directory for the prefixed files.
// This will be overridden by the 'output-dir' command line option if present.
'output-dir' => 'includes/Dependencies',
// By default when running php-scoper add-prefix, it will prefix all relevant code found in the current working
// directory. You can however define which files should be scoped by defining a collection of Finders in the
// following configuration key.
//
// For more see: https://github.com/humbug/php-scoper/blob/master/docs/configuration.md#finders-and-paths.
'finders' => array(
Finder::create()
->files()
->ignoreVCS( true )
->notName(
array(
'README.md',
'/.*\\.dist/',
'Makefile',
'composer.json',
'composer.lock',
)
)
->exclude(
array(
'doc',
'test',
'test_old',
'tests',
'Tests',
'vendor-bin',
'composer',
)
)
->in( 'vendor' ),
),
);