Skip to content

Commit d97deb8

Browse files
authored
[FileSystem] Add data and writable to not include on InitFilePathsResolver (#6285)
1 parent ef3a232 commit d97deb8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/FileSystem/InitFilePathsResolver.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@
1212
*/
1313
final class InitFilePathsResolver
1414
{
15+
/**
16+
* @var string
17+
* @see https://regex101.com/r/XkQ6Pe/1
18+
*/
19+
private const DO_NOT_INCLUDE_PATHS_REGEX = '#(vendor|var|stubs|temp|templates|tmp|e2e|bin|build|Migrations|data(?:base)?|storage|migrations|writable)#';
20+
1521
/**
1622
* @return string[]
1723
*/
@@ -21,7 +27,7 @@ public function resolve(string $projectDirectory): array
2127
->directories()
2228
->depth(0)
2329
// system files
24-
->notPath('#(vendor|var|stubs|temp|templates|tmp|e2e|bin|build|Migrations|database|storage|migrations)#')
30+
->notPath(self::DO_NOT_INCLUDE_PATHS_REGEX)
2531
->in($projectDirectory)
2632
->sortByName();
2733

0 commit comments

Comments
 (0)