Skip to content

Commit

Permalink
Add extensions to config
Browse files Browse the repository at this point in the history
  • Loading branch information
dantleech committed Mar 16, 2024
1 parent 5e3de97 commit b60c398
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doc/reference/configuration.rst
Expand Up @@ -1614,7 +1614,7 @@ Type: array
Glob patterns to include while indexing


**Default**: ``["\/**\/*.php"]``
**Default**: ``["\/**\/*.php","\/**\/*.phar"]``


.. _param_indexer.exclude_patterns:
Expand Down Expand Up @@ -1758,7 +1758,7 @@ Type: array
File extensions (e.g. `php`) for files that should be indexed


**Default**: ``["php"]``
**Default**: ``["php","phar"]``


.. _ObjectRendererExtension:
Expand Down
3 changes: 2 additions & 1 deletion lib/Indexer/Extension/IndexerExtension.php
Expand Up @@ -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/**/*',
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion lib/TextDocument/Exception/TextDocumentNotFound.php
Expand Up @@ -13,6 +13,6 @@ public static function fromUri(TextDocumentUri $uri): self
return new self(sprintf(
'Text document "%s" not found',
$uri
).(new Exception())->getTraceAsString());
));
}
}

0 comments on commit b60c398

Please sign in to comment.