File tree Expand file tree Collapse file tree 3 files changed +17
-22
lines changed
lib/internal/Magento/Framework/App/Test/Unit/_files Expand file tree Collapse file tree 3 files changed +17
-22
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * Glob patterns relative to this files parent directory, used by
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+
7
+ /**
8
+ * Glob patterns relative to the project root directory, used by
4
9
* registration.php to generate a list of includes.
5
10
*/
6
11
return [
7
- 'code/*/*/cli_commands.php ' ,
8
- 'code/*/*/registration.php ' ,
9
- 'design/*/*/*/registration.php ' ,
10
- 'i18n/*/*/registration.php ' ,
11
- '../ lib/internal/*/*/registration.php ' ,
12
- '../ lib/internal/*/*/*/registration.php ' ,
12
+ 'app/ code/*/*/cli_commands.php ' ,
13
+ 'app/ code/*/*/registration.php ' ,
14
+ 'app/ design/*/*/*/registration.php ' ,
15
+ 'app/ i18n/*/*/registration.php ' ,
16
+ 'lib/internal/*/*/registration.php ' ,
17
+ 'lib/internal/*/*/*/registration.php ' ,
13
18
];
Original file line number Diff line number Diff line change 1
1
<?php
2
2
/**
3
- * Register components (via a list of glob patterns)
4
- *
5
- * Copyright © 2013-2017 Magento, Inc. All rights reserved.
3
+ * Copyright © Magento, Inc. All rights reserved.
6
4
* See COPYING.txt for license details.
7
5
*/
8
6
7
+ //Register components (via a list of glob patterns)
9
8
namespace Magento \NonComposerComponentRegistration ;
10
9
11
10
use RuntimeException ;
19
18
function main ()
20
19
{
21
20
$ globPatterns = require __DIR__ . '/etc/registration_globlist.php ' ;
22
- $ baseDir = __DIR__ . '/ ' ;
21
+ $ baseDir = dirname ( __DIR__ ) . '/ ' ;
23
22
24
23
foreach ($ globPatterns as $ globPattern ) {
25
24
// Sorting is disabled intentionally for performance improvement
26
25
$ files = glob ($ baseDir . $ globPattern , GLOB_NOSORT );
27
26
if ($ files === false ) {
28
27
throw new RuntimeException ("glob(): error with ' $ baseDir$ globPattern' " );
29
28
}
30
- array_map (__NAMESPACE__ . ' \ file' , $ files );
29
+ array_map (function ( $ file ) { require_once $ file; } , $ files );
31
30
}
32
31
}
33
32
34
- /**
35
- * Isolated include with it's own variable scope
36
- *
37
- * @return void
38
- */
39
- function file () {
40
- include func_get_arg (0 );
41
- }
42
-
43
33
main ();
Original file line number Diff line number Diff line change 55
55
"" : " app/code/"
56
56
},
57
57
"files" : [
58
- " app/etc/NonComposerComponentRegistration .php"
58
+ " app/registration .php"
59
59
]
60
60
},
61
61
"autoload-dev" : {
You can’t perform that action at this time.
0 commit comments