Skip to content

Ignore indexing files above a certain size#2979

Merged
dantleech merged 3 commits intophpactor:masterfrom
mamazu:ignore_big_files
Dec 12, 2025
Merged

Ignore indexing files above a certain size#2979
dantleech merged 3 commits intophpactor:masterfrom
mamazu:ignore_big_files

Conversation

@mamazu
Copy link
Contributor

@mamazu mamazu commented Dec 6, 2025

Future ideas

  • Make the limit configurable
  • Add a logger to the class and log a skipped message for debugging

}

// Skip files that are bigger than a megabyte
if (($fileInfo->getSize() ?: 0) >= 1e6) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should at least be configurable as that at least exposes the feature instead of it being a buried implementation detail.

@mamazu mamazu changed the title Ignore indexing files which are bigger than one MB Ignore indexing files above a certain size Dec 6, 2025
@dantleech dantleech merged commit cb9a2b7 into phpactor:master Dec 12, 2025
11 checks passed
@mamazu mamazu deleted the ignore_big_files branch December 12, 2025 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants