File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ function($path) {
55
55
return false ;
56
56
}
57
57
$ parts = explode ('. ' , basename ($ path ));
58
- if (end ($ parts ) === 'info '
59
- || array_slice ($ parts , -2 ) == ['info ' , 'yml ' ]
58
+ if (( $ this -> core == 7 && end ($ parts ) === 'info ' )
59
+ || ( $ this -> core == 8 && array_slice ($ parts , -2 ) == ['info ' , 'yml ' ])
60
60
) {
61
61
$ this ->infoFiles [] = $ path ;
62
62
@@ -106,10 +106,11 @@ function($path) {
106
106
$ top = isset ($ composerMap [$ this ->name ])
107
107
? $ this ->name
108
108
: current (array_keys ($ composerMap ));
109
+ $ info = isset ($ projectMap [$ top ]) ? $ projectMap [$ top ] : null ;
109
110
if ('drupal ' === $ this ->name ) {
110
111
$ composerMap [$ top ]['type ' ] = 'drupal-core ' ;
111
112
}
112
- if (empty ($ composerMap [$ top ]['type ' ]) && $ this ->core == 8 ) {
113
+ if (empty ($ composerMap [$ top ]['type ' ]) && $ this ->core == 8 && isset ( $ info ) && isset ( $ info -> drupalInfo ()[ ' type ' ]) ) {
113
114
$ composerMap [$ top ]['type ' ] = 'drupal- ' . $ info ->drupalInfo ()['type ' ];
114
115
}
115
116
if (empty ($ composerMap [$ top ]['type ' ]) && $ releaseInfo = $ this ->getReleaseInfo ($ this ->core )) {
You can’t perform that action at this time.
0 commit comments