File tree 1 file changed +5
-1
lines changed
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ function processStubFile(string $stubFile, Context $context) {
49
49
echo "Saved $ arginfoFile \n" ;
50
50
}
51
51
52
- if (file_exists ( $ legacyFile ) ) {
52
+ if ($ fileInfo -> generateLegacyArginfo ) {
53
53
foreach ($ fileInfo ->getAllFuncInfos () as $ funcInfo ) {
54
54
$ funcInfo ->discardInfoForOldPhpVersions ();
55
55
}
@@ -633,6 +633,8 @@ class FileInfo {
633
633
public $ generateFunctionEntries = false ;
634
634
/** @var string */
635
635
public $ declarationPrefix = "" ;
636
+ /** @var bool */
637
+ public $ generateLegacyArginfo = false ;
636
638
637
639
/**
638
640
* @return iterable<FuncInfo>
@@ -955,6 +957,8 @@ protected function pName_FullyQualified(Name\FullyQualified $node) {
955
957
if ($ tag ->name === 'generate-function-entries ' ) {
956
958
$ fileInfo ->generateFunctionEntries = true ;
957
959
$ fileInfo ->declarationPrefix = $ tag ->value ? $ tag ->value . " " : "" ;
960
+ } else if ($ tag ->name === 'generate-legacy-arginfo ' ) {
961
+ $ fileInfo ->generateLegacyArginfo = true ;
958
962
}
959
963
}
960
964
}
You can’t perform that action at this time.
0 commit comments