File tree 2 files changed +25
-4
lines changed 2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
2
$ extrafiles = array ();
3
+
3
4
$ phpDir = Pyrus \Config::current ()->php_dir . DIRECTORY_SEPARATOR ;
5
+ $ packages = array ('PEAR2/Autoload ' );
4
6
5
- $ PEAR2_Autoload_Path = 'PEAR2/Autoload.php ' ;
6
- $ extrafiles = array (
7
- 'src/ ' . $ PEAR2_Autoload_Path => $ phpDir . $ PEAR2_Autoload_Path
8
- );
7
+ foreach ($ packages as $ pkg ) {
8
+ $ prefix = $ phpDir . $ pkg ;
9
+
10
+ if (is_dir ($ prefix )) {
11
+ foreach (
12
+ new RecursiveIteratorIterator (
13
+ new RecursiveDirectoryIterator (
14
+ $ prefix ,
15
+ RecursiveDirectoryIterator::UNIX_PATHS
16
+ ),
17
+ RecursiveIteratorIterator::LEAVES_ONLY
18
+ ) as $ path
19
+ ) {
20
+ $ pathname = $ path ->getPathname ();
21
+ $ extrafiles ['src/ ' . $ pathname ] = $ pathname ;
22
+ }
23
+ }
24
+
25
+ if (is_file ($ prefix . '.php ' )) {
26
+ $ extrafiles ['src/ ' . $ pkg . '.php ' ] = $ prefix . '.php ' ;
27
+ }
28
+ }
Original file line number Diff line number Diff line change 115
115
$ package ->files [$ filename ] = array_merge_recursive (
116
116
$ package ->files [$ filename ]->getArrayCopy (), $ srcFileTasks
117
117
);
118
+
118
119
if ($ hasCompatible ) {
119
120
$ compatibleFilename = str_replace ('src/ ' , 'php/ ' , $ filename );
120
121
$ compatible ->files [$ compatibleFilename ] = array_merge_recursive (
You can’t perform that action at this time.
0 commit comments