Skip to content
This repository was archived by the owner on Feb 13, 2025. It is now read-only.

Commit 6ce1264

Browse files
authored
Merge pull request #4 from fd6130/patch1
Fix relative path finding
2 parents 7526bec + 3cccd0b commit 6ce1264

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Configuration/DefaultConfiguration.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,10 @@ public function controllersToRemove(array $paths): self
275275

276276
$localRelativePaths = array_map(function ($absolutePath) {
277277
$relativePath = str_replace($this->localProjectDir, '', $absolutePath);
278+
if (Str::startsWith($absolutePath, $this->localProjectDir)) {
279+
$relativePath = mb_substr($absolutePath, mb_strlen($this->localProjectDir));
280+
}
281+
278282
$this->validatePathIsRelativeToProject($relativePath, 'controllersToRemove');
279283

280284
return trim($relativePath, DIRECTORY_SEPARATOR);

0 commit comments

Comments
 (0)