File tree 2 files changed +13
-1
lines changed
tests/data/not-autoloaded/used-symbols
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,11 @@ public function parseUsedSymbols(
163
163
} elseif (isset ($ extensionSymbols [$ lowerName ])) {
164
164
$ symbolName = $ name ;
165
165
$ kind = $ extensionSymbols [$ lowerName ];
166
+
167
+ if (!$ inGlobalScope && $ kind === SymbolKind::CLASSLIKE ) {
168
+ break ; // cannot use class-like symbols in non-global scope when not imported
169
+ }
170
+
166
171
$ usedSymbols [$ kind ][$ symbolName ][] = $ token [2 ];
167
172
}
168
173
@@ -211,6 +216,11 @@ public function parseUsedSymbols(
211
216
} elseif (isset ($ extensionSymbols [$ lowerName ])) {
212
217
$ symbolName = $ name ;
213
218
$ kind = $ extensionSymbols [$ lowerName ];
219
+
220
+ if (!$ inGlobalScope && $ kind === SymbolKind::CLASSLIKE ) {
221
+ break ; // cannot use class-like symbols in non-global scope when not imported
222
+ }
223
+
214
224
$ usedSymbols [$ kind ][$ symbolName ][] = $ token [2 ];
215
225
216
226
} else {
Original file line number Diff line number Diff line change 3
3
4
4
use { DDTrace , DDTrace \Integrations };
5
5
use function DDTrace \active_span ;
6
- use My \App \XMLReader ;
6
+ use My \App \XMLReader , PDO ;
7
7
8
8
json_encode ('' );
9
9
LIBXML_ERR_FATAL ;
23
23
24
24
function foo ($ normalizer ) {}
25
25
foo (normalizer: 1 );
26
+
27
+ class Normalizer {}
You can’t perform that action at this time.
0 commit comments