diff --git a/src/Configuration/DefaultConfiguration.php b/src/Configuration/DefaultConfiguration.php index 1abe5ac..5ea53b0 100644 --- a/src/Configuration/DefaultConfiguration.php +++ b/src/Configuration/DefaultConfiguration.php @@ -275,6 +275,10 @@ public function controllersToRemove(array $paths): self $localRelativePaths = array_map(function ($absolutePath) { $relativePath = str_replace($this->localProjectDir, '', $absolutePath); + if (Str::startsWith($absolutePath, $this->localProjectDir)) { + $relativePath = mb_substr($absolutePath, mb_strlen($this->localProjectDir)); + } + $this->validatePathIsRelativeToProject($relativePath, 'controllersToRemove'); return trim($relativePath, DIRECTORY_SEPARATOR);