diff --git a/src/goals/PackageGoal.php b/src/goals/PackageGoal.php index 806b53b..e7f9b8a 100644 --- a/src/goals/PackageGoal.php +++ b/src/goals/PackageGoal.php @@ -63,7 +63,7 @@ public function getNamespace() public static function defaultNamespace($vendor, $package) { - return $vendor . '\\' . strtr($package, '-', '\\'); + return preg_replace('/[^a-zA-Z0-9\\\\]+/', '', $vendor . strtr("-$package", '-', '\\')); } public function getSrc()