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 5b91d91
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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

0 comments on commit 5b91d91

Please sign in to comment.