File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,10 @@ public function scan(array $scanPaths): array
9393 continue ;
9494 }
9595
96+ if ($ this ->isComposerInternalClass ($ usedSymbol )) {
97+ continue ;
98+ }
99+
96100 if (!isset ($ this ->optimizedClassmap [$ usedSymbol ])) {
97101 if (!$ this ->isConstOrFunction ($ usedSymbol )) {
98102 $ errors [$ usedSymbol ] = new ClassmapEntryMissingError ($ usedSymbol , $ filePath );
@@ -225,4 +229,12 @@ private function isConstOrFunction(string $usedClass): bool
225229 return defined ($ usedClass ) || function_exists ($ usedClass );
226230 }
227231
232+ /**
233+ * Those are always available: https://getcomposer.org/doc/07-runtime.md#installed-versions
234+ */
235+ private function isComposerInternalClass (string $ usedSymbol ): bool
236+ {
237+ return $ usedSymbol === 'Composer \\InstalledVersions ' ;
238+ }
239+
228240}
Original file line number Diff line number Diff line change 1818
1919echo \DIRECTORY_SEPARATOR ;
2020echo \strlen ('' );
21+
22+ \Composer \InstalledVersions::getInstalledPackages ();
You can’t perform that action at this time.
0 commit comments