Skip to content

Commit 1546796

Browse files
committed
fix(documentator/Processor): \LastDragon_ru\LaraASP\Documentator\Processor\FileSystem\FileSystem will cache change only on one commit level (+ the last change will have bigger priority).
1 parent 718ecb3 commit 1546796

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

packages/documentator/src/Processor/FileSystem/FileSystem.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,12 @@ public function commit(): void {
377377
}
378378

379379
protected function change(File $path, string $content): void {
380-
$this->changes[$this->level][(string) $path] = $content;
380+
$path = (string) $path;
381+
$this->changes[$this->level][$path] = $content;
382+
383+
for ($level = $this->level - 1; $level >= 0; $level--) {
384+
unset($this->changes[$level][$path]);
385+
}
381386
}
382387

383388
protected function save(FilePath|string $path, string $content): void {

0 commit comments

Comments
 (0)