File tree Expand file tree Collapse file tree 5 files changed +53
-24
lines changed
lib/internal/Magento/Framework/App/Test/Unit/_files Expand file tree Collapse file tree 5 files changed +53
-24
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
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
9
+ * registration.php to generate a list of includes.
10
+ */
11
+ return [
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 ' ,
18
+ ];
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+
7
+ //Register components (via a list of glob patterns)
8
+ namespace Magento \NonComposerComponentRegistration ;
9
+
10
+ use RuntimeException ;
11
+
12
+ /**
13
+ * Include files from a list of glob patterns
14
+ *
15
+ * @throws RuntimeException
16
+ * @return void
17
+ */
18
+ function main ()
19
+ {
20
+ $ globPatterns = require __DIR__ . '/etc/registration_globlist.php ' ;
21
+ $ baseDir = dirname (__DIR__ ) . '/ ' ;
22
+
23
+ foreach ($ globPatterns as $ globPattern ) {
24
+ // Sorting is disabled intentionally for performance improvement
25
+ $ files = glob ($ baseDir . $ globPattern , GLOB_NOSORT );
26
+ if ($ files === false ) {
27
+ throw new RuntimeException ("glob(): error with ' $ baseDir$ globPattern' " );
28
+ }
29
+ array_map (function ($ file ) { require_once $ file ; }, $ files );
30
+ }
31
+ }
32
+
33
+ main ();
Original file line number Diff line number Diff line change 243
243
]
244
244
},
245
245
"files" : [
246
- " app/etc/NonComposerComponentRegistration .php"
246
+ " app/registration .php"
247
247
],
248
248
"exclude-from-classmap" : [
249
249
" **/dev/**" ,
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