diff --git a/gitnexus-web/src/config/supported-languages.ts b/gitnexus-web/src/config/supported-languages.ts index 15df37c54..a9bcd8248 100644 --- a/gitnexus-web/src/config/supported-languages.ts +++ b/gitnexus-web/src/config/supported-languages.ts @@ -8,7 +8,7 @@ export enum SupportedLanguages { CSharp = 'csharp', Go = 'go', Rust = 'rust', - // PHP = 'php', + PHP = 'php', // Ruby = 'ruby', // Swift = 'swift', } \ No newline at end of file diff --git a/gitnexus-web/src/core/ingestion/utils.ts b/gitnexus-web/src/core/ingestion/utils.ts index 959eb55dc..c53fa4248 100644 --- a/gitnexus-web/src/core/ingestion/utils.ts +++ b/gitnexus-web/src/core/ingestion/utils.ts @@ -25,6 +25,12 @@ export const getLanguageFromFilename = (filename: string): SupportedLanguages | if (filename.endsWith('.go')) return SupportedLanguages.Go; // Rust if (filename.endsWith('.rs')) return SupportedLanguages.Rust; + // PHP (all common extensions) + if (filename.endsWith('.php') || filename.endsWith('.phtml') || + filename.endsWith('.php3') || filename.endsWith('.php4') || + filename.endsWith('.php5') || filename.endsWith('.php8')) { + return SupportedLanguages.PHP; + } return null; }; diff --git a/gitnexus/src/config/supported-languages.ts b/gitnexus/src/config/supported-languages.ts index 15df37c54..a9bcd8248 100644 --- a/gitnexus/src/config/supported-languages.ts +++ b/gitnexus/src/config/supported-languages.ts @@ -8,7 +8,7 @@ export enum SupportedLanguages { CSharp = 'csharp', Go = 'go', Rust = 'rust', - // PHP = 'php', + PHP = 'php', // Ruby = 'ruby', // Swift = 'swift', } \ No newline at end of file diff --git a/gitnexus/src/core/ingestion/utils.ts b/gitnexus/src/core/ingestion/utils.ts index 620fac7ac..12b4c6b3e 100644 --- a/gitnexus/src/core/ingestion/utils.ts +++ b/gitnexus/src/core/ingestion/utils.ts @@ -31,6 +31,12 @@ export const getLanguageFromFilename = (filename: string): SupportedLanguages | if (filename.endsWith('.go')) return SupportedLanguages.Go; // Rust if (filename.endsWith('.rs')) return SupportedLanguages.Rust; + // PHP (all common extensions) + if (filename.endsWith('.php') || filename.endsWith('.phtml') || + filename.endsWith('.php3') || filename.endsWith('.php4') || + filename.endsWith('.php5') || filename.endsWith('.php8')) { + return SupportedLanguages.PHP; + } return null; };