feat(frameworks): add Drupal 8/9/10/11 support (#271)

Detects Drupal projects via composer.json drupal/* deps; extracts routes from *.routing.yml (route nodes + references edges to controllers/forms/entity handlers) and Drupal hook implementations from .module/.install/.theme/.inc. Adds yaml/twig as file-level languages and excludes core/contrib by default. Resolves #268.
This commit is contained in:
Marcelo Vani
2026-05-21 17:11:19 -05:00
committed by GitHub
parent 95dace987e
commit 5b71a89574
8 changed files with 955 additions and 2 deletions
+16
View File
@@ -87,6 +87,8 @@ export const LANGUAGES = [
'scala',
'lua',
'luau',
'yaml',
'twig',
'unknown',
] as const;
@@ -522,6 +524,15 @@ export const DEFAULT_CONFIG: CodeGraphConfig = {
'**/*.cs',
// PHP
'**/*.php',
// Drupal-specific PHP extensions
'**/*.module',
'**/*.install',
'**/*.theme',
'**/*.inc',
// Drupal routing YAML
'**/*.routing.yml',
// Twig templates
'**/*.twig',
// Ruby
'**/*.rb',
// Swift
@@ -667,6 +678,11 @@ export const DEFAULT_CONFIG: CodeGraphConfig = {
'**/storage/framework/**',
'**/bootstrap/cache/**',
// Drupal - core and contrib are rarely customised; index only custom code
'**/web/core/**',
'**/web/modules/contrib/**',
'**/web/themes/contrib/**',
// Ruby
'**/.bundle/**',
'**/tmp/cache/**',