diff --git a/src/Configuration/DefaultConfiguration.php b/src/Configuration/DefaultConfiguration.php index 8ba6273..31e3e7c 100644 --- a/src/Configuration/DefaultConfiguration.php +++ b/src/Configuration/DefaultConfiguration.php @@ -272,6 +272,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);