Skip to content

Commit

Permalink
[FileSystem] Add data and writable to not include on InitFilePathsRes…
Browse files Browse the repository at this point in the history
…olver
  • Loading branch information
samsonasik committed Sep 2, 2024
1 parent ef3a232 commit 56c751b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/FileSystem/InitFilePathsResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
*/
final class InitFilePathsResolver
{
/**
* @var string
* @see https://regex101.com/r/XkQ6Pe/1
*/
private const DO_NOT_INCLUDE_PATHS_REGEX = '#(vendor|var|stubs|temp|templates|tmp|e2e|bin|build|Migrations|data(?:base)?|storage|migrations|writable)#';

/**
* @return string[]
*/
Expand All @@ -21,7 +27,7 @@ public function resolve(string $projectDirectory): array
->directories()
->depth(0)
// system files
->notPath('#(vendor|var|stubs|temp|templates|tmp|e2e|bin|build|Migrations|database|storage|migrations)#')
->notPath(self::DO_NOT_INCLUDE_PATHS_REGEX)
->in($projectDirectory)
->sortByName();

Expand Down

0 comments on commit 56c751b

Please sign in to comment.