feat: Add complete PHP language support with trait handling and property extraction

Addresses PHP traits extracted as classes, missing class properties, skipped constants, and invisible trait usage. Adds classifyClassNode to distinguish traits from classes, fixes property extraction for PHP's property_element AST structure (added 4,366 field nodes), and adds visitNode hook for class constants and trait use declarations (increased trait edges from 636 to 1,514). Also improves Liquid schema name handling and file path reference resolution. Verified against Laravel codebase.
This commit is contained in:
Colby McHenry
2026-04-07 13:44:14 -05:00
parent 1b279dcf94
commit f402ab8363
8 changed files with 151 additions and 5 deletions
+4 -1
View File
@@ -252,7 +252,10 @@ export class LiquidExtractor {
try {
const schemaJson = JSON.parse(schemaContent!);
if (schemaJson.name) {
schemaName = schemaJson.name;
// Shopify schema names can be translation objects like {"en": "...", "fr": "..."}
schemaName = typeof schemaJson.name === 'string'
? schemaJson.name
: schemaJson.name.en || Object.values(schemaJson.name)[0] as string || 'schema';
}
} catch {
// Schema isn't valid JSON, use default name