From 5b91d91a9c7fc0c4cd499d7d294bb2b6591fb6af Mon Sep 17 00:00:00 2001 From: Daniel Leech Date: Sat, 16 Mar 2024 15:41:55 +0000 Subject: [PATCH] Add extensions to config --- doc/reference/configuration.rst | 4 ++-- lib/Indexer/Extension/IndexerExtension.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/reference/configuration.rst b/doc/reference/configuration.rst index a8911b5b9..9d5317f15 100644 --- a/doc/reference/configuration.rst +++ b/doc/reference/configuration.rst @@ -1614,7 +1614,7 @@ Type: array Glob patterns to include while indexing -**Default**: ``["\/**\/*.php"]`` +**Default**: ``["\/**\/*.php","\/**\/*.phar"]`` .. _param_indexer.exclude_patterns: @@ -1758,7 +1758,7 @@ Type: array File extensions (e.g. `php`) for files that should be indexed -**Default**: ``["php"]`` +**Default**: ``["php","phar"]`` .. _ObjectRendererExtension: diff --git a/lib/Indexer/Extension/IndexerExtension.php b/lib/Indexer/Extension/IndexerExtension.php index 4fb1b9748..399155df0 100644 --- a/lib/Indexer/Extension/IndexerExtension.php +++ b/lib/Indexer/Extension/IndexerExtension.php @@ -79,6 +79,7 @@ public function configure(Resolver $schema): void self::PARAM_INDEX_PATH => '%cache%/index/%project_id%', self::PARAM_INCLUDE_PATTERNS => [ '/**/*.php', + '/**/*.phar', ], self::PARAM_EXCLUDE_PATTERNS => [ '/vendor/**/Tests/**/*', @@ -92,7 +93,7 @@ public function configure(Resolver $schema): void self::PARAM_PROJECT_ROOT => '%project_root%', self::PARAM_REFERENCES_DEEP_REFERENCES => true, self::PARAM_IMPLEMENTATIONS_DEEP_REFERENCES => true, - self::PARAM_SUPPORTED_EXTENSIONS => ['php'], + self::PARAM_SUPPORTED_EXTENSIONS => ['php', 'phar'], ]); $schema->setDescriptions([ self::PARAM_ENABLED_WATCHERS => 'List of allowed watchers. The first watcher that supports the current system will be used',