From 9a89b81d542ad84754ff80049c69cdca0c52dc57 Mon Sep 17 00:00:00 2001 From: Elia Scheuner Date: Fri, 3 Jul 2026 14:55:33 +0200 Subject: [PATCH] fix(.gitignore): add * to directory data & snapshots --- src/Manager/ProjectInitManager.php | 2 +- tests/Integration/Manager/ProjectInitManagerIntegrationTest.php | 2 +- tests/Unit/Command/Project/ProjectInitCommandTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Manager/ProjectInitManager.php b/src/Manager/ProjectInitManager.php index 5326ed60..7bd0cd24 100644 --- a/src/Manager/ProjectInitManager.php +++ b/src/Manager/ProjectInitManager.php @@ -102,7 +102,7 @@ public function createDirectoryStructure( $skipped[] = $gitignoreRelative; } else { if (! $isDryRun) { - $this->filesystem->dumpFile($gitignorePath, "data/\n!data/.gitkeep\nsnapshots/\n!snapshots/.gitkeep\n"); + $this->filesystem->dumpFile($gitignorePath, "data/*\n!data/.gitkeep\nsnapshots/*\n!snapshots/.gitkeep\n"); } $created[] = $gitignoreRelative; diff --git a/tests/Integration/Manager/ProjectInitManagerIntegrationTest.php b/tests/Integration/Manager/ProjectInitManagerIntegrationTest.php index a66f9ed1..e738f854 100644 --- a/tests/Integration/Manager/ProjectInitManagerIntegrationTest.php +++ b/tests/Integration/Manager/ProjectInitManagerIntegrationTest.php @@ -72,7 +72,7 @@ public function testCreateDirectoryStructureCreatesGitignore(): void $gitignorePath = $this->tempDir.'/.dde/.gitignore'; self::assertFileExists($gitignorePath); - self::assertSame("data/\n!data/.gitkeep\nsnapshots/\n!snapshots/.gitkeep\n", file_get_contents($gitignorePath)); + self::assertSame("data/*\n!data/.gitkeep\nsnapshots/*\n!snapshots/.gitkeep\n", file_get_contents($gitignorePath)); } public function testDryRunDoesNotCreateAnything(): void diff --git a/tests/Unit/Command/Project/ProjectInitCommandTest.php b/tests/Unit/Command/Project/ProjectInitCommandTest.php index 3f8f5905..af71cb46 100644 --- a/tests/Unit/Command/Project/ProjectInitCommandTest.php +++ b/tests/Unit/Command/Project/ProjectInitCommandTest.php @@ -64,7 +64,7 @@ public function testExecuteCreatesGitignore(): void $gitignorePath = $this->tempDir.'/.dde/.gitignore'; $this->assertFileExists($gitignorePath); - $this->assertSame("data/\n!data/.gitkeep\nsnapshots/\n!snapshots/.gitkeep\n", file_get_contents($gitignorePath)); + $this->assertSame("data/*\n!data/.gitkeep\nsnapshots/*\n!snapshots/.gitkeep\n", file_get_contents($gitignorePath)); } public function testExecuteCreatesConfigYaml(): void