Skip to content

Commit

Permalink
Update file management in PreloadBuilder and adjust exclusions
Browse files Browse the repository at this point in the history
This change refactors PreloadBuilder to handle file lists instead of classes, ensuring the files are unique. Additionally, it updates the excluded files to be more specific and includes both 'csv-blueprint' and 'csv-blueprint.php' in the project root directory.
  • Loading branch information
SmetDenis committed Apr 12, 2024
1 parent 407272e commit d62742c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docker/build-preloader.php
Expand Up @@ -20,7 +20,8 @@

(new PreloadBuilder(enableOpcacheCompiler: false))
->setExcludes([
'/app/csv-blueprint',
\dirname(__DIR__) . '/csv-blueprint',
\dirname(__DIR__) . '/csv-blueprint.php',
])
->setFiles(
\file_exists(__DIR__ . '/included_files.php')
Expand Down
2 changes: 1 addition & 1 deletion src/Tools/PreloadBuilder.php
Expand Up @@ -69,7 +69,7 @@ private function buildFilelist(): array
: "require_once '{$path}';";
}

return $files;
return \array_unique($files);
}

private function isExcluded(string $path): bool
Expand Down

0 comments on commit d62742c

Please sign in to comment.