3838 )
3939);
4040
41- $ compatible ->license = $ package ->license ;
4241
4342$ package ->files ['tests/bootstrap.php ' ] = array_merge_recursive (
4443 $ package ->files ['tests/bootstrap.php ' ]->getArrayCopy (), $ srcDirTask
6362 )
6463);
6564
66- $ compatible-> files [
67- " test/ { $ package -> channel } / { $ package -> name } /bootstrap.php "
68- ] = array_merge_recursive (
69- $ compatible ->files [
65+ $ hasCompatible = isset ( $ compatible);
66+ if ( $ hasCompatible ) {
67+ $ compatible -> license = $ package -> license ;
68+ $ compatible ->files [
7069 "test/ {$ package ->channel }/ {$ package ->name }/bootstrap.php "
71- ]->getArrayCopy (), $ srcDirTask
72- );
70+ ] = array_merge_recursive (
71+ $ compatible ->files [
72+ "test/ {$ package ->channel }/ {$ package ->name }/bootstrap.php "
73+ ]->getArrayCopy (), $ srcDirTask
74+ );
7375
74- $ compatible ->files ["doc/ {$ package ->channel }/ {$ package ->name }/phpdoc.dist.xml " ]
75- = array_merge_recursive (
76- $ compatible ->files [
76+ $ compatible ->files [
7777 "doc/ {$ package ->channel }/ {$ package ->name }/phpdoc.dist.xml "
78- ]->getArrayCopy (), $ srcDirTask
79- );
78+ ] = array_merge_recursive (
79+ $ compatible ->files [
80+ "doc/ {$ package ->channel }/ {$ package ->name }/phpdoc.dist.xml "
81+ ]->getArrayCopy (), $ srcDirTask
82+ );
8083
81- $ compatible ->files ["doc/ {$ package ->channel }/ {$ package ->name }/doxygen.ini " ]
82- = array_merge_recursive (
83- $ compatible ->files [
84- "doc/ {$ package ->channel }/ {$ package ->name }/doxygen.ini "
85- ]->getArrayCopy (), $ srcDirTask ,
86- array (
87- 'tasks:replace ' => array (
88- array (
89- 'attribs ' => array (
90- 'from ' => 'GIT: $Id$ ' ,
91- 'to ' => 'version ' ,
92- 'type ' => 'package-info '
84+ $ compatible ->files ["doc/ {$ package ->channel }/ {$ package ->name }/doxygen.ini " ]
85+ = array_merge_recursive (
86+ $ compatible ->files [
87+ "doc/ {$ package ->channel }/ {$ package ->name }/doxygen.ini "
88+ ]->getArrayCopy (), $ srcDirTask ,
89+ array (
90+ 'tasks:replace ' => array (
91+ array (
92+ 'attribs ' => array (
93+ 'from ' => 'GIT: $Id$ ' ,
94+ 'to ' => 'version ' ,
95+ 'type ' => 'package-info '
96+ )
9397 )
9498 )
9599 )
96- )
97- );
100+ );
101+ }
98102
99103$ oldCwd = getcwd ();
100104chdir (__DIR__ );
111115 $ package ->files [$ filename ] = array_merge_recursive (
112116 $ package ->files [$ filename ]->getArrayCopy (), $ srcFileTasks
113117 );
114-
115- $ compatibleFilename = str_replace ('src/ ' , 'php/ ' , $ filename );
116- $ compatible ->files [$ compatibleFilename ] = array_merge_recursive (
117- $ compatible ->files [$ compatibleFilename ]->getArrayCopy (),
118- $ srcFileTasks
119- );
118+ if ($ hasCompatible ) {
119+ $ compatibleFilename = str_replace ('src/ ' , 'php/ ' , $ filename );
120+ $ compatible ->files [$ compatibleFilename ] = array_merge_recursive (
121+ $ compatible ->files [$ compatibleFilename ]->getArrayCopy (),
122+ $ srcFileTasks
123+ );
124+ }
120125}
121126chdir ($ oldCwd );
0 commit comments