File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
tests/data/not-autoloaded/used-symbols Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,11 @@ public function parseUsedSymbols(
163163 } elseif (isset ($ extensionSymbols [$ lowerName ])) {
164164 $ symbolName = $ name ;
165165 $ 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+
166171 $ usedSymbols [$ kind ][$ symbolName ][] = $ token [2 ];
167172 }
168173
@@ -211,6 +216,11 @@ public function parseUsedSymbols(
211216 } elseif (isset ($ extensionSymbols [$ lowerName ])) {
212217 $ symbolName = $ name ;
213218 $ 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+
214224 $ usedSymbols [$ kind ][$ symbolName ][] = $ token [2 ];
215225
216226 } else {
Original file line number Diff line number Diff line change 33
44use { DDTrace , DDTrace \Integrations };
55use function DDTrace \active_span ;
6- use My \App \XMLReader ;
6+ use My \App \XMLReader , PDO ;
77
88json_encode ('' );
99LIBXML_ERR_FATAL ;
2323
2424function foo ($ normalizer ) {}
2525foo (normalizer: 1 );
26+
27+ class Normalizer {}
You can’t perform that action at this time.
0 commit comments